Jump to content
  • Advertisement
Sign in to follow this  
Tilt_

Normal Map Tangent Space

This topic is 2570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!