I'm trying to create cube map for normal map lighting purposes. Instead if calculating vertex to light normal I'll apply "normalcubemap" to mesh (texture 0) and then apply normal map.
This is code that I hacked together for calculating cube map textures.
I think this is not right method to do it as for example front face z component / blue is constant acros the face and it makes normal mapped object little bit flat even if for example a sphere object seems to be lit ok..
Any ideas for correct or better way to make this kind of "normalizing" cube map?
|