It’s a common problem with transparency, look for “transparency” in this forum. For eg:
- Transparency problems
- hasVertexAlpha causes problems when _unIndexed is used directly
- Have only certain meshes visibile through transparency?
In your case, you can make the small blocks always drawn after the water by setting the renderingGroupId
property:
https://www.babylonjs-playground.com/#1SLLOJ#1110
You can also have a look at this doc:
https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered