With pipeline enabled, console shows error when entering XR

It doesn’t crash though, but it just has this error when the pipeline adding new cameras while entering XR mode. How to prevent it?

cc @RaananW (adding that he’s OOF so he won’t be able to see this immediately)

Just came back. i’ll look into that!

To avoid that only add the webXR camera right before the first frame is rendered.

I found an interesting issue with the onXRInit observable (when it comes to initializing the number of cameras needed for the XR scene), and this is why you need to wait for the moment right before the first scene is rendered. Issue can be seen here - https://playground.babylonjs.com/#8H7J9T#3
This is actually per design, so it’s not entirely a bug. I’ll see if I can find a fix that doesn’t break anything. I keep this assigned to me.

2 Likes

Quick note - this new observable can be used to solve this, afte thie PR is merged: [XR] a new on XR Camera initialized observable by RaananW · Pull Request #14231 · BabylonJS/Babylon.js (github.com)

2 Likes

Was hunting for this for a few hours. Meta Quest 3 without a renderingpipeline has artifacts on some edges, when applying the default rendering pipeline after the XR camera has been initialized with just image processing the artifacts go away. This solves the initialization of the pipeline!

1 Like