Fix black flickering on animated models by clamping max diffuse lighting multiplier to 1.0 (#4962)
This commit is contained in:
parent
bea02348e2
commit
d9a042c775
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ public class LightUtil
|
||||||
{
|
{
|
||||||
public static float diffuseLight(float x, float y, float z)
|
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)
|
public static float diffuseLight(EnumFacing side)
|
||||||
|
|
Loading…
Reference in a new issue