#version 150 compatibility // interpolated surface normal in eye space out vec3 N; // interpolated surface point in eye space out vec3 s; // interpolated texture coordinates out vec2 tc; out vec4 clr; void main() { // transform vertex to clip space gl_Position = ftransform(); // transform vertex to eye space vec4 h_s = gl_ModelViewMatrix * gl_Vertex; gl_ClipVertex = h_s; s = h_s.xyz / h_s.w; // transform texture coordinates vec4 h_tc = gl_TextureMatrix[0]*gl_MultiTexCoord0; tc = h_tc.xy / h_tc.w; // transform normal to eye space N = normalize(gl_NormalMatrix * gl_Normal); clr = gl_Color; }