5 varying vec3 v_rorg, v_rdir;
9 gl_Position = gl_Vertex;
11 vec2 s = vec2(aspect, 1.0);
13 float dist = -1.0 / tan(FOV / 2.0);
14 vec3 dir = vec3((gl_MultiTexCoord0.xy * 2.0 - 1.0) * s, dist);
15 v_rdir = gl_NormalMatrix * dir;
16 v_rorg = (gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;