Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / per-fragment sphere mapping Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
erkokite

March 01, 2005, 12:58 PM

I am currently trying to write a GLSL shader for sphere mapping with a tangent space normal map. I'm having trouble converting the tangent space normals as well as the view vector into eye-space. Could someone please tell me how to translate out of tangent space and into eye space, or from object space into eye space?

 
Reedbeta

March 01, 2005, 01:10 PM

Hmm...ordinarily, you translate the eye vector, light vectors, etc into tangent space instead of transforming the normals into world space or eye space.

To transform a vector from object space to eye space, you just multiply by the modelview matrix.

To transform from tangent space to object space, you will need another matrix, which can be constructed by setting the tangent, binormal, and normal vectors into the first three columns of a 4x4 matrix.

 
This thread contains 2 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.