Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

gerogerber

eye linear texture coords

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

If I specify a reference plane for s this reference plane will be multiplied with the inverse of the current modelview matrix, right? So with a reference plane p with (1, 0, 0, 0)and an inverse modelview matrix with |1 0 0 -5| |0 1 0 0| |0 0 1 5| |0 0 0 1| after multiplication I get a reference plane p'' (1, 0, 0, -5), right? If I now calculate the distance of plane p'' to a point in eye coordinates with (15, 0, -15, 1)^T I get a distance of 1*15+0*0+0*(-15)+(-5)*1=10(!) Shouldn''t the distance be 15?! What is wrong in my calculations?!?!

Share this post


Link to post
Share on other sites
Advertisement
I''m not sure what you''re trying to do, but why should the distance be 15? The plane (1, 0, 0, -5) passes through the line x = 5 (-5 is the distance to the origin in the normal''s direction). If you have a point at x = 15, the signed distance to the plane will be 15 - 5 == 10. Just like you got.

I hope I''m not missing anything here. ;-)

/ Martin

Share this post


Link to post
Share on other sites
I just want to completely understand the GL_EYE_LINEAR mode in OpenGL :-)

As far as I understand this mode yet, the reference planes are transformed to the position of the eye. From this point the distance from the reference planes to each vertex in eye coordinates is calculated which results in the corresponding texture coordinate.
So in the above example the distance on the x-axis from the eye to the point in eye coords should be 15.....or?!

Share this post


Link to post
Share on other sites

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