mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-26 17:46:25 -05:00
Apply face culling consistently in mesh consumer (#216)
This commit is contained in:
parent
144f81d241
commit
4076d79a11
2 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
archivesBaseName = "fabric-renderer-indigo"
|
archivesBaseName = "fabric-renderer-indigo"
|
||||||
version = getSubprojectVersion(project, "0.1.1")
|
version = getSubprojectVersion(project, "0.1.2")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||||
|
|
|
@ -57,9 +57,7 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen
|
||||||
// only used via RenderContext.getEmitter()
|
// only used via RenderContext.getEmitter()
|
||||||
@Override
|
@Override
|
||||||
public Maker emit() {
|
public Maker emit() {
|
||||||
if(blockInfo.shouldDrawFace(this.cullFace())) {
|
|
||||||
renderQuad(this);
|
renderQuad(this);
|
||||||
}
|
|
||||||
clear();
|
clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -93,6 +91,10 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!blockInfo.shouldDrawFace(q.cullFace())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final RenderMaterialImpl.Value mat = q.material();
|
final RenderMaterialImpl.Value mat = q.material();
|
||||||
final int textureCount = mat.spriteDepth();
|
final int textureCount = mat.spriteDepth();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue