diff options
Diffstat (limited to 'progs/glsl/shadowtex.frag')
-rw-r--r-- | progs/glsl/shadowtex.frag | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/progs/glsl/shadowtex.frag b/progs/glsl/shadowtex.frag deleted file mode 100644 index a6a80da47f2..00000000000 --- a/progs/glsl/shadowtex.frag +++ /dev/null @@ -1,21 +0,0 @@ -// Fragment shader for 2D texture with shadow attenuation -// Brian Paul - - -uniform sampler2D tex2d; -uniform vec3 lightPos; - -void main() -{ - // XXX should compute this from lightPos - vec2 shadowCenter = vec2(-0.25, -0.25); - - // d = distance from center - float d = distance(gl_TexCoord[0].xy, shadowCenter); - - // attenuate and clamp - d = clamp(d * d * d, 0.0, 2.0); - - // modulate texture by d for shadow effect - gl_FragColor = d * texture2D(tex2d, gl_TexCoord[0].xy, 0.0); -} |