Reduce margin a little

This commit is contained in:
Magnus Norddahl 2017-03-08 00:33:42 +01:00
parent 6df3b3fbca
commit 818b72fbf5

View file

@ -158,7 +158,7 @@ float shadowmapAttenuation(vec4 lightpos, float shadowIndex)
else
u = dir.x / dir.y * 0.125 + (0.50 + 0.125);
}
dir -= sign(dir) * 5.0; // margin, to remove wall acne
dir -= sign(dir) * 2.0; // margin, to remove wall acne
float dist2 = dot(dir, dir);
return texture(ShadowMap, vec2(u, v)).x > dist2 ? 1.0 : 0.0;
}