GL_EYE_PLANE semantics rationale

kabel

Newcomer
hello,

the glTexGenfv() call for automatic texture coordinate functions has semantics i am unable to understand.

i.e., the call glTexGenfv( GL_S, GL_EYE_PLANE, nv). the given vector nv is multiplied with the inverted modelview matrix at that moment, and with this converted vector, the texture coordinate is calculated. simple question: why is this done? does it matter that nv is multiplied from the left to the inverse?

i hope i'm not too naive. :rolleyes:

-- kabel
 
google for envionmental mapping techniques. once you familiarize yourslef with those, re-read the ogl specs and things will be much clearer this time around.

ps: multiplying from the left to the inverse is multiplication with the transpose of the inverse - that's how normals are transformed.
 
Last edited by a moderator:
your second comment hit the nail on the head. this transform does map the normals to eye space, when given coordinates in model space. that was the missing link. thanks.

can you be more specific about your reference to environment mapping? i must admit that i came across the inverse matrix issue when dealing with shadow maps. i'm not fully into env maps right now. for sphere maps, you don't need that inverse matrix. the same goes for cube env maps. well, at least in my current understanding.

-- kabel
 
Back
Top