Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A feature that toggle stereo on runtime. #265

Closed
ta-koga opened this issue Oct 1, 2021 · 9 comments
Closed

A feature that toggle stereo on runtime. #265

ta-koga opened this issue Oct 1, 2021 · 9 comments

Comments

@ta-koga
Copy link

ta-koga commented Oct 1, 2021

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.

@ta-koga ta-koga changed the title Is there a feature that toggle stereo on runtime ? A feature that toggle stereo on runtime. Oct 1, 2021
@cabanier
Copy link
Member

cabanier commented Oct 1, 2021

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.

@cabanier
Copy link
Member

cabanier commented Oct 1, 2021

Let me know if that doesn't work for you (or if you get rendering issues)

@ta-koga
Copy link
Author

ta-koga commented Oct 4, 2021

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.

@cabanier
Copy link
Member

cabanier commented Oct 4, 2021

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?

@probot-label probot-label bot added the agenda label Oct 4, 2021
@AdaRoseCannon
Copy link
Member

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?

@probot-label probot-label bot added the TPAC label Oct 7, 2021
@Yonet Yonet removed the TPAC label Oct 18, 2021
@Yonet Yonet removed the agenda label Nov 2, 2021
@cabanier
Copy link
Member

cabanier commented Sep 5, 2022

Was this ever resolved?

/tpac Can we put stereo media layers into mono?

@probot-label probot-label bot added the TPAC label Sep 5, 2022
@cabanier
Copy link
Member

Discussed at TPAC and agree upon.
We will add a new bool attribute forceMonoPresentation to swap to mono.

@Yonet Yonet removed the TPAC label Sep 15, 2022
@ta-koga
Copy link
Author

ta-koga commented Sep 20, 2022

Thank you for bringing this up to TPAC.

@cabanier
Copy link
Member

Closing this issue. It's now in the spec and the Quest browser will have it in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants