Render depth problem

我场景中的深度好像出了问题,可以直接渲染出被挡住的物体


The trees and walls in the back are supposed to be blocked, but the camera renders it directly

You can read this:
https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered

You may want to try:

  • Depth pre-pass
  • Do not use opacityTexture but instead diffuseTexture.hasAlpha