voxel-mesher icon indicating copy to clipboard operation
voxel-mesher copied to clipboard

Sort custom block meshes from furthest to nearest, mesh draw order

Open deathcap opened this issue 10 years ago • 0 comments

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:

screen shot 2014-06-14 at 1 45 39 pm screen shot 2014-06-14 at 1 45 31 pm

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

deathcap avatar Jun 14 '14 21:06 deathcap