Fix black flickering on animated models by clamping max diffuse lighting multiplier to 1.0 (#4962)

This commit is contained in:
Ben Staddon 2018-06-01 06:35:02 +01:00 committed by mezz
parent bea02348e2
commit d9a042c775
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class LightUtil
{
public static float diffuseLight(float x, float y, float z)
{
return x * x * 0.6f + y * y * ((3f + y) / 4f) + z * z * 0.8f;
return Math.min(x * x * 0.6f + y * y * ((3f + y) / 4f) + z * z * 0.8f, 1f);
}
public static float diffuseLight(EnumFacing side)