mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
rendering: lighting: respect cullface (partly)
This commit is contained in:
parent
ad14b73306
commit
efd02d1593
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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]])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user