about Spherical Environment Maps texcoord
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!
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement