/*uniform vec3 light_eye; varying vec2 texcoord; varying vec3 light_surf; varying vec3 eye_surf; varying vec3 tangent_surf; */ varying vec3 vertex_eye; varying vec4 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); shadow_coords = light_mvp * gl_Vertex; /* 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; */ }