• ### What is your GameDev Story?

#### Archived

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

# eye linear texture coords

This topic is 6083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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 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?!

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 11
• 15
• 11
• 11
• ### Forum Statistics

• Total Topics
634149
• Total Posts
3015834
×