varying float cosine; varying vec2 texCoord; void main() { gl_Position = ftransform(); texCoord = gl_MultiTexCoord0.st; cosine = (gl_ModelViewMatrixInverseTranspose * vec4(gl_Normal,1.0)).z; }