diff --git a/src/main/java/net/vulkanmod/render/chunk/build/frapi/helper/NormalHelper.java b/src/main/java/net/vulkanmod/render/chunk/build/frapi/helper/NormalHelper.java index 280ac96b1..bf6deebb7 100644 --- a/src/main/java/net/vulkanmod/render/chunk/build/frapi/helper/NormalHelper.java +++ b/src/main/java/net/vulkanmod/render/chunk/build/frapi/helper/NormalHelper.java @@ -188,4 +188,8 @@ public static int packedNormalFromDirection(Direction direction) { return I32_SNorm.packNormal(normal.getX(), normal.getY(), normal.getZ()); } + + public static void unpackNormalTo(int packedNormal, Vector3f normal) { + normal.set(I32_SNorm.unpackX(packedNormal), I32_SNorm.unpackY(packedNormal), I32_SNorm.unpackZ(packedNormal)); + } } diff --git a/src/main/java/net/vulkanmod/render/chunk/build/frapi/mesh/MutableQuadViewImpl.java b/src/main/java/net/vulkanmod/render/chunk/build/frapi/mesh/MutableQuadViewImpl.java index 297d573ae..6c83814bd 100644 --- a/src/main/java/net/vulkanmod/render/chunk/build/frapi/mesh/MutableQuadViewImpl.java +++ b/src/main/java/net/vulkanmod/render/chunk/build/frapi/mesh/MutableQuadViewImpl.java @@ -200,6 +200,7 @@ public final MutableQuadViewImpl fromVanilla(BakedQuad quad, RenderMaterial mate ModelQuadView quadView = (ModelQuadView) quad; int normal = quadView.getNormal(); data[baseIndex + HEADER_FACE_NORMAL] = normal; + NormalHelper.unpackNormalTo(normal, faceNormal); Direction lightFace = quadView.lightFace(); data[baseIndex + HEADER_BITS] = EncodingFormat.lightFace(data[baseIndex + HEADER_BITS], lightFace);