From b8db45fc7cbb1e5ff7ac3495c6f1668519870674 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 31 May 2015 20:31:12 +0200 Subject: [PATCH] Reenabled bias calculation depeding on distance. --- data/shader/phong.fsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/shader/phong.fsh b/data/shader/phong.fsh index 585c2ec..47129fb 100644 --- a/data/shader/phong.fsh +++ b/data/shader/phong.fsh @@ -177,7 +177,7 @@ float samplePointShadow(samplerCubeShadow shadowMap, vec3 lightDirection, float float compValue = 0.5*(-A*length(lightDirection) + B)/length(lightDirection) + 0.5; float bias = 0.001*tan(acos(clamp(dot(vNormal, normalize(lightDirection)), 0.0, 1.0))); bias = clamp(bias, 0.0, 0.001); - //bias *= 1/length(lightDirection)*8; + bias *= 1/length(lightDirection)*8; for (int i=0; i<4; i++) { visibility -= intensity/16*(1.0-texture(shadowMap, vec4(lightDirection + poissonDisk3D[i]/stretching, compValue - bias))); }