1 uniform mat4 mWorldViewProj;
4 uniform float dayNightRatio;
5 uniform vec3 eyePosition;
6 uniform float animationTimer;
8 varying vec3 vPosition;
9 varying vec3 worldPosition;
12 varying vec3 lightVec;
13 varying vec3 tsEyeVec;
14 varying vec3 tsLightVec;
16 const float e = 2.718281828459;
17 const float BS = 10.0;
21 gl_TexCoord[0] = gl_MultiTexCoord0;
22 gl_Position = mWorldViewProj * gl_Vertex;
24 vPosition = gl_Position.xyz;
25 worldPosition = (mWorld * gl_Vertex).xyz;
27 vec3 sunPosition = vec3 (0.0, eyePosition.y * BS + 900.0, 0.0);
29 lightVec = sunPosition - worldPosition;
30 eyeVec = -(gl_ModelViewMatrix * gl_Vertex).xyz;
32 gl_FrontColor = gl_BackColor = gl_Color;