Normal Map Tangent Space
I'm having a difficult time figuring out how to do Normal Mapping using GLSL. I have a normal map texture with tangent space normals stored in the RGB color channel. Given that I only have my geometric normal, gl_Normal, and the vertex coordinates, how do I create an orthonormal basis for planar texture mapping?
my geometric normal, gl_Normal, and the vertex coordinates[/quote]
geometric normal? You need 3 vectors to describe any 3d space. The identity matrix gives you the standard x,y,z. For the triangle you have the normal, the x direction of the texture on the triangle(tangent) and the y direction (bi-tangent) of the texture on the triangle. Depending on your exporter, you can just export the tangents and normals.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement