# Render depth problem

**URL:** <https://forum.babylonjs.com/t/render-depth-problem/3064>\
**Category:** Questions\
**Created:** [May 8, 2019, 1:28pm UTC](https://forum.babylonjs.com/t/render-depth-problem/3064 "2019-05-08T13:28:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ranwei-001](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ranwei-001/32/1656_2.png) [@ranwei-001](https://forum.babylonjs.com/u/ranwei-001)\
**Post date:** [May 8, 2019, 1:28pm UTC](https://forum.babylonjs.com/t/render-depth-problem/3064/1 "2019-05-08T13:28:44Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/5/5ade68002d10c89aac05f865581327a6e6ae8cea.jpeg)  
The trees and walls in the back are supposed to be blocked, but the camera renders it directly

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 8, 2019, 4:12pm UTC](https://forum.babylonjs.com/t/render-depth-problem/3064/2 "2019-05-08T16:12:17Z")

</div>

You can read this:  
[https://doc.babylonjs.com/resources/transparency\_and\_how\_meshes\_are\_rendered](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
