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
+8-14Lines changed: 8 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -329,7 +329,6 @@ XRCompositionLayer defines a set of common attributes and behaviors across certa
329
329
readonly attribute XRLayerLayout layout;
330
330
331
331
attribute boolean blendTextureSourceAlpha;
332
-
attribute boolean? chromaticAberrationCorrection;
333
332
attribute boolean forceMonoPresentation;
334
333
attribute float opacity;
335
334
readonly attribute unsigned long mipLevels;
@@ -344,11 +343,6 @@ The <dfn attribute for="XRCompositionLayer">layout</dfn> attribute returns the l
344
343
345
344
The <dfn attribute for="XRCompositionLayer">blendTextureSourceAlpha</dfn> attribute enables the layer’s texture alpha channel.
346
345
347
-
The <dfn attribute for="XRCompositionLayer">chromaticAberrationCorrection</dfn> attribute is a hint for the [=XR Compositor=] to
348
-
enable optical chromatic aberration correction for the layer. If the user agent or device does not support this attribute, they
349
-
should return <code>null</code> on getting, and setting should be a <code>no-op</code>.
350
-
If the {{XRCompositionLayer/chromaticAberrationCorrection}} was changed, it will take effect at the next {{XRFrame}}.
351
-
352
346
The <dfn attribute for="XRCompositionLayer">forceMonoPresentation</dfn> attribute forces the right eye to use the same layer configuration
353
347
as the left eye. This MUST send a signal to the [=XR Compositor=] to remove the {{XRLayerLayout/stereo}} effect of this {{XRCompositionLayer}}. Setting this to <code>true</code> on a {{XRLayerLayout/mono}} layer has no effect.
354
348
@@ -385,13 +379,6 @@ or a {{WebGL2RenderingContext}} |context|, the user agent MUST run the following
385
379
1. Set [=this=][=XRCompositionLayer/session=] to |session|.
386
380
1. If |context| is defined, set [=this=][=XRCompositionLayer/context=] to |context|.
387
381
1. Set [=this=]{{XRCompositionLayer/blendTextureSourceAlpha}} to <code>true</code>.
388
-
1. Initialize [=this=]{{XRCompositionLayer/chromaticAberrationCorrection}} as follows:
389
-
<dl class="switch">
390
-
<dt class="switch">If the user agent supports chromatic aberration correction
391
-
<dd> Set [=this=]{{XRCompositionLayer/chromaticAberrationCorrection}} to <code>true</code> or <code>false</code> depending on the user agent's preference.
392
-
<dt> Otherwise
393
-
<dd> Set [=this=]{{XRCompositionLayer/chromaticAberrationCorrection}} to <code>null</code>.
394
-
</dl>
395
382
1. Set [=this=]{{XRCompositionLayer/opacity}} to <code>1.0</code>.
396
383
397
384
</div>
@@ -859,7 +846,8 @@ An [=opaque texture=] functions identically to a standard {{WebGLTexture}} with
859
846
- An [=opaque texture=] MUST behave as though it was allocated with [=texStorage2D=] or [=texStorage3D=], as appropriate, even when using a WebGL 1.0 context.
860
847
- A call to {{deleteTexture}} with an [=opaque texture=] MUST generate an {{INVALID_OPERATION}} error.
861
848
862
-
The buffers attached to an [=opaque texture=] MUST be cleared to the values in the table below during the processing of the first call to {{XRWebGLBinding/getViewSubImage()}} or {{XRWebGLBinding/getSubImage()}} in each [=XR animation frame=].
849
+
The buffers attached to an [=opaque texture=] MUST be cleared to the values in the table below during the processing of the first call to {{XRWebGLBinding/getViewSubImage()}} or {{XRWebGLBinding/getSubImage()}} in each [=XR animation frame=] when {{XRProjectionLayerInit/clearOnAccess}} is <code>true</code>.
850
+
If {{XRProjectionLayerInit/clearOnAccess}} is <code>false</code>, the buffers attached to an [=opaque texture=] MUST be cleared the first time that they are accessed. Subsequent accesses in later frames MAY NOT clear the buffers.
@@ -954,6 +943,8 @@ For {{WebGL2RenderingContext}} contexts these additional formats are supported:
954
943
The <dfn dict-member for="XRProjectionLayerInit">scaleFactor</dfn> attribute defines the value that the |session|'s
955
944
[=recommended WebGL framebuffer resolution=] MUST be multiplied by determining the resolution of the layer's attachments.
956
945
946
+
The <dfn dict-member for="XRProjectionLayerInit">clearOnAccess</dfn> attribute defines if the texture associated with this layer should be cleared in the initial frame or on every frame.
947
+
957
948
NOTE: the {{XRProjectionLayerInit}} dictionary does not have support to configure {{XRLayerInit/mipLevels}} like
958
949
{{XRLayerInit}}. If a user agent wants to support mipmapping on projection layers, it is free to allocate the texture with mips.
959
950
In that case the user agent (and not the author) is responsible for generating all the mip levels.
@@ -973,6 +964,7 @@ dictionary XRLayerInit {
973
964
required unsigned long viewPixelHeight;
974
965
XRLayerLayout layout = "mono";
975
966
boolean isStatic = false;
967
+
boolean clearOnAccess = true;
976
968
};
977
969
</pre>
978
970
@@ -1026,6 +1018,8 @@ the rectangular dimensions of the {{XRCompositionLayer}}.
1026
1018
1027
1019
The <dfn dict-member for="XRLayerInit">layout</dfn> attribute defines the layout of the layer.
1028
1020
1021
+
The <dfn dict-member for="XRLayerInit">clearOnAccess</dfn> attribute defines if the texture associated with this layer should be cleared in the initial frame or on every frame.
0 commit comments