C Specification

The XrFrameSynthesisInfoEXT structure is defined as:

// Provided by XR_EXT_frame_synthesis
typedef struct XrFrameSynthesisInfoEXT {
    XrStructureType                 type;
    const void*                     next;
    XrFrameSynthesisInfoFlagsEXT    layerFlags;
    XrSwapchainSubImage             motionVectorSubImage;
    XrVector4f                      motionVectorScale;
    XrVector4f                      motionVectorOffset;
    XrPosef                         appSpaceDeltaPose;
    XrSwapchainSubImage             depthSubImage;
    float                           minDepth;
    float                           maxDepth;
    float                           nearZ;
    float                           farZ;
} XrFrameSynthesisInfoEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • layerFlags is a bitmask of XrFrameSynthesisInfoFlagsEXT.

  • motionVectorSubImage identifies the motion vector image XrSwapchainSubImage to be used for frame synthesis.

  • motionVectorScale is an XrVector4f which scales the interpretation of the motion vector in motionVectorSubImage.

  • motionVectorOffset is an XrVector4f which offsets the interpretation of the motion vector in motionVectorSubImage.

  • appSpaceDeltaPose is the incremental application-applied transform, if any, that affects the view since the previous frame. Experiences of artificial locomotion (scripted movement, teleportation, etc.) involve the application transforming the whole XrCompositionLayerProjection::space from one application space pose to another pose between frames, affecting the view by more than the tracked movement between frames. The appSpaceDeltaPose must be identity when there is no XrCompositionLayerProjection::space transformation in the application. The XrPosef::position in appSpaceDeltaPose must be relative to the current application XrCompositionLayerProjection::space.

  • depthSubImage identifies the depth image XrSwapchainSubImage to be used for frame synthesis.

  • minDepth and maxDepth are the range of depth values in the depthSubImage, and must be in the range of [0.0,1.0]. This is akin to min and max values of OpenGL’s glDepthRange, but with the requirement here that maxDepth ≥ minDepth.

  • nearZ is the positive distance in meters of the minDepth value in the depth swapchain. Applications may use a nearZ that is greater than farZ to indicate depth values are reversed. nearZ may be infinite.

  • farZ is the positive distance in meters of the maxDepth value in the depth swapchain. farZ may be infinite. The runtime must return error XR_ERROR_VALIDATION_FAILURE if nearZ == farZ

Description

When submitting motion vector images and depth images along with projection layers, add an XrFrameSynthesisInfoEXT structure to the XrCompositionLayerProjectionView::next chain, for each XrCompositionLayerProjectionView structure in the given layer.

The runtime must interpret the motion vector data in the motionVectorSubImage’s RGB channels, modified by motionVectorScale and motionVectorOffset as follows: motionVector = motionVectorSubImagergb * motionVectorScalexyz + motionVectorOffsetxyz. The components motionVectorSubImagea, motionVectorScalew and motionVectorOffsetw are ignored.

The motion vector represents the movement of a pixel since the XrFrameEndInfo::displayTime of the previous frame until the XrFrameEndInfo::displayTime of the current frame. The runtime may use this information to extrapolate the rendered frame into a future frame.

The motion vector must derived from normalized device coordinate (NDC) space, which in this context uses Vulkan-style conventions: the NDC range is defined as [-1, -1, 0] to [1, 1, 1], different from OpenGL’s NDC range. However, the motion vector itself is not constrained to this range; its values depend on the pixel’s movement and may extend beyond the boundaries of the NDC space. For example, given that a pixel’s NDC in the previous frame is PrevNDC, and CurrNDC in current frame, and that there is no scale or offset, then the motion vector value is "(CurrNDC - PrevNDC)xyz".

Valid Usage (Implicit)

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 2014-2025 The Khronos Group Inc.