-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
From mikolalysenko in #2:
When rendering the world you need to do 2 passes:
- First draw all opaque/transparent voxels without using any blending and with the depthMask enabled.
- Then disable depthMask (but keep the depthTest on!), turn on blending and draw all transparent faces.
or http://stackoverflow.com/questions/3388294/opengl-question-about-the-usage-of-gldepthmask, similar process:
- Turn on the depth mask glDepthMask( GL_TRUE )
- Draw all opaque objects, in any order
- Turn off the depth mask glDepthMask( GL_FALSE )
- Turn on a BLEND_MODE
- Draw translucent objects sorted from furthest away to nearest
Currently, voxel-shader draws all opaque/transparent objects first, then translucent objects with blending enabled. However, the meshes are not sorted (voxel/voxel-mesher#9) and the depth mask is not enabled or disabled (this issue, GH-8).
Metadata
Metadata
Assignees
Labels
No labels