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

WebXR Layers API #412

Open
MortimerGoro opened this issue Jul 29, 2020 · 3 comments
Open

WebXR Layers API #412

MortimerGoro opened this issue Jul 29, 2020 · 3 comments
Labels
w3c Specifications in W3C Working Groups.

Comments

@MortimerGoro
Copy link

MortimerGoro commented Jul 29, 2020

Request for Mozilla Position on an Emerging Web Specification

Other information

The spec adds support for composition layers to the WebXR spec. Composition layers have many benefits:

  • Improved Performance and judder.
  • Better Legibility/visual fidelity for elements such as text, UI, video, quads, cubemaps.
  • Reduced Latency and Power consumption

WebXR Layers, specifically XRProjectionLayer, will also enable a better render path for our gecko WebXR implementation:

  • Proper way to implement WebXR msaa. We disabled msaa in the current WebXR implementation because the OpaqueFBO approach exposed in WebXR API is not totally compatible with the path forward from the WebGL team. This is causing Firefox to have worse VR quality than other browsers. We need the XRProjectionLayer render path to enable msaa for the users.
  • Proper way to enable multiview. Multiview is exposed in WebGL but it requires several copies and conversions from textures to side-by-side FBO in the render path to be connected to WebXR. By using the texture-arrays approach provided in the XRProjectionLayer we can implement multiview with less surface blits and conversions, which are specially slow on mobile. This will help with to improve the WebXR performance.

Regarding privacy or fingerprinting I think it's a pretty safe API. I don't think it exposes anything new that is not already exposed in WebXR and WebGL. The only thing I see is knowing if a device supports compositor layers or not. Our initial plan is to implement the XRPRojectionLayer subset, which is always guaranteed to be supported, so not a problem for that use case. For the other layers, if we consider detecting the layers feature a problem, we could always mark them as supported and just fallback to geometry, reusing the code we already have in the external browser apps (Note: We wouldn't need to add that fallback geometry code to WebXR/WebGL in Gecko. It would be just responsible for sharing the layer info on the SubmitFrame calls, not creating the final fallback geometry).

Tag Review thread

@Manishearth
Copy link

cc @asajeffrey

@asajeffrey
Copy link

We're in the process of implementing this for Servo. A benefit I'd add is that it makes it more likely that an webxr implementation can avoid a blit when displaying webvr content on the device.

@annevk annevk added the w3c Specifications in W3C Working Groups. label Aug 5, 2020
@annevk
Copy link
Contributor

annevk commented Aug 5, 2020

(See also #218.)

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

No branches or pull requests

4 participants