From 05c88d91d80d35e68e24c94bad55285872fd02b7 Mon Sep 17 00:00:00 2001 From: Ben Staddon Date: Sun, 17 Dec 2017 02:26:20 +0000 Subject: [PATCH] Adjust diffuse light calculation to match vanilla facing values (#4305) --- .../net/minecraftforge/client/model/pipeline/LightUtil.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java b/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java index 21bf325758..f46201d4d9 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/LightUtil.java @@ -35,12 +35,9 @@ import java.util.concurrent.ConcurrentMap; public class LightUtil { - private static final float s2 = (float)Math.pow(2, .5); - public static float diffuseLight(float x, float y, float z) { - float y1 = y + 3 - 2 * s2; - return (x * x * 0.6f + (y1 * y1 * (3 + 2 * s2)) / 8 + z * z * 0.8f); + return x * x * 0.6f + y * y * ((3f + y) / 4f) + z * z * 0.8f; } public static float diffuseLight(EnumFacing side)