voxel-mesher
voxel-mesher copied to clipboard
Sort custom block meshes from furthest to nearest, mesh draw order
The custom block meshes are drawn in the order they are in the voxel array, but this may not always be the direction the player sees them. This causes discrepancies depending on the direction the blocks are viewed, for example with voxel-glass:
sorting the meshes in the correct order could fix this (but at the cost of added complexity; may or may not be worthwhile). See also:
http://stackoverflow.com/questions/3388294/opengl-question-about-the-usage-of-gldepthmask
https://github.com/deathcap/voxel-shader/issues/2