varying vec3 Normal; void main() { vec4 p; // the light position is already stored in eye space coordinates //lightDir = normalize(vec3(gl_LightSource[0].position)); // convert normal to eye space coordinates using gl_NormalMatrix // gl_NormalMatrix is built in uniform matrix provided by GLSL // representing the inverse transpose model-view matrix Normal = normalize(gl_NormalMatrix * gl_Normal); // this time I am not doing: gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; // I will let the geometry shader handle that part // gl_Position = ftransform(); gl_Position = gl_Vertex; }