Skip to content

Commit

Permalink
0.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jun 13, 2024
1 parent 8d9a6c8 commit 836ea74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private static void renderShadowPart(PoseStack.Pose matrices, VertexBufferWriter
var matPosition = matrices.pose();

var color = ColorABGR.withAlpha(SHADOW_COLOR, alpha);
var normal = MatrixHelper.transformNormal(matNormal, Direction.UP);
var normal = MatrixHelper.transformNormal(matNormal, true, Direction.UP);

try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * ModelVertex.STRIDE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ private static void redirect2(VertexBufferWriter writer, PoseStack.Pose matrices
* @reason Rewrite
*/
@Overwrite
public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose matrices, ModelQuadView quad, float r, float g, float b, float[] brightnessTable, boolean colorize, int[] light, int overlay) {
public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose matrices, ModelQuadView quad, float r, float g, float b, float a, float[] brightnessTable, boolean colorize, int[] light, int overlay) {
Matrix3f matNormal = matrices.normal();
Matrix4f matPosition = matrices.pose();
MemoryStack stack = MemoryStack.stackPush();

try {
long buffer = stack.nmalloc(144);
long ptr = buffer;
int normal = MatrixHelper.transformNormal(matNormal, quad.getLightFace());
int normal = MatrixHelper.transformNormal(matNormal, true, quad.getLightFace());

for (int i = 0; i < 4; ++i) {
float x = quad.getX(i);
Expand Down Expand Up @@ -71,7 +71,7 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m
fB = brightness * b;
}

color = ColorABGR.pack(fR, fG, fB, 1.0F);
color = ColorABGR.pack(fR, fG, fB, a);
ModelVertex.write(ptr, xt, yt, zt, color, quad.getTexU(i), quad.getTexV(i), overlay, light[i], normal);
ptr += 36L;
}
Expand Down

0 comments on commit 836ea74

Please sign in to comment.