From 4076d79a11c929322b60f45d2535d0f2c22214d5 Mon Sep 17 00:00:00 2001 From: grondag Date: Mon, 27 May 2019 06:55:27 +0200 Subject: [PATCH] Apply face culling consistently in mesh consumer (#216) --- fabric-renderer-indigo/build.gradle | 2 +- .../indigo/renderer/render/AbstractMeshConsumer.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fabric-renderer-indigo/build.gradle b/fabric-renderer-indigo/build.gradle index 06ba3b7ca..f827dc167 100644 --- a/fabric-renderer-indigo/build.gradle +++ b/fabric-renderer-indigo/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-renderer-indigo" -version = getSubprojectVersion(project, "0.1.1") +version = getSubprojectVersion(project, "0.1.2") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/AbstractMeshConsumer.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/AbstractMeshConsumer.java index f29b70546..276f43808 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/AbstractMeshConsumer.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/AbstractMeshConsumer.java @@ -57,9 +57,7 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen // only used via RenderContext.getEmitter() @Override public Maker emit() { - if(blockInfo.shouldDrawFace(this.cullFace())) { - renderQuad(this); - } + renderQuad(this); clear(); return this; } @@ -92,6 +90,10 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen if(!transform.transform(editorQuad)) { return; } + + if(!blockInfo.shouldDrawFace(q.cullFace())) { + return; + } final RenderMaterialImpl.Value mat = q.material(); final int textureCount = mat.spriteDepth();