Hi there,

I am trying to understand the Math formula used to access the sphere map texture. Please see following websites:

http://www.reindelsoftware.com/Docum...g/Mapping.html
http://www.clicktorelease.com/blog/c...mapping-shader

Q1- why are we adding 1 to rz?
Q2- why is the magnitude multiplied by 2?
Q3- why are we adding 0.5?

Thank you again in advance and I appreciate it if someone could explain this in details.

Ali