# Meshes Flickering

**URL:** <https://forum.babylonjs.com/t/meshes-flickering/34833>\
**Category:** Questions\
**Tags:** material\
**Created:** [October 15, 2022, 3:08pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833 "2022-10-15T15:08:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mynkjain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mynkjain/32/25579_2.png) [@mynkjain](https://forum.babylonjs.com/u/mynkjain)\
**Post date:** [October 15, 2022, 3:08pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/1 "2022-10-15T15:08:34Z")

</div>

Meshes Flickering in below scenarios:-  
1-\> zoom-in/out  
2-\> Upon scene.render()

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/7/f7aa98fc429ec77aa36a8d615ea4038267b27245.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/7/f7aa98fc429ec77aa36a8d615ea4038267b27245.mp4)

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [October 15, 2022, 4:59pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/2 "2022-10-15T16:59:17Z")

</div>

Not possible to understand the reason for flickering from such limited information. Z fighting???

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 16, 2022, 8:15am UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/3 "2022-10-16T08:15:56Z")

</div>

> [@JohnK](#):
>
> Z fighting

Very likely since it seems to be related to the zoom (depth) of the camera.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 17, 2022, 1:19pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/4 "2022-10-17T13:19:15Z")

</div>

you should adapt your camera near and far values to closely match your scene

---

<div class="post-metadata">

**Author:** ![mynkjain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mynkjain/32/25579_2.png) [@mynkjain](https://forum.babylonjs.com/u/mynkjain)\
**Post date:** [October 18, 2022, 8:36am UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/5 "2022-10-18T08:36:51Z")

</div>

Happening when I zoom out (larger zoom out values)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 18, 2022, 3:26pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/6 "2022-10-18T15:26:07Z")

</div>

yup which confirms the z fighting issue that could be resolved by setting setting your camera near and far plane value in a lot of cases.

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 18, 2022, 7:05pm UTC](https://forum.babylonjs.com/t/meshes-flickering/34833/7 "2022-10-18T19:05:50Z")

</div>

I believe in your case an alternate solution could be to work the zOffset on the material itself. Worth giving it a try anyway, I suppose.
