HILO question

If I want to use the HILO format instread of the usual RGB for normalmaps, then I have to change

glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, bump);

to

glTexImage2D (GL_TEXTURE_2D, 0, GL_HILO16_NV, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, bump);

right?
What else do I have to do?

Btw, is there anyone how have done per-pixel specular lightning with texture shaders or know where to find info about it?

//Regards, Ninja

Demos/papers/presentations on how to use everything about the nvidia cards is on their dev site.
http://developer.nvidia.com

-SirKnight

Normals are 3-valued vectors.

HILO textures contains 2-valued tuples.

Ergo, you can’t easily put a normal map inside a HILO texture.

actaully jwatte, you can, because there is a mode where it willl calculate a z value as a hemispherical projection of the x and y - giving you a unit length normal.

you must use a signed HILO format, though, and i think it only works for the dotproduct texture shader operations.

a normal is 2dimensional… it has latitude and longitude.

and yes, teh hiloformat uses 2 components for the normalmap, it calculates z = sqrt(1 - xx - yy) in the textureshader and uses it for a textureshader dotproduct. on a normalmap, all normals are facing upwards, => z always greater zero