Hello Babylon community,
I run into an issue with rendering custom shapes, some faces in the back are drawn in front of the faces which are closer from the camera.
I can fix this issue by adding a material and set the property “needDepthPrePass” to true but this cause some serious drop down on FPS side.
Or by set the mesh property “hasVertexAlpha” to false with does not affect the FPS but in my case I need to set it to true.
Here we can see the issue:
Here we can see a proper rendering with “hasVertexAlpha” set to false:
And here you can find a playground that reproduce the issue
PS: to see the rendering as I expect, set:
- “mat1.needDepthPrePass = false;” to true (line 21)
- or “shapeInScene.hasVertexAlpha = true” to false (line 57)