rendering: lighting: respect cullface (partly)

This commit is contained in:
Bixilon 2021-02-27 22:07:02 +01:00
parent ad14b73306
commit efd02d1593
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,6 @@ class BlockRenderer(data: JsonObject, parent: BlockModel) {
continue
}
// ToDo: Lightning is determined by cullface attribute
element.render(tintColor, position, lightAccessor, textureMapping, modelMatrix, direction, mesh)
}
}

View File

@ -58,10 +58,11 @@ class ElementRenderer(element: BlockModelElement, rotation: Vec3, uvLock: Boolea
val face = faces[realDirection] ?: return // Not our face
val texture = textureMapping[face.textureName] ?: TextureArray.DEBUG_TEXTURE
// if (texture.isTransparent) {
// return // ToDo: force render transparent faces
// }
val lightLevel = lightAccessor.getLightLevel(position + face.cullFace)
val lightLevel = lightAccessor.getLightLevel(position + face.cullFace) // ToDo: rotate cullface
val drawPositions = arrayOf(positions[positionTemplate[0]], positions[positionTemplate[1]], positions[positionTemplate[2]], positions[positionTemplate[3]])