Files
NeoForge/patches/com/mojang/blaze3d/vertex/VertexConsumer.java.patch
T
b160270bd5 Port to 26.3 (#3403)
Co-authored-by: XFactHD <[email protected]>
Co-authored-by: Technici4n <[email protected]>
Co-authored-by: sciwhiz12 <[email protected]>
Co-authored-by: Matyrobbrt <[email protected]>
Co-authored-by: Marc Hermans <[email protected]>
Co-authored-by: Sara Freimer <[email protected]>
2026-09-16 03:08:09 +08:00

26 lines
1.6 KiB
Diff

--- a/com/mojang/blaze3d/vertex/VertexConsumer.java
+++ b/com/mojang/blaze3d/vertex/VertexConsumer.java
@@ -62,7 +_,7 @@
for (int vertex = 0; vertex < 4; vertex++) {
Vector3fc pos = quad.position(vertex);
long packedUv = quad.packedUV(vertex);
- int vertexColor = instance.getColor(vertex);
+ int vertexColor = net.minecraft.util.ARGB.multiply(instance.getColor(vertex), quad.bakedColors().color(vertex)); // Neo: apply baked color from the quad
int light = instance.getLightCoordsWithEmission(vertex, lightEmission);
float u = UVPair.unpackU(packedUv);
float v = UVPair.unpackV(packedUv);
@@ -79,11 +_,12 @@
for (int vertex = 0; vertex < 4; vertex++) {
Vector3fc position = quad.position(vertex);
long packedUv = quad.packedUV(vertex);
- int vertexColor = instance.getColor(vertex);
+ int vertexColor = net.minecraft.util.ARGB.multiply(instance.getColor(vertex), quad.bakedColors().color(vertex)); // Neo: apply baked color from the quad
int light = instance.getLightCoordsWithEmission(vertex, lightEmission);
Vector3f pos = matrix.transformPosition(position, new Vector3f());
float u = UVPair.unpackU(packedUv);
float v = UVPair.unpackV(packedUv);
+ applyBakedNormals(normal, quad.bakedNormals(), vertex, pose.normal()); // Neo: apply baked normals from the quad
this.addVertex(pos.x(), pos.y(), pos.z(), vertexColor, u, v, instance.overlayCoords(), light, normal.x(), normal.y(), normal.z());
}
}