I spent some time yesterday adding code to use the normal textures. It was a sucess in that I can now draw the normal textures as well as the diffuse textures. But it looked horribly wrong.
After some reading today I've figured out that it's much more complicated that I thought. I need to transform the light vector into "normal" space for each triangle each time I draw it. Rather than make my rendering loop do this I'm going to use a vertex shader I think.
Directx9 emulates vertex shaders (but not pixel shaders) in software on cards that don't support it in hardware so this should work on any card.... Does anyone know if opengl does anything similar? Or are "real" vertex shaders (vertex programs on opengl?) required in order to use them?
|