Talk:Mathematics of glTexGen

From OpenGL Wiki
Revision as of 00:39, 14 November 2010 by Derodo (talk | contribs) (Created page with 'Don't know if this is the right place for writing this, but I was just applying the maths mentioned in the article, and I think the GL_SPHERE_MAP calculations are not correct, fo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Don't know if this is the right place for writing this, but I was just applying the maths mentioned in the article, and I think the GL_SPHERE_MAP calculations are not correct, for where it says:

reflectionVector = myEyeVertex - myEyeNormal * 2.0 * dot3D(myEyeNormal, myEyeNormal);

It should be:

reflectionVector = myEyeVertex - myEyeNormal * 2.0 * dot3D(myEyeVertex, myEyeNormal);

And where it says:

m = 1.0 / 2.0 * sqrt(dot3D(reflectionVector, reflectionVector));

It should be:

m = 1.0 / ( 2.0 * sqrt(dot3D(reflectionVector, reflectionVector)) );

I'm not a maths expert, though I figured all that out when trying to apply the formulas for a project I was working on, and realized the results were not correct.

Did any one noticed this too? I just don't dare to edit the page myself, just in case I'm wrong.