Sign in to follow this  

OpenGL a question on glTexGen

Recommended Posts

Hi all, I'm kinda confused with how to specify the params p1, p2, p3, p4 for GL_EYE_PLANE. The document says the texture generation function is g = p1'*xe + p2'*ye + p3'*ze + p4'*we( xe, ye, ze and we are vertex coordinates in eye space ) where (p1' p2' p3' p4') = (p1, p2, p3, p4) * inverse(M) (M is opengl modelview matrix) so I guess the params p1, p2, p3 and p4 I specify are in eye space (otherwise why do we have to multiply them by the inverse of opengl modelview matrix? ) If I was correct above, then (p1' p2' p3' p4') would be in object space. But then multiplying eye-space vertex coordinates( xe, ye, ze, we ) does not make sense to me. Can anyone explain that to me? Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this