Skip to content

Commit 5d3d7a1

Browse files
committed
Fix critical entity rendering bug
1 parent cc59f5e commit 5d3d7a1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/net/irisshaders/iris/mixin/vertices/MixinBufferBuilder.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,17 @@ private void injectMidBlock(float x, float y, float z, CallbackInfoReturnable<Ve
160160
this.elementsToFill = this.elementsToFill & ~IrisVertexFormats.MID_TEXTURE_ELEMENT.mask();
161161
this.elementsToFill = this.elementsToFill & ~IrisVertexFormats.TANGENT_ELEMENT.mask();
162162

163+
if (injectNormalAndUV1 && this.elementsToFill != (this.elementsToFill & ~VertexFormatElement.NORMAL.mask())) {
164+
this.setNormal(0, 0, 0);
165+
}
166+
163167
if (skipEndVertexOnce) {
164168
skipEndVertexOnce = false;
165169
return;
166170
}
167171

168-
169172
vertexPointers[iris$vertexCount] = vertexPointer;
170173

171-
if (injectNormalAndUV1 && this.elementsToFill != (this.elementsToFill & ~VertexFormatElement.NORMAL.mask())) {
172-
this.setNormal(0, 0, 0);
173-
}
174-
175174
iris$vertexCount++;
176175

177176
if (mode == VertexFormat.Mode.QUADS && iris$vertexCount == 4 || mode == VertexFormat.Mode.TRIANGLES && iris$vertexCount == 3) {

0 commit comments

Comments
 (0)