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

Add support for space warp in WebXR #24581

Open
cabanier opened this issue Sep 1, 2022 · 7 comments
Open

Add support for space warp in WebXR #24581

cabanier opened this issue Sep 1, 2022 · 7 comments

Comments

@cabanier
Copy link
Contributor

cabanier commented Sep 1, 2022

The Oculus browser is in the process of adding support for Space Warp.
TLDR , this is a technology that allows an experience to render at half the frame rate but display at the full display frame rate.

To make this work, the site needs to submit a low resolution motion vector texture and a low resolution depth texture in addition to the regular color texture.

How hard would it be add support for this to three.js?

@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2022

Hmm... What's needed for generating that motion vector frame? 🤔

@cabanier
Copy link
Contributor Author

cabanier commented Sep 2, 2022

Basically, instead of drawing a color or sampling from a texture, the geometry needs to be filled with a delta pose

@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2022

Per-pixel deltas? That seems hard when you include skinning, morph targets, displacement and normal naps... 🤔

@donmccurdy
Copy link
Collaborator

Related:

/cc @bhouston

@cabanier
Copy link
Contributor Author

cabanier commented Sep 2, 2022

Per-pixel deltas? That seems hard when you include skinning, morph targets, displacement and normal naps... 🤔

I was told that it usually isn't that hard to create a velocity map. Many recent games would not be possible before this feature was introduced and performance is the biggest issue in WebXR.
Maybe it won't work for everything. If so, we could add warnings to three and enhance the browser API so the feature can be turned off.

@mrdoob
Copy link
Owner

mrdoob commented Sep 7, 2022

Many recent games would not be possible before this feature was introduced and performance is the biggest issue in WebXR.

What are some of those games? I would like to check them out on a Quest 2 to see how they look.

@cabanier
Copy link
Contributor Author

cabanier commented Sep 7, 2022

What are some of those games? I would like to check them out on a Quest 2 to see how they look.

I will ask if I can share that publicly

Edit: a quick search showed this article, this one, this one and this one

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

No branches or pull requests

4 participants