Jump to content
  • Advertisement
Sign in to follow this  

Singularity Sphere Mapping and tangent space

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

Hi i have a big problem. My rendering engine use the deferred light system. To beginning i started with a sphere mesh mapped using sphere mapping public static Vector2 SphereMap(Vector3 vec) { float len; Vector2 retV1 = Vector2.Empty; len = (float)Math.Sqrt(vec.X * vec.X + vec.Y * vec.Y + vec.Z * vec.Z); if (len > 0.0f) { if (vec.X == 0.0f && vec.Y == 0.0f) retV1.X = 0.0f; else retV1.X = (float)((1.0f - (float)Math.Atan2(vec.X, vec.Y)/Math.PI)/ 2.0f); vec.Z /= len; retV1.Y = 1.0f - (float)saacos(vec.Z) / (float)Math.PI; } else { retV1.X = retV1.Y = 0.0f; } return retV1; } But when i use the phong light system the specular component creates a lot of noise in the singularity point. Any suggestion? something wrong? [Edited by - Powerino73 on November 10, 2009 2:08:30 PM]

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!