8000 Specified that XRWebGLLayer framebuffers always use premultiplied alpha by toji · Pull Request #840 · immersive-web/webxr · GitHub
[go: up one dir, main page]

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

Specified that XRWebGLLayer framebuffers always use premultiplied alpha #840

Merged
merged 1 commit into from
Sep 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Specified that XRWebGLLayer framebuffers always use premultiplied alpha
  • Loading branch information
toji committed Sep 12, 2019
commit 0639d19f28bddc3f2ef07b1b235a16d7f7298790
1 change: 1 addition & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,7 @@ An <dfn>opaque framebuffer</dfn> functions identically to a standard {{WebGLFram
- An [=opaque framebuffer=] initialized with {{XRWebGLLayerInit/depth}} <code>false</code> will not have an attached depth buffer.
- An [=opaque framebuffer=] initialized with {{XRWebGLLayerInit/stencil}} <code>false</code> will not have an attached stencil buffer.
- An [=opaque framebuffer=]'s color buffer will have an alpha channel if and only if {{XRWebGLLayerInit/alpha}} is <code>true</code>.
- The [=XR Compositor=] will assume the [=opaque framebuffer=] contains colors with premultiplied alpha. This is true regardless of the {{WebGLContextAttributes|premultipliedAlpha}} value set in the {{XRWebGLLayer/context}}'s [=actual context parameters=].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this we should probably also recommend a warning be displayed in this situation to properly fix #837

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about that, but it seems like recommending that the UA output a warning to the console falls outside of what specs typically dictate. At best we could put a non-normative note in that suggests it, but I'm not sure if the group feels like that's necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, a non normative note is what I meant. "UAs may want to show a warning to the console when a context created with premultipliedAlpha: false is passed to new XRWebGLLayer()"

We can also make it a hard error, but that might be too large a hammer.


NOTE: User agents are not required to respect <code>true</code> values of {{XRWebGLLayerInit/depth}} and {{XRWebGLLayerInit/stencil}}, which is similar to WebGL's behavior when [=create a drawing buffer|creating a drawing buffer=]

Expand Down
0