Sign in to follow this  
zny

about Spherical Environment Maps texcoord

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this