[XR] Post process on one camera effects both cameras

In the example above the left camera does not change (because the exposure is 1.0), however the right camera has become much darker and the colors are different.
The same thing happens when other post processing is applied, such as contrast or blur. The post process works, but the unaffected camera is affected by something else.

I tried numerous things to work around it but couldn’t find any solution and neither the cause of the problem. If anyone has a clue on what the problem might be, that would be a great help.

Interesting. Seems like the party prices is not disposed correctly between the two camera renders. I guess?

Please file an issue on GitHub if you can, we’ll make sure to address this.

Thanks, I opened an issue: [XR] Post process on one camera effects both cameras · Issue #9038 · BabylonJS/Babylon.js · GitHub

If I get an eureka moment I’ll give some feedback on the issue, but so far I haven’t been able to find the cause of the problem either.

1 Like

@RaananW
The fix seems to work fine on Firefox desktop with the WebXR extension, however on my Oculus quest I can’t get it to work.
The oculus browser blanks the screen on which the processing is applied, and Firefox Reality doesn’t work at all (just blank on entering XR).
The Oculus browser works fine otherwise, just post processing on one camera blanks one eye.
If I remember correctly, without applying the config fix it did work, but it would display the same strange behavior as on the desktop.

Any clue on what might cause this?
And is Firefox Reality actually supported (it seems that XR support is added, but I read some things about requiring polyfills?)

Are you refering to the same example? Want to show me a demo where the oculus quest refuses to render? I want to be sure we are talking about the same thing

Whoops, I was still using 4.1.0 in my development setup and that didn’t work. However 4.2.0 seems to work in the Oculus browser with this playground: https://playground.babylonjs.com/#ZDXUBD#7

Firefox Reality however does not render anything at all.

firefox reality…
Want to share a playground that blanks the image?

The playground in the previous post just results in a black image in Firefox Reality for me.

1 Like

Will check and let you know

Actually, I was wrong and https://playground.babylonjs.com/#ZDXUBD#7 does not work properly in the Oculus browser either. It seems to render an empty scene on the camera on which a postprocess is applied (there is no sphere or lighting, but the purple background is visible).
This is on 4.2.0-beta.9, in 4.1.0 it didn’t show anything at all.

In this case there seems to be an issue with the engine reference. Something in code (check your console, you will see the error). Looking into it right now

Just wanted to say - i can reproduce this on other devices. Post process when in XR doesn’t work even when trying in an MR device on chrome. Looking into it. I hope it’s a simple fix :slight_smile:

Alright thanks. The console doesn’t show any errors for me.
I guess it’s related to chrome, as everything works fine in Firefox on desktop.

Issue found. This playground works for me (locally!!) in chrome-desktop, chrome-oculus, firefox-desktop, firefox-reality

https://playground.babylonjs.com/#ZDXUBD#22

Pull request is coming up, hopefully available later today/tomorrow in the playground.

2 Likes