blob: 4fbfe4d3cd6e9e24cd34df17eac9403331c0bfe5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*uniform vec3 light_eye;
varying vec2 texcoord;
varying vec3 light_surf;
varying vec3 eye_surf;
varying vec3 tangent_surf;
*/
varying vec3 vertex_eye;
varying vec2 shadow_coords;
uniform mat4 mvp, mv, light_mvp;
void main()
{
/* vec3 t = (mv * vec4(1.0,, 0.0)).xyz;
vec3 n = (mv * vec4(gl_Normal, 0.0)).xyz;
*/
gl_Position = mvp * gl_Vertex;
vertex_eye = vec3(mv * gl_Vertex);
vec4 temp = light_mvp * gl_Vertex;
shadow_coords = (temp).xy / temp.w;
/*
mat3 tbn = mat3(t,
cross(n, t),
n
);
texcoord = vec2(gl_MultiTexCoord0.x * 4, gl_MultiTexCoord0.y);
light_surf = normalize((light_eye - vertex_eye) * tbn);
eye_surf = normalize((-vertex_eye) * tbn);
tangent_surf = gl_MultiTexCoord1.xyz * tbn;
*/
}
|