Adjust diffuse light calculation to match vanilla facing values (#4305)

This commit is contained in:
Ben Staddon 2017-12-17 02:26:20 +00:00 committed by LexManos
parent 9fdb79ae7a
commit 05c88d91d8
1 changed files with 1 additions and 4 deletions

View File

@ -35,12 +35,9 @@ import java.util.concurrent.ConcurrentMap;
public class LightUtil public class LightUtil
{ {
private static final float s2 = (float)Math.pow(2, .5);
public static float diffuseLight(float x, float y, float z) public static float diffuseLight(float x, float y, float z)
{ {
float y1 = y + 3 - 2 * s2; return x * x * 0.6f + y * y * ((3f + y) / 4f) + z * z * 0.8f;
return (x * x * 0.6f + (y1 * y1 * (3 + 2 * s2)) / 8 + z * z * 0.8f);
} }
public static float diffuseLight(EnumFacing side) public static float diffuseLight(EnumFacing side)