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

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. The issue seems to result from the use of a refractionTexture on a PBRMaterial.

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

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

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!

1 Like

cc @docEdub

I will investigate this next week.

1 Like

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

Does that work for you?

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!

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!

Ok, I’m still investigating, too. I got Spector.js working in headset, now, so hopefully I’ll be able to figure it out soon.

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

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.

2 Likes