Remove unused shader matrices. (#4723)
[oweals/minetest.git] / client / shaders / wielded_shader / opengl_vertex.glsl
1 uniform mat4 mWorldViewProj;
2 uniform mat4 mWorld;
3
4 uniform float dayNightRatio;
5 uniform vec3 eyePosition;
6 uniform float animationTimer;
7
8 varying vec3 vPosition;
9 varying vec3 worldPosition;
10
11 varying vec3 eyeVec;
12 varying vec3 lightVec;
13 varying vec3 tsEyeVec;
14 varying vec3 tsLightVec;
15
16 const float e = 2.718281828459;
17 const float BS = 10.0;
18
19 void main(void)
20 {
21         gl_TexCoord[0] = gl_MultiTexCoord0;
22         gl_Position = mWorldViewProj * gl_Vertex;
23
24         vPosition = gl_Position.xyz;
25         worldPosition = (mWorld * gl_Vertex).xyz;
26
27         vec3 sunPosition = vec3 (0.0, eyePosition.y * BS + 900.0, 0.0);
28
29         lightVec = sunPosition - worldPosition;
30         eyeVec = -(gl_ModelViewMatrix * gl_Vertex).xyz;
31
32         gl_FrontColor = gl_BackColor = gl_Color;
33 }