C Specification
When submitting motion vector buffer and depth buffers along with projection
layers, add an XrCompositionLayerSpaceWarpInfoFB structure to the
XrCompositionLayerProjectionView::next chain, for each
XrCompositionLayerProjectionView structure in the given layer.
The XrCompositionLayerSpaceWarpInfoFB structure is defined as:
// Provided by XR_FB_space_warp
typedef struct XrCompositionLayerSpaceWarpInfoFB {
    XrStructureType                           type;
    const void*                               next;
    XrCompositionLayerSpaceWarpInfoFlagsFB    layerFlags;
    XrSwapchainSubImage                       motionVectorSubImage;
    XrPosef                                   appSpaceDeltaPose;
    XrSwapchainSubImage                       depthSubImage;
    float                                     minDepth;
    float                                     maxDepth;
    float                                     nearZ;
    float                                     farZ;
} XrCompositionLayerSpaceWarpInfoFB;Members
The motion vector data is stored in the motionVectorSubImage’s RGB
channels, defined in NDC (normalized device coordinates) space, for example,
the same surface point’s NDC is PrevNDC in previous frame, CurrNDC in
current frame, then the motion vector value is "highp vec3 motionVector = (
CurrNDC - PrevNDC ).xyz;".
Signed 16 bit float pixel format is recommended for this image.
Description
The runtime must return error XR_ERROR_VALIDATION_FAILURE if
nearZ == farZ.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.