Closed ta-koga closed 2 years ago
No, there is no way.
What you can do is create another XRMediaEquirectLayer that is mono and switch between the stereo one and the new one using updateRenderState
.
Let me know if that doesn't work for you (or if you get rendering issues)
If the layout is set to mono, XRMediaEquirectLayer render the video split at the top and bottom directly on both eyes. It's Unexpected behavior.
It needs to rendered to both eyes by referring one side of video source (like top-botom's "top"). Because there is no video for mono.
ok. That is indeed a problem that we could fix in the layers spec. I'll put this on the agenda and we can discuss it in the next WebXR meeting.
/agenda Can we put stereo media layers into mono?
Because this couldn't be discused on Tuesday I am marking it to be discussed at TPAC
/tpac Can we put stereo media layers into mono?
Was this ever resolved?
/tpac Can we put stereo media layers into mono?
Discussed at TPAC and agree upon.
We will add a new bool attribute forceMonoPresentation
to swap to mono.
Thank you for bringing this up to TPAC.
Closing this issue. It's now in the spec and the Quest browser will have it in the next version.
When playing VR stereo video with XRMediaEquirectLayer and displaying UI with XRProjectionLayer, I want to turn off stereo when displaying UI, and close UI and turn back to stereo when finished.
For example, in a VR video, there is a coffee cup on a desk 1m in front of you. If the video is in stereo, you can perceive the coffee cup in 3D as if it were 1 meter in front of you. When overlaying the UI on the video, if the UI is placed in front of the coffee cup (more than 1 meter in front), it will be displayed without any discomfort, but if the UI is placed behind the coffee cup (more than 1 meter behind), it will cause discomfort.
To reduce this discomfort, we need to turn off the stereo when the UI is displayed, and close the UI to turn it on when we are done.
I don't think there is a way to toggle stereo in the current Web XRLayers API, is there?
Thanks.