The engine appears to have no support for textures with transparent pixels. First they just displayed as black cubes. I got transparency to work by making a simple modification to the chunk shader and adding alpha support.
Now it causes huge glitches, culling blocks behind itself:

Apparently, opaque and transparent blocks should be rendered separately and transparent blocks shouldn't affect depth. But I couldn't find a way to determine if a block being rendered is transparent. Is it possible to implement adequate transparency handling without significant changes to the entire rendering logic?
The engine appears to have no support for textures with transparent pixels. First they just displayed as black cubes. I got transparency to work by making a simple modification to the chunk shader and adding alpha support.
Now it causes huge glitches, culling blocks behind itself:
Apparently, opaque and transparent blocks should be rendered separately and transparent blocks shouldn't affect depth. But I couldn't find a way to determine if a block being rendered is transparent. Is it possible to implement adequate transparency handling without significant changes to the entire rendering logic?