C Specification
When submitting depth images along with projection layers, add the
XrCompositionLayerDepthInfoKHR to the next chain for all
XrCompositionLayerProjectionView structures in the given layer.
The XrCompositionLayerDepthInfoKHR structure is defined as:
// Provided by XR_KHR_composition_layer_depth
typedef struct XrCompositionLayerDepthInfoKHR {
    XrStructureType        type;
    const void*            next;
    XrSwapchainSubImage    subImage;
    float                  minDepth;
    float                  maxDepth;
    float                  nearZ;
    float                  farZ;
} XrCompositionLayerDepthInfoKHR;Members
Description
| Note The window space depth values  | 
| Note A reversed mapping of depth, such that points closer to the view have a window space depth that is greater than points further away can be achieved by making nearZ > farZ. | 
XrCompositionLayerDepthInfoKHR contains the information needed to
associate depth with the color information in a projection layer.
When submitting depth images along with projection layers, add the
XrCompositionLayerDepthInfoKHR to the next chain for all
XrCompositionLayerProjectionView structures in the given layer.
The homogeneous transform from view space z to window space depth is given by the following matrix, where a = minDepth, b = maxDepth, n = nearZ, and f = farZ.
Homogeneous values are constructed from real values by appending a w component with value 1.0.
General homogeneous values are projected back to real space by dividing by the w component.
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-2024, The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.