redef var vertex_shader_source = """
// Vertex coordinates
attribute vec4 coord;
// Vertex translation
uniform vec4 translation;
// Vertex scaling
uniform float scale;
// Vertex coordinates on textures
attribute vec2 tex_coord;
// Vertex normal
attribute vec3 normal;
// Model view projection matrix
uniform mat4 mvp;
// Rotation matrix
uniform mat4 rotation;
// Output for the fragment shader
varying vec2 v_tex_coord;
void main()
{
vec4 pos = (vec4(coord.xyz * scale, 1.0) * rotation + translation);
gl_Position = pos * mvp;
// Pass varyings to the fragment shader
v_tex_coord = vec2(tex_coord.x, 1.0 - tex_coord.y);
}
""" @ glsl_vertex_shader
lib/gamnit/depth/shadow.nit:348,2--381,26