Specified that XRWebGLLayer framebuffers always use premultiplied alpha#840
Merged
Conversation
Manishearth
reviewed
Sep 12, 2019
| - 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=]. |
Contributor
There was a problem hiding this comment.
If we do this we should probably also recommend a warning be displayed in this situation to properly fix #837
Member
Author
There was a problem hiding this comment.
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?
Contributor
There was a problem hiding this comment.
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.
thetuvix
approved these changes
Sep 16, 2019
NellWaliczek
approved these changes
Sep 19, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not intended for merge until discussed at TPAC /facetoface
Would fix #837 and #838 if the working group's decision is that
XRWebGLLayers are always treated as using premultiplied alpha regardless of the source context's flags. Preparing this for easy approval should that be the case.