Normal Map Tangent Space

Started by
0 comments, last by dpadam450 12 years, 4 months ago
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?
Advertisement
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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement