# In XR with a refraction texture and multiview enabled, the scene only renders scene.clearColor

**URL:** <https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450>\
**Category:** Bugs\
**Tags:** webxr, texture, rendering\
**Created:** [September 10, 2025, 4:00pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450 "2025-09-10T16:00:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmallen99](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hmallen99/32/39956_2.png) [@hmallen99](https://forum.babylonjs.com/u/hmallen99)\
**Post date:** [September 10, 2025, 4:00pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/1 "2025-09-10T16:00:42Z")

</div>

Hi folks,

I’m noticing a bug on Quest 3 that reproduces in v8.24.1 onwards. In this playground, I’ve created a minimal scenario where the scene does not render correctly with multiview enabled in WebXR: [https://playground.babylonjs.com/#9K3MRA#2001](https://playground.babylonjs.com/#9K3MRA#2001). The issue seems to result from the use of a refractionTexture on a PBRMaterial.

With multiview disabled, I see the ground plane as expected:

 ![com.oculus.vrshell-20250910-085204](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/6/b617b17545150454bba731f7e7b66281b0b99052.jpeg)

However, with multiview enabled, I don’t see anything other than the background:

 ![com.oculus.vrshell-20250910-084503](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/1/8153bd1c47f5161c7a8139087456200f4ba02aae.jpeg)

When adding more objects or a skybox to the scene, I still only see the purple background color.

I also tried manually disabling the extension oculus multiview extension in favor of the default multiview extension, and the visuals render in the left eye, but not the right eye.

Thanks for any help!

---

<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:** [September 10, 2025, 4:59pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/2 "2025-09-10T16:59:00Z")

</div>

cc @docEdub

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [September 11, 2025, 8:23pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/3 "2025-09-11T20:23:44Z")

</div>

I will investigate this next week.

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [September 22, 2025, 5:33pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/4 "2025-09-22T17:33:21Z")

</div>

I haven’t gotten to the bottom of this, yet, but I found setting the `projectionLayerInit: { clearOnAccess: false }` option works around the issue on my Quest 3.

[https://playground.babylonjs.com/#9K3MRA#2009](https://playground.babylonjs.com/#9K3MRA#2009)

Does that work for you?

---

<div class="post-metadata">

**Author:** ![hmallen99](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hmallen99/32/39956_2.png) [@hmallen99](https://forum.babylonjs.com/u/hmallen99)\
**Post date:** [September 22, 2025, 10:30pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/5 "2025-09-22T22:30:33Z")

</div>

That fixes the playground for me as well! Let me try to upgrade my app to the latest Babylon and see if that resolves the issue. Thanks!

---

<div class="post-metadata">

**Author:** ![hmallen99](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hmallen99/32/39956_2.png) [@hmallen99](https://forum.babylonjs.com/u/hmallen99)\
**Post date:** [September 22, 2025, 10:38pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/6 "2025-09-22T22:38:51Z")

</div>

Unfortunately, the issue still persists in my application with that parameter set to false. I’ll try to make a new playground that replicates my error more closely and see if that helps debug!

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [September 22, 2025, 11:40pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/7 "2025-09-22T23:40:23Z")

</div>

Ok, I’m still investigating, too. I got [Spector.js](https://spector.babylonjs.com/) working in headset, now, so hopefully I’ll be able to figure it out soon.

---

<div class="post-metadata">

**Author:** ![hmallen99](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hmallen99/32/39956_2.png) [@hmallen99](https://forum.babylonjs.com/u/hmallen99)\
**Post date:** [September 24, 2025, 5:40pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/9 "2025-09-24T17:40:52Z")

</div>

I’ve also been able to replicate it in a playground with clearOnAccess: false set in the projectionLayerInit: [https://playground.babylonjs.com/#9K3MRA#2052](https://playground.babylonjs.com/#9K3MRA#2052)

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [September 26, 2025, 7:52pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/10 "2025-09-26T19:52:34Z")

</div>

Ya, same here. There was a mistake in the PG I posted that commented out the refraction texture.

I’ve been investigating the issue this week and it looks like the view projection uniforms are not being set correctly for RTTs when multiview is enabled. I’m currently exploring options for a fix.

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [October 20, 2025, 8:44pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/11 "2025-10-20T20:44:00Z")

</div>

I have a pretty good idea on how to fix this. I just need to carve out some time to implement and test it. Hopefully later this week.

---

<div class="post-metadata">

**Author:** ![matthargett](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthargett/32/32743_2.png) [@matthargett](https://forum.babylonjs.com/u/matthargett)\
**Post date:** [October 30, 2025, 5:25pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/12 "2025-10-30T17:25:49Z")

</div>

Hey Andrew! This bug is blocking us from upgrading BabylonJS to get bug fixes, which is blocking us from publishing a release that includes those other fixes to users. Do you have an ETA?

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [October 30, 2025, 6:42pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/13 "2025-10-30T18:42:14Z")

</div>

Ya, this is still on my radar. What version of BabylonJS are you on now that you’re upgrading from?

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [October 30, 2025, 11:49pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/14 "2025-10-30T23:49:45Z")

</div>

Assigned @docEdub on October 30, 2025, 11:49pm UTC



---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [October 31, 2025, 5:36pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/15 "2025-10-31T17:36:32Z")

</div>

I’m looking into this further but RenderDoc is not working on my Quest 3 anymore, so it’s slow going.

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [October 31, 2025, 5:39pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/16 "2025-10-31T17:39:03Z")

</div>

It would be helpful to know which old version of Babylon.js you have multiview working on with a refraction texture. I have not seen any version of Babylon.js working with multiview and refraction, yet, but it sounds like you have this working in an old version. Which version is it?

---

<div class="post-metadata">

**Author:** ![matthargett](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthargett/32/32743_2.png) [@matthargett](https://forum.babylonjs.com/u/matthargett)\
**Post date:** [November 1, 2025, 11:23pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/17 "2025-11-01T23:23:41Z")

</div>

8.24 was the last version where these features worked together (in our testing) on Quest 2, Quest 3, Snap Spectacles (snapOS 2.0) and Samsung Galaxy XR

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [November 3, 2025, 2:47pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/18 "2025-11-03T14:47:29Z")

</div>

Ok, thanks. I think I found the commit that causes the issue, but I don’t know if it’s a regression or not, yet, because the given repro doesn’t work in my Quest 3 for version 8.24.0.

Can you confirm the playground provided to repro this issue works for you with version 8.24.0 by going to the following link in headset and entering immersive mode?

[https://playground.babylonjs.com/?version=8.24.0#9K3MRA#2001](https://playground.babylonjs.com/?version=8.24.0#9K3MRA#2001)

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [November 3, 2025, 8:24pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/19 "2025-11-03T20:24:23Z")

</div>

Try this PR: [Fix WebXR multiview regression by docEdub · Pull Request #17385 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/17385) and let me know if it fixes the multiview issue you’re seeing.

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [November 14, 2025, 1:54pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/20 "2025-11-14T13:54:21Z")

</div>

Unassigned @docEdub on November 14, 2025, 1:54pm UTC



---

<div class="post-metadata">

**Author:** ![matthargett](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthargett/32/32743_2.png) [@matthargett](https://forum.babylonjs.com/u/matthargett)\
**Post date:** [February 10, 2026, 10:06pm UTC](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450/21 "2026-02-10T22:06:03Z")

</div>

Sorry it took so long for me to get back to this!

Since you withdrew the fix, I suspect you agree with what we thought: regressing new functionality to bring this fix in didn’t feel great. I’ve put up a pull request that generally aligns most/all RTTs to avoid stereo/mono pollution while keeping the new features.

> <https://github.com/BabylonJS/Babylon.js/pull/17864>
>
> This fixes visual artifact regressions in our WebXR app on multiples devices, it… supercedes #17385 by @docEdub .
> 
> Scene UBOs could get the wrong layout (mono vs multiview) because createSceneUniformBuffer() is monkey-patched to return multiview UBOs whenever \_multiviewSceneUbo exists. RTTs like shadow maps, reflection probes, and mirrors always render mono but were receiving multiview UBOs during XR sessions, causing visual artifacts in stereo.
> 
> Added a TODO comment for multiview-aware depth peeling, which I'm pretty sure it the cause of the transparency artifacts in our WebXR app. It's not technically part of the original forum post report, so I'm leaving it for a separate PR.

[Next page](https://forum.babylonjs.com/t/in-xr-with-a-refraction-texture-and-multiview-enabled-the-scene-only-renders-scene-clearcolor/60450.md?page=2)
