Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions webxrlayers-1.bs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ XRCompositionLayer defines a set of common attributes and behaviors across certa
attribute boolean blendTextureSourceAlpha;
attribute boolean? chromaticAberrationCorrection;
attribute float? fixedFoveation;
readonly attribute unsigned long mipLevels;

readonly attribute boolean needsRedraw;

Expand Down Expand Up @@ -346,6 +347,12 @@ rerendered in the next [=XR animation frame=]. It MAY be set when [=the underlyi
when the [=XR Compositor=] can no longer reproject the layer. Failing to redraw the content in the next [=XR animation frame=]
might cause flickering or other side effects.

The <dfn attribute for="XRCompositionLayer">mipLevels</dfn> attribute returns the depth of the mip chain. This MUST be equal
or smaller than the value requested in {{XRLayerInit/mipLevels}}.

NOTE: some platforms don't support mip levels. Authors should query {{XRCompositionLayer/mipLevels}} to determine if they can
target a certain mip level and not rely on the value they passed in {{XRLayerInit/mipLevels}}.

<div class="algorithm" data-algorithm="redrawLayerAlgo">
When <dfn>the underlying resources of a layer are lost</dfn> for an {{XRCompositionLayer}} |layer|,
the user agent MUST run the following steps:
Expand Down Expand Up @@ -950,6 +957,8 @@ For WebGL2 contexts these additional formats are supported:
- {{DEPTH24_STENCIL8}}

The <dfn dict-member for="XRLayerInit">mipLevels</dfn> attribute defines the desired number of mip levels in the color and texture data.
If the user agent can't create the requested number, it can create less. Authors MUST query {{XRCompositionLayer/mipLevels}} to determine
the actual number of mip levels.

The <dfn dict-member for="XRLayerInit">viewPixelWidth</dfn> and <dfn dict-member for="XRLayerInit">viewPixelHeight</dfn> attributes define
the rectangular dimensions of the {{XRCompositionLayer}}.
Expand Down