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

This commit is contained in:
Ben Staddon authored and mezz committed 2018-05-31 22:35:02 -07:00
1 parent bea02348e2
commit d9a042c775
1 file changed
+1 -1
@@ -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)