source: GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/render.vert @ 930

Revision 930, 646 bytes checked in by igarcia, 19 years ago (diff)
Line 
1uniform mat4 projMatrix;
2uniform float time;
3                       
4varying vec4 position;
5varying vec3 color;
6varying vec2 texCoord;
7varying vec3 normal;
8varying vec3 lightVect;
9varying vec4 shadowCoord;
10varying vec3 position1;
11
12void main()
13{       
14
15        gl_Position = ftransform();
16
17        normal = gl_Normal;
18        texCoord = gl_MultiTexCoord0.st;
19        color = gl_Color.rgb;
20        position1 = gl_Vertex.xyz;
21        position = gl_Vertex;
22       
23        vec3 lightpos;
24
25        lightpos.x = 2.7320508 * cos(time/50);
26        lightpos.y = 2.7320508 * sin(time/50);
27        lightpos.z = 1.0;
28
29        shadowCoord = mul(projMatrix, gl_Vertex);
30
31        position.xyz -= lightpos;
32        lightVect = position.xyz/3.4641016;
33}
Note: See TracBrowser for help on using the repository browser.