Fix for shadow acne in chocolate.

This commit is contained in:
vlj 2014-04-20 02:20:09 +02:00
parent 87248b46f3
commit e8b36f2490

View File

@ -53,7 +53,7 @@ float getShadowFactor(vec3 pos, float bias, int index)
float sum = 0.;
for (int i = 0; i < 4; i++)
{
sum += texture(shadowtex, vec4(shadowtexcoord + shadowoffset[i] / 2048., float(index), 0.5 * (shadowcoord.z + bias * 0.001) + 0.5));
sum += texture(shadowtex, vec4(shadowtexcoord + shadowoffset[i] / 2048., float(index), 0.5 * (shadowcoord.z - bias * 0.01) + 0.5));
}
return sum / 4.;
}