Issue in transparency

from the above screenshot you can see, the water z-index is over the leaf this should not be there basically there should be water visible between the gaps of the different leaves. So I have this glb where plants are instances and has transparent textures and it causes the issue where some meshes (especially the meshes with transparency) are getting rendered above the plant even though they are behind. I tried setting forceDepthWrite to true on plant mesh and it kinda helped but it still has issue and isn’t perfect.

Have you tried adjusting the alphaIndex of the water mesh? It probably helps

https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering#alpha-index

2 Likes