• Advertisement
Sign in to follow this  

about Spherical Environment Maps texcoord

This topic is 3353 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

In DirectX9's help, it said that the spherical map's texcoord is u=0.5+Nx/2 v=0.5+Ny/2 i want know the theory of the expressions,or how can i elicit it. thanks!

Share this post


Link to post
Share on other sites
Advertisement
Since the range of the components of a normal is -1.0...+1.0, they need to be scaled and biased to 0.0...+1.0 space (because texture coordinates are specified in that space). In order to do this transformation, the components of the normal are first divided by 2 to get to -0.5...+0.5 range, and then 0.5 is added to bias the range to 0.0...+1.0, result being the texture coordinate.

Share this post


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

  • Advertisement