Skip to content

Commit 66398b3

Browse files
committed
Merge pull request immersive-web#300 from cabanier/cac
remove unused chromaticaberration
2 parents 3f4c22e + 7e7f5bd commit 66398b3

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

webxrlayers-1.bs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ XRCompositionLayer defines a set of common attributes and behaviors across certa
329329
readonly attribute XRLayerLayout layout;
330330

331331
attribute boolean blendTextureSourceAlpha;
332-
attribute boolean? chromaticAberrationCorrection;
333332
attribute boolean forceMonoPresentation;
334333
attribute float opacity;
335334
readonly attribute unsigned long mipLevels;
@@ -344,11 +343,6 @@ The <dfn attribute for="XRCompositionLayer">layout</dfn> attribute returns the l
344343

345344
The <dfn attribute for="XRCompositionLayer">blendTextureSourceAlpha</dfn> attribute enables the layer’s texture alpha channel.
346345

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-
352346
The <dfn attribute for="XRCompositionLayer">forceMonoPresentation</dfn> attribute forces the right eye to use the same layer configuration
353347
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.
354348

@@ -385,13 +379,6 @@ or a {{WebGL2RenderingContext}} |context|, the user agent MUST run the following
385379
1. Set [=this=] [=XRCompositionLayer/session=] to |session|.
386380
1. If |context| is defined, set [=this=] [=XRCompositionLayer/context=] to |context|.
387381
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>
395382
1. Set [=this=] {{XRCompositionLayer/opacity}} to <code>1.0</code>.
396383

397384
</div>
@@ -859,7 +846,8 @@ An [=opaque texture=] functions identically to a standard {{WebGLTexture}} with
859846
- An [=opaque texture=] MUST behave as though it was allocated with [=texStorage2D=] or [=texStorage3D=], as appropriate, even when using a WebGL 1.0 context.
860847
- A call to {{deleteTexture}} with an [=opaque texture=] MUST generate an {{INVALID_OPERATION}} error.
861848

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.
863851

864852
<table class="tg">
865853
<thead>
@@ -911,6 +899,7 @@ dictionary XRProjectionLayerInit {
911899
GLenum colorFormat = 0x1908; // RGBA
912900
GLenum depthFormat = 0x1902; // DEPTH_COMPONENT
913901
double scaleFactor = 1.0;
902+
boolean clearOnAccess = true;
914903
};
915904
</pre>
916905

@@ -954,6 +943,8 @@ For {{WebGL2RenderingContext}} contexts these additional formats are supported:
954943
The <dfn dict-member for="XRProjectionLayerInit">scaleFactor</dfn> attribute defines the value that the |session|'s
955944
[=recommended WebGL framebuffer resolution=] MUST be multiplied by determining the resolution of the layer's attachments.
956945

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+
957948
NOTE: the {{XRProjectionLayerInit}} dictionary does not have support to configure {{XRLayerInit/mipLevels}} like
958949
{{XRLayerInit}}. If a user agent wants to support mipmapping on projection layers, it is free to allocate the texture with mips.
959950
In that case the user agent (and not the author) is responsible for generating all the mip levels.
@@ -973,6 +964,7 @@ dictionary XRLayerInit {
973964
required unsigned long viewPixelHeight;
974965
XRLayerLayout layout = "mono";
975966
boolean isStatic = false;
967+
boolean clearOnAccess = true;
976968
};
977969
</pre>
978970

@@ -1026,6 +1018,8 @@ the rectangular dimensions of the {{XRCompositionLayer}}.
10261018

10271019
The <dfn dict-member for="XRLayerInit">layout</dfn> attribute defines the layout of the layer.
10281020

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.
1022+
10291023
XRQuadLayerInit {#xrquadlayerinit}
10301024
-------------------
10311025

0 commit comments

Comments
 (0)