Skip to content

Clarify what happens if a premultipliedAlpha: false context is used #837

@Manishearth

Description

@Manishearth

Split off from immersive-web/webxr-ar-module#14 (comment)

See also: #838

Currently we expect XRWebGLLayers to have premultipliedAlpha set.

What happens when one is created from a canvas.getContext(..., {premultipliedAlpha: false}) webgl context?

The two options as stated by @klausw are

  • Do we agree that this flag is only intended to apply to the default framebuffer used for canvas composition, and that WebXR immersive mode's XRWebGLLayer framebuffer has either an implicit value of premultipliedAlpha=true, or a separate XRWebGLLayerInit flag? (Support for premultipliedAlpha in XRWebGLLayerInit? #838)

  • Should this trigger a diagnostic or exception if an immersive session uses an existing context that had specified this in combination with an XRWebGLLayer that (implicitly or explicitly) uses premultipliedAlpha=true, or is it sufficient to address this in documentation?

cc @rcabanier @thetuvix

Metadata

Metadata

Assignees

Labels

fixed by pending PRA PR that is in review will resolve this issue.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions