1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
[require] GLSL >= 1.20 [fragment shader] uniform sampler2D shadow_sampler; varying vec2 texcoord; void main() { gl_FragColor = texture2D(shadow_sampler, texcoord); } [vertex shader] #version 120 varying vec2 texcoord; void main() { gl_Position = gl_Vertex; texcoord = (gl_Vertex.xy + vec2(1, 1)) / 2.0; }