mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-26 17:46:25 -05:00
parent
4d26f9bab4
commit
620b4d6141
2 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
archivesBaseName = "fabric-renderer-indigo"
|
archivesBaseName = "fabric-renderer-indigo"
|
||||||
version = getSubprojectVersion(project, "0.1.3")
|
version = getSubprojectVersion(project, "0.1.4")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class TerrainFallbackConsumer extends AbstractQuadRenderer implements Con
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderQuad(BakedQuad quad, Direction cullFace, Value defaultMaterial) {
|
private void renderQuad(BakedQuad quad, Direction cullFace, Value defaultMaterial) {
|
||||||
|
final MutableQuadViewImpl editorQuad = this.editorQuad;
|
||||||
System.arraycopy(quad.getVertexData(), 0, editorBuffer, 0, 28);
|
System.arraycopy(quad.getVertexData(), 0, editorBuffer, 0, 28);
|
||||||
editorQuad.cullFace(cullFace);
|
editorQuad.cullFace(cullFace);
|
||||||
final Direction lightFace = quad.getFace();
|
final Direction lightFace = quad.getFace();
|
||||||
|
@ -129,13 +130,12 @@ public class TerrainFallbackConsumer extends AbstractQuadRenderer implements Con
|
||||||
tesselateSmooth(editorQuad, blockInfo.defaultLayerIndex, editorQuad.colorIndex());
|
tesselateSmooth(editorQuad, blockInfo.defaultLayerIndex, editorQuad.colorIndex());
|
||||||
} else {
|
} else {
|
||||||
// vanilla compatibility hack
|
// vanilla compatibility hack
|
||||||
// For flat lighting, if cull face is set always use neighbor light.
|
// For flat lighting, cull face drives everything and light face is ignored.
|
||||||
// Otherwise still need to ensure geometry is updated before offsets are applied
|
|
||||||
if(cullFace == null) {
|
if(cullFace == null) {
|
||||||
editorQuad.invalidateShape();
|
editorQuad.geometryFlags(0);
|
||||||
editorQuad.geometryFlags();
|
|
||||||
} else {
|
} else {
|
||||||
editorQuad.geometryFlags(GeometryHelper.AXIS_ALIGNED_FLAG | GeometryHelper.LIGHT_FACE_FLAG);
|
editorQuad.geometryFlags(GeometryHelper.LIGHT_FACE_FLAG);
|
||||||
|
editorQuad.lightFace(cullFace);
|
||||||
}
|
}
|
||||||
chunkInfo.applyOffsets(editorQuad);
|
chunkInfo.applyOffsets(editorQuad);
|
||||||
tesselateFlat(editorQuad, blockInfo.defaultLayerIndex, editorQuad.colorIndex());
|
tesselateFlat(editorQuad, blockInfo.defaultLayerIndex, editorQuad.colorIndex());
|
||||||
|
|
Loading…
Reference in a new issue