1 // Vertex shader for cube-texture reflection mapping
9 vec3 n = gl_NormalMatrix * gl_Normal;
10 vec3 u = normalize(vec3(gl_ModelViewMatrix * gl_Vertex));
11 float two_n_dot_u = 2.0 * dot(n, u);
13 f.xyz = u - n * two_n_dot_u;
18 gl_TexCoord[0] = gl_TextureMatrix[0] * f;
19 gl_Position = ftransform();