mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-16 23:30:20 +01:00
Prevent stopping depth scanning too early when handling transparent nodes.
This commit is contained in:
parent
8452a26fcd
commit
b8bae923ec
|
@ -224,12 +224,13 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) {
|
||||||
if currentY < blockY {
|
if currentY < blockY {
|
||||||
for y := 15; y >= 0; y-- {
|
for y := 15; y >= 0; y-- {
|
||||||
if c, ok := db.Content(x, y, z); ok {
|
if c, ok := db.Content(x, y, z); ok {
|
||||||
currentY = blockY + int32(y)
|
cY := blockY + int32(y)
|
||||||
|
|
||||||
if colors.IsTransparent(c) {
|
if colors.IsTransparent(c) {
|
||||||
r.tBuffer[ofs] = r.spans.Insert(r.tBuffer[ofs], currentY, c)
|
r.tBuffer[ofs] = r.spans.Insert(r.tBuffer[ofs], cY, c)
|
||||||
} else {
|
} else {
|
||||||
r.cBuffer[ofs] = c
|
r.cBuffer[ofs] = c
|
||||||
|
currentY = cY
|
||||||
yB[ofs] = currentY
|
yB[ofs] = currentY
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user