# Clipping issues with GLTF

**URL:** <https://forum.babylonjs.com/t/clipping-issues-with-gltf/28405>\
**Category:** Questions\
**Created:** [March 14, 2022, 2:34am UTC](https://forum.babylonjs.com/t/clipping-issues-with-gltf/28405 "2022-03-14T02:34:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomitrescak](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tomitrescak/32/22829_2.png) [@tomitrescak](https://forum.babylonjs.com/u/tomitrescak)\
**Post date:** [March 14, 2022, 2:34am UTC](https://forum.babylonjs.com/t/clipping-issues-with-gltf/28405/1 "2022-03-14T02:34:56Z")

</div>

When I visualise GLB model in Babylon, I get all kinds of issues with faces hiding or popping out through other faces. I tried Three.js based online viewers and everything seems fine.

I remember that in Three.js there was a flag which I had to set to do extra processing step, but I do not remeber which one it was.

Here is what I’m seeing:

![Screen Shot 2022-03-14 at 1.24.31 pm](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/b/ab2f92150b933cd6f4592270ca08d25599a61a06.png)

Here is the file:

[https://easyupload.io/2yb3kn](https://easyupload.io/2yb3kn)

---

<div class="post-metadata">

**Author:** ![tomitrescak](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tomitrescak/32/22829_2.png) [@tomitrescak](https://forum.babylonjs.com/u/tomitrescak)\
**Post date:** [March 14, 2022, 7:43am UTC](https://forum.babylonjs.com/t/clipping-issues-with-gltf/28405/2 "2022-03-14T07:43:29Z")

</div>

SOLVED: the solution to these clipping issues is to set the depthPrepass on the material.

```auto
BABYLON.SceneLoader.ImportMesh("", "/", "tile_1.glb", scene, function (m) {
      m.forEach((mesh) => {
        if (mesh.material) {
          mesh.material.needDepthPrePass = true;
        }
      });
    });

```
