DOT3 normal mapping without pixel shaders

Started by
13 comments, last by Jimfing 19 years, 10 months ago
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
Advertisement
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.
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
Brilliant - thanks for the explanation guys. Now i know where to look.

Although I will have to read up on register combiners to understand some of that - I''m a DirectX boy only :-\
http://developer.nvidia.com/object/gdc_practicalperpixel.html

This topic is closed to new replies.

Advertisement