X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=shaderlib%2Fshadow.glsl;h=65b003f43bcdef2295678d88624d45a5ed7089d2;hp=04cf6832dcffd19a6a4949c1049b98e0f2b64a40;hb=d4b030f46c3a643e813cf31e3faa2b4f3662a160;hpb=641e5ebbda682a6df6f84a4627e3728dbcef3683 diff --git a/shaderlib/shadow.glsl b/shaderlib/shadow.glsl index 04cf6832..65b003f4 100644 --- a/shaderlib/shadow.glsl +++ b/shaderlib/shadow.glsl @@ -21,7 +21,7 @@ virtual float get_shadow_factor(int index) { if(use_shadow_map) { - if(shadow_coord.x<0 || shadow_coord.x>1 || shadow_coord.y<0 || shadow_coord.y>1) + if(index>0 || shadow_coord.x<0 || shadow_coord.x>1 || shadow_coord.y<0 || shadow_coord.y>1) return 1.0; float shadow_sample = texture(shadow_map, shadow_coord); return mix(1.0, shadow_sample, shadow_darkness);