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
+4-24Lines changed: 4 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -502,18 +502,7 @@ The <dfn attribute for="XRProjectionLayer">ignoreDepthValues</dfn> attribute, if
502
502
is <code>false</code> it indicates that the content of the depth buffer attachment will be used by the
503
503
[=XR Compositor=] and is expected to be representative of the scene rendered into the layer.
504
504
505
-
<div class="unstable">
506
-
507
-
The <dfn attribute for="XRProjectionLayer">deltaPose</dfn> attribute controls the amount of foveation used by the
508
-
[=XR Compositor=]. If the user agent or device does not support this attribute or the
509
-
"[=feature descriptor/space-warp=]" [=feature descriptor=] was not requested, they
510
-
should return <code>null</code> on getting, and setting should be a <code>no-op</code>. This attribute describes the
511
-
incremental application-applied transform, if any, since the previous frame that affects the view. When artificial
512
-
locomotion happens, the experience transforms the whole world from one application pose to another pose between frames
513
-
and {{XRProjectionLayer/deltaPose}} MUST be populated with the difference in the scene's world position.
514
-
The {{XRProjectionLayer/deltaPose}} should be identity when there is no transformation between the previous and the current {{XRFrame}}.
515
-
516
-
</div>
505
+
The <dfn attribute for="XRProjectionLayer">deltaPose</dfn> attribute describes the incremental application-applied transform, if any, since the previous frame that affects the view. If the user agent or device does not support this attribute or the "[=feature descriptor/space-warp=]" [=feature descriptor=] was not requested, they should return <code>null</code> on getting, and setting should be a <code>no-op</code>. When artificial locomotion happens, the experience transforms the whole world from one application pose to another pose between frames and {{XRProjectionLayer/deltaPose}} MUST be populated with the difference in the scene's world position. The {{XRProjectionLayer/deltaPose}} should be identity when there is no transformation between the previous and the current {{XRFrame}}.
The <dfn attribute for="XRWebGLSubImage">depthStencilTexture</dfn> attribute returns the depth/stencil [=opaque texture=] for the {{XRCompositionLayer}}.
797
786
If the layer was created without depth/stencil, this attribute returns null.
798
787
799
-
<div class="unstable">
800
-
801
788
The <dfn attribute for="XRWebGLSubImage">motionVectorTexture</dfn> attribute returns the motion [=opaque texture=] for the {{XRProjectionLayer}}.
802
789
If the {{XRSession}} was created without the [=feature descriptor/space-warp=][=feature descriptor=] or the layer is not a {{XRProjectionLayer}}, this attribute MUST return null.
803
790
804
-
</div>
805
-
806
791
The <dfn attribute for="XRWebGLSubImage">imageIndex</dfn> attribute returns the offset into the texture array. Valid only for layers
807
792
that were requested with {{texture-array}}.
808
793
809
794
The <dfn attribute for="XRWebGLSubImage">colorTextureWidth</dfn> and <dfn attribute for="XRWebGLSubImage">depthStencilTextureHeight</dfn> attributes
810
795
return the width and height in pixels of the GL depth attachments
811
796
812
-
<div class="unstable">
813
-
814
797
The <dfn attribute for="XRWebGLSubImage">depthStencilTextureWidth</dfn> and <dfn attribute for="XRWebGLSubImage">colorTextureHeight</dfn> attributes
815
798
return the width and height in pixels of the GL color attachments. If the layer was created without depth/stencil, this attribute returns null.
816
799
817
800
The <dfn attribute for="XRWebGLSubImage">motionVectorTextureWidth</dfn> and <dfn attribute for="XRWebGLSubImage">motionVectorTextureHeight</dfn> attributes
818
801
return the width and height in pixels of the GL motion vector attachments.
819
802
If the {{XRSession}} was created without the [=feature descriptor/space-warp=][=feature descriptor=] or the layer is not a {{XRProjectionLayer}}, these attributes MUST return null.
820
803
821
-
</div>
822
-
823
804
XRTextureType {#xrtexturetype}
824
805
-------------
825
806
The {{XRTextureType}} enum defines what type of texture is allocated.
@@ -2097,18 +2078,17 @@ Other layers types MUST continue to be sorted as before.
2097
2078
2098
2079
Space warp {#spacewarp}
2099
2080
==========
2100
-
<div class="unstable">
2101
2081
2102
2082
<dfn>Space warp</dfn> is a technology that improves the [=XR Compositor=]'s reprojection.
2103
2083
By submitting a {{XRWebGLSubImage/motionVectorTexture}} along with a {{XRWebGLSubImage/depthStencilTexture}}
2104
-
the [=XR Compositor=] can do high quality frame extrapolation and reprojection which allows the user agent to run at a reduced framerate but still provide a smooth experience to users.
2084
+
the [=XR Compositor=] can do high quality frame extrapolation and reprojection which allows the user agent to run at a reduced framerate but still provide a smooth experience to users. The rate at which {{XRSession/requestAnimationFrame()}} callbacks are delivered may be lower than the display's native refresh rate. The [=XR Compositor=] will synthesize the missing frames using the motion vectors and depth information provided by the experience.
2105
2085
2106
2086
To enable [=space warp=] the {{XRSession}} MUST be created with the "<dfn for="feature descriptor">space-warp</dfn>" [=feature descriptor=].
2107
2087
If "[=space-warp=]" is enabled, the [=XR Compositor=] MUST make use of depth values, {{XRProjectionLayer/ignoreDepthValues}} MUST be set to `false` and {{XRWebGLBinding/usesDepthValues}} MUST be set to `true`.
2108
2088
2109
-
The {{XRWebGLSubImage/motionVectorTexture}}MUST be in {{RGBA16F}}format. The author SHOULD fill in the RGB components of this texture with the speed in meters per second of that area with the red pixel corresponding with the x axis, green the y axis and blue the z axis.
2089
+
When the [=feature descriptor/space-warp=][=feature descriptor=] is enabled, the {{XRWebGLSubImage/depthStencilTexture}}for an {{XRProjectionLayer}}MUST be populated by the experience. The {{XRWebGLSubImage/depthStencilTexture}} and {{XRWebGLSubImage/motionVectorTexture}} will have the same dimensions, which may be different from the dimensions of the {{XRWebGLSubImage/colorTexture}}.
2110
2090
2111
-
</div>
2091
+
The {{XRWebGLSubImage/motionVectorTexture}} MUST be in {{RGBA16F}} format. The author SHOULD fill in the RG components of this texture with the 2D screen-space motion vector for that area, expressed as a delta in <dfn>Normalized Device Coordinates</dfn> (<dfn>NDC</dfn>) between the current frame and the previous frame. The motion vector is computed as `(currentClipPos / currentW) - (prevClipPos / prevW)`, where `currentClipPos` and `prevClipPos` are the <dfn>clip space</dfn> positions of the fragment in the current and previous frames, respectively. The red channel corresponds to the delta in [=NDC=] X (horizontal), and the green channel corresponds to the delta in [=NDC=] Y (vertical). The blue channel MAY contain the delta in [=NDC=] Z (depth), and the alpha channel is unused.
0 commit comments