Line | |
---|
1 | uniform mat4 projMatrix;
|
---|
2 | uniform float time;
|
---|
3 |
|
---|
4 | varying vec4 position;
|
---|
5 | varying vec3 color;
|
---|
6 | varying vec2 texCoord;
|
---|
7 | varying vec3 normal;
|
---|
8 | varying vec3 lightVect;
|
---|
9 | varying vec4 shadowCoord;
|
---|
10 | varying vec3 position1;
|
---|
11 |
|
---|
12 | void 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.