Anyone know if it is possible to perform a specular hi-light effect using this normal mapping method without pixel shaders?
All the tutorials I have seen have used pixel shaders
Thanks friends
DOT3 normal mapping without pixel shaders
I assume you mean Register Combiners or equivalent then? You can achieve this with a normal map, diffuse map and normalisation cube map for normalising the half-angle vector per-pixel. Unfortunately I don''t have enough time to explain it in more detail, but hopefully someone else here will .
HTH.
HTH.
Per-Pixel specular without pixel-shaders is possible but only with very low shininess.
As RobertC mentioned, the general idea is to pass the light-direction just like you do for diffuse in the primary color. The half-angle gets passed in a texture-coordinate triple with which you access a normlization-cubemap.
You can then use a texenv/reg-combiner to do the dot3.
If I remember correctly, you can get up to a shininess of 4 with the 2 general plus the final register combiner on a Geforce 2 or similar.
With Geforce 3 and up you get higher values since you have 8 general combiners (which are part of the ps 1.1/.3 functionality in OpenGL).
If you want to stick to texture_env_combine/dot3 only (for ATI hardware, etc), you can get shininess of 2 or 3 by using a third texture-stage (I think you get it from Radeon 7500 on up) with a mul or a mad-instruction from ATI_texture_env_combine3.
Hope this helps,
Jan
As RobertC mentioned, the general idea is to pass the light-direction just like you do for diffuse in the primary color. The half-angle gets passed in a texture-coordinate triple with which you access a normlization-cubemap.
You can then use a texenv/reg-combiner to do the dot3.
If I remember correctly, you can get up to a shininess of 4 with the 2 general plus the final register combiner on a Geforce 2 or similar.
With Geforce 3 and up you get higher values since you have 8 general combiners (which are part of the ps 1.1/.3 functionality in OpenGL).
If you want to stick to texture_env_combine/dot3 only (for ATI hardware, etc), you can get shininess of 2 or 3 by using a third texture-stage (I think you get it from Radeon 7500 on up) with a mul or a mad-instruction from ATI_texture_env_combine3.
Hope this helps,
Jan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement