You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: webxrlayers-1.bs
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -321,6 +321,7 @@ XRCompositionLayer defines a set of common attributes and behaviors across certa
321
321
322
322
attribute boolean blendTextureSourceAlpha;
323
323
attribute boolean? chromaticAberrationCorrection;
324
+
attribute float opacity;
324
325
readonly attribute unsigned long mipLevels;
325
326
326
327
readonly attribute boolean needsRedraw;
@@ -338,6 +339,9 @@ enable optical chromatic aberration correction for the layer. If the user agent
338
339
should return <code>null</code> on getting, and setting should be a <code>no-op</code>.
339
340
If the {{XRCompositionLayer/chromaticAberrationCorrection}} was changed, it will take effect at the next {{XRFrame}}.
340
341
342
+
The <dfn attribute for="XRCompositionLayer">opacity</dfn> attribute sets the opacity that is applied to the pixels of the layer. The [=XR Compositor=] MUST multiply each pixel (in premultiplied space) by this value.
343
+
{{XRCompositionLayer/opacity}} is <code>1.0</code> by default. Setting {{XRCompositionLayer/opacity}} to a value less than <code>0</code> will set it to <code>0</code> and setting it to a value higher than <code>1.0</code> will set it to <code>1.0</code>.
344
+
341
345
The <dfn attribute for="XRCompositionLayer">needsRedraw</dfn> attribute signals that the {{XRCompositionLayer}} should be
342
346
rerendered in the next [=XR animation frame=]. It MAY be set when [=the underlying resources of a layer are lost=] or
343
347
when the [=XR Compositor=] can no longer reproject the layer. Failing to redraw the content in the next [=XR animation frame=]
@@ -373,6 +377,7 @@ or a {{WebGL2RenderingContext}} |context|, the user agent MUST run the following
373
377
<dt> Otherwise
374
378
<dd> Set [=this=]{{XRCompositionLayer/chromaticAberrationCorrection}} to <code>null</code>.
375
379
</dl>
380
+
1. Set [=this=]{{XRCompositionLayer/opacity}} to <code>1.0</code>.
376
381
377
382
</div>
378
383
@@ -2023,4 +2028,3 @@ Changes:
2023
2028
- Moved foveation to projection layer (<a href="https://github.com/immersive-web/layers/pull/247">GitHub #247</a>)
2024
2029
- Rename textureLayers to textureArrayLength (<a href="https://github.com/immersive-web/layers/pull/242">GitHub #242</a>)
2025
2030
- Clarify that opaque textures are always initialized at the start of the frame (<a href="https://github.com/immersive-web/layers/pull/234">GitHub #234</a>)
0 commit comments