Prevent stopping depth scanning too early when handling transparent nodes.

This commit is contained in:
Sascha L. Teichmann 2014-10-26 20:39:53 +01:00
parent 8452a26fcd
commit b8bae923ec

View File

@ -224,12 +224,13 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) {
if currentY < blockY {
for y := 15; y >= 0; y-- {
if c, ok := db.Content(x, y, z); ok {
currentY = blockY + int32(y)
cY := blockY + int32(y)
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 {
r.cBuffer[ofs] = c
currentY = cY
yB[ofs] = currentY
break
}