eye vector

okay i want an eye vector for my shader the closest thing i can come up with is:

vec4 eye = normalize( gl_ModelViewMatrix * gl_Vertex );

i am assuming:
vec4 normEye = vec4( normalize( gl_NormalMatrix * gl_Normal ), 1.0 );

this is in eye space, if so, i thought the eye vector would be (0,0, -1) but it seems this doenst work with my shader

what im actually wanting is to dot the normal with the -eye vector and shade acording to that.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.