mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 23:58:02 -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;
|
||||||
}
|
}
|
||||||
|
@ -92,6 +90,10 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen
|
||||||
if(!transform.transform(editorQuad)) {
|
if(!transform.transform(editorQuad)) {
|
||||||
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