[require] GLSL >= 1.10 [vertex shader] varying vec4 texcoords; void main() { gl_Position = gl_Vertex; texcoords = (gl_Vertex + 1.0) / 2.0; } [fragment shader] varying vec4 texcoords; uniform sampler2DShadow tex; void main() { gl_FragColor = shadow2D(tex, texcoords.xyy); } [test] uniform int tex 0 texture shadow 0 (32, 32) draw rect -1 -1 2 2 relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0) relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0) relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0) relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0) relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0) relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)