mirror of
https://github.com/neoforged/NeoForge.git
synced 2026-10-12 02:19:42 +00:00
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]>
26 lines
1.6 KiB
Diff
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());
|
|
}
|
|
}
|