mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
rendering: don't force draw transparent faces
This commit is contained in:
parent
ef990159e7
commit
6ab06cbdfd
@ -141,11 +141,6 @@ class BlockRenderer : BlockRenderInterface {
|
|||||||
var drawElementFace = true
|
var drawElementFace = true
|
||||||
|
|
||||||
neighbourFaceSize?.let {
|
neighbourFaceSize?.let {
|
||||||
// force draw transparent faces
|
|
||||||
if (transparentFaces[direction.ordinal] || isNeighbourTransparent) {
|
|
||||||
return@let
|
|
||||||
}
|
|
||||||
|
|
||||||
val elementFaceBorderSize = element.faceBorderSize[rotatedDirection.ordinal] ?: return@let
|
val elementFaceBorderSize = element.faceBorderSize[rotatedDirection.ordinal] ?: return@let
|
||||||
for (size in it) {
|
for (size in it) {
|
||||||
if (elementFaceBorderSize.start.x < size.start.x || elementFaceBorderSize.start.y < size.start.y) {
|
if (elementFaceBorderSize.start.x < size.start.x || elementFaceBorderSize.start.y < size.start.y) {
|
||||||
@ -158,6 +153,15 @@ class BlockRenderer : BlockRenderInterface {
|
|||||||
drawElementFace = false
|
drawElementFace = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!drawElementFace) {
|
||||||
|
// force draw transparent faces
|
||||||
|
if (isNeighbourTransparent && !transparentFaces[direction.ordinal]) {
|
||||||
|
drawElementFace = true
|
||||||
|
} else if (isNeighbourTransparent && transparentFaces[direction.ordinal] && neighbourBlock != blockState) {
|
||||||
|
drawElementFace = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!drawElementFace) {
|
if (!drawElementFace) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user