From 751420af7d6c6cc1185d416a48ef803f5e45db4d Mon Sep 17 00:00:00 2001 From: covers1624 Date: Sat, 2 Mar 2024 16:13:06 +1030 Subject: [PATCH] Remove hack from LightCoordAttribute. You can't translate to world space via a model transform. --- .../lib/render/pipeline/attribute/LightCoordAttribute.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/codechicken/lib/render/pipeline/attribute/LightCoordAttribute.java b/src/main/java/codechicken/lib/render/pipeline/attribute/LightCoordAttribute.java index d8135cda..2380d8b5 100644 --- a/src/main/java/codechicken/lib/render/pipeline/attribute/LightCoordAttribute.java +++ b/src/main/java/codechicken/lib/render/pipeline/attribute/LightCoordAttribute.java @@ -14,7 +14,6 @@ public class LightCoordAttribute extends VertexAttribute { public static final AttributeKey attributeKey = AttributeKey.create("light_coord", LC[]::new); private final Vector3 vec = new Vector3();//for computation - private final Vector3 pos = new Vector3(); private LC[] lcRef; @@ -29,7 +28,6 @@ public boolean load(CCRenderState ccrs) { return lcRef != null; } - pos.set(ccrs.lightMatrix.pos); ccrs.pipeline.addDependency(ccrs.sideAttrib); ccrs.pipeline.addRequirement(Transformation.operationIndex); return true; @@ -40,7 +38,7 @@ public void operate(CCRenderState ccrs) { if (lcRef != null) { ccrs.lc.set(lcRef[ccrs.vertexIndex]); } else { - ccrs.lc.compute(vec.set(ccrs.vert.vec).subtract(pos), ccrs.side); + ccrs.lc.compute(vec.set(ccrs.vert.vec), ccrs.side); } } }