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
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1878,6 +1878,18 @@ when the [=XR Compositor=] can no longer reproject the layer.
1878
1878
1879
1879
The author SHOULD redraw the content of the layer at the next [=XR animation frame=]. The event must be of type {{XRLayerEvent}}.
1880
1880
1881
+
Depth sorting between layers {#depthsorting}
1882
+
============================
1883
+
By default, the {{XRRenderStateInit/layers}} array defines the order of the composition of the layers and each layer is drawn on top of the previous layer.
1884
+
If an application wants to have layers that are sorted by depth, it MUST request a session with the "<dfn for="feature descriptor">depth-sorted-layers</dfn>" [=feature descriptor=].
1885
+
1886
+
If an {{XRSession}} is created with the "[=depth-sorted-layers=]" [=feature descriptor=], {{XRProjectionLayer}}, {{XRQuadLayer}} and {{XRCylinderLayer}} layers MUST be displayed based on their depth as opposed to the location in the {{XRRenderStateInit/layers}} array.
1887
+
Other layers types MUST continue to be sorted as before.
1888
+
1889
+
{{XRQuadLayer}} and {{XRCylinderLayer}} layers MUST be sorted by their dimensions (for instance {{XRQuadLayerInit/width}} or {{XRCylinderLayerInit/centralAngle}}), transform and space.
1890
+
1891
+
{{XRProjectionLayer}} layers MUST be sorted according to the values in their {{XRWebGLSubImage/depthStencilTexture}}. This also implies that if "[=depth-sorted-layers=]" is enabled, the [=XR Compositor=] MUST make use of depth values and {{XRProjectionLayer/ignoreDepthValues}} MUST be set to `true`.
1892
+
1881
1893
WebXR Device API Integration {#webxrintegration}
1882
1894
============================
1883
1895
@@ -1895,8 +1907,8 @@ instances of {{XRLayer}}.
1895
1907
The <dfn attribute for="XRRenderState">layers</dfn> attribute returns an array containing
1896
1908
the instances of {{XRLayer}} that are displayed by the [=XR Compositor=].
1897
1909
1898
-
The{{XRRenderStateInit/layers}} array defines the order of the composition of the layers. The [=XR Compositor=] MUST draw each layer
1899
-
in order of its position in the array using [=source-over=] blending. The[=XR Compositor=] MUST NOT apply any depth sorting of the layers.
1910
+
By default, the{{XRRenderStateInit/layers}} array defines the order of the composition of the layers. The [=XR Compositor=] MUST draw each layer
1911
+
in order of its position in the array using [=source-over=] blending. Unless the "[=depth-sorted-layers=]" [=feature descriptor=] is enabled, the[=XR Compositor=] MUST NOT apply any depth sorting of the layers.
1900
1912
1901
1913
NOTE: this means that each layer can potentially overwrite the previous layers whether or not the previous layers are virtually closer to the viewer.
1902
1914
@@ -1946,7 +1958,7 @@ monoscopic devices.
1946
1958
1947
1959
XRView changes {#xrviewchanges}
1948
1960
--------------
1949
-
Each [=view=] MUST define a <dfn ignore=''>recommended WebGL texture resolution</dfn> which represents a best estimate of the WebGL texture
1961
+
Each [=view=] MUST define a <dfn>recommended WebGL texture resolution</dfn> which represents a best estimate of the WebGL texture
0 commit comments