# Avoid shimmering / flickering effects on Quest 2 /3

**URL:** <https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871>\
**Category:** Questions\
**Created:** [July 7, 2024, 8:48am UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871 "2024-07-07T08:48:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank71](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@frank71](https://forum.babylonjs.com/u/frank71)\
**Post date:** [July 7, 2024, 8:48am UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/1 "2024-07-07T08:48:35Z")

</div>

I’m trying different scenes on VR, but I always experiment many artifacts…  
I’m using multiview: true - antialias:true and preserveDrawingBuffer: true, for the engine, but the final render scene presents always many shimmer effects along the corner of the objects or along the edges of the meshes…  
The scene presents many shimmering and flickering areas, very annoing…  
What can I do to avoid this effects?

Here an example with a grass field (Anyone can experiment the annoynig effect with a Oculus Quest or similar?):

[https://www.topspinseo.com/BabylonJs/grass/](https://www.topspinseo.com/BabylonJs/grass/)

Thanks to Roland for the code about the shader.  
Thanks to Joe\_kerr for another code and many hints.

---

<div class="post-metadata">

**Author:** ![ryantrem](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ryantrem/32/34010_2.png) [@ryantrem](https://forum.babylonjs.com/u/ryantrem)\
**Post date:** [July 12, 2024, 5:23pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/2 "2024-07-12T17:23:17Z")

</div>

@RaananW any ideas? Not sure if this is a Babylon issue or a Quest limitation or something else…

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 12, 2024, 5:53pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/3 "2024-07-12T17:53:50Z")

</div>

This is more of a headset limitation than a babylon issue. It is also a very “VR” issue - your head moves constantly. It wouldn’t shimmer if you wouldn’t always make small adjustments to your head’s position. It will probably be the same, if you hold the mouse on the desktop and slightly move it randomly.  
I wonder - is it the same if you don’t use multiview?

---

<div class="post-metadata">

**Author:** ![frank71](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@frank71](https://forum.babylonjs.com/u/frank71)\
**Post date:** [July 31, 2024, 9:45pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/4 "2024-07-31T21:45:48Z")

</div>

Hi RaananW , sorry for the late of my reply. Yes it seems the same with multiview. When I’ve tested this issue with Unreal Engine I noticed that it was less evident changing antialias settings.  
What about antialias with BabylonJs? Another thing: what about webgpu with WEBXR? I’ve tried to use thin instances but if I well understand WEBXR doesn’t support webgpu… so no advantadge in using such tools with webxr?

Thanks in advance  
Frank

---

<div class="post-metadata">

**Author:** ![riven04](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/riven04/32/35407_2.png) [@riven04](https://forum.babylonjs.com/u/riven04)\
**Post date:** [August 1, 2024, 1:09pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/5 "2024-08-01T13:09:22Z")

</div>

Did you check if this effect was on both eyes? I remember having the same issue with just the right eye, as if antialiasing was happening only on the left one. I had to manually apply antialias after the XR camera was recognized with an observable.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 2, 2024, 10:33am UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/6 "2024-08-02T10:33:25Z")

</div>

No WebGPU support in WebXR. There is an attempt to provide support ([GitHub - immersive-web/WebXR-WebGPU-Binding](https://github.com/immersive-web/WebXR-WebGPU-Binding)) but AFAIK no headset supports this. Never tested TBH.

About aliasing - babylon fully supports antialias, with the limitation of the headset and environment.

---

<div class="post-metadata">

**Author:** ![dsaffo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dsaffo/32/31907_2.png) [@dsaffo](https://forum.babylonjs.com/u/dsaffo)\
**Post date:** [August 2, 2024, 1:46pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/7 "2024-08-02T13:46:57Z")

</div>

FYI this seems to be gaining traction again as someone has proposed adding the topic to the agenda of the next meeting. If anyone wants to support this I would encourage attending : )

> <https://github.com/immersive-web/webxr/issues/1378>
>
> With WebGPU being adopted or already adopted by several browsers, it would be gr…eat to allow WebXR to target WebGPU as well.
> 
> There is a great explainer doc here https://github.com/immersive-web/WebXR-WebGPU-Binding/blob/main/explainer.md from @toji on WebGPU+WebXR bindings.
> 
> I would like to add an agenda item to the next meeting to discuss if we have any additional feedback to @toji 's document or if we can move that into a working draft specification.
> 
> /agenda proposal to discuss WebGPU+WebXR bindings

---

<div class="post-metadata">

**Author:** ![frank71](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@frank71](https://forum.babylonjs.com/u/frank71)\
**Post date:** [August 3, 2024, 10:38am UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/8 "2024-08-03T10:38:16Z")

</div>

So, at this moment, there are some advantages using instances and thin instances on Quest 2?  
And where I can find details on babylonjs antialias options working on Quest 2?  
Thanks

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 5, 2024, 12:52pm UTC](https://forum.babylonjs.com/t/avoid-shimmering-flickering-effects-on-quest-2-3/51871/9 "2024-08-05T12:52:57Z")

</div>

When initializing WebXRGLLayer you can pass an options object that defines antiaalias on/off:

> **[XRWebGLLayer: XRWebGLLayer() constructor - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer)**
>
> The WebXR Device API XRWebGLLayer() constructor creates and
> returns a new XRWebGLLayer object, providing the linkage between the
> WebXR device and the WebGL graphics layer used to render the 3D scene.

Babylon sets it to true per default: [Babylon.js/packages/dev/core/src/XR/webXRManagedOutputCanvas.ts at master · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/XR/webXRManagedOutputCanvas.ts#L36)
