In glTexGen()if the texture generation function is GL_EYE_LINEAR, the texture generation function is:
p1’*xe + p2’*ye + p3’*ze + p4’*we
where (p1’, p2’, p3’, p4’) = (p1, p2, p3, p4)*M^-1
My question is: Which WHICH MODELVIEW MATRIX IS M? I’m thinking it’s that required to transform a “vector”/the normal in the camera/eye view-plane to the object view-plane! Is this so? If not why? …
It’s the MODELVIEW matrix - there is only one modelview matrix (except when using vertex programs, when you can have as many matrices as you can fit into the constants).
There’s two matrices that are used to project your scene into the viewport:-
projection
modelview
There’s also a texture matrix for each texture unit.
Originally posted by knackered:
[b]It’s the MODELVIEW matrix - there is only one modelview matrix [b]
I find this very confusing because if q = Mp: where p = (x, y, z, w) is a point/vertex (in object space) and q = (x’, y’, z’, w’) is the eye/camera space equivalent; where M is the modelview matrix, why should the transformation of the object-space vector p = (p1, p2, p3, p4) to the eye-space form p’ = (p1’, p2’, p3’, p4’) be computed the otherway round ?!? p’ = Mp