C Specification

The XrPassthroughColorLutCreateInfoMETA structure is defined as:

// Provided by XR_META_passthrough_color_lut
typedef struct XrPassthroughColorLutCreateInfoMETA {
    XrStructureType                      type;
    const void*                          next;
    XrPassthroughColorLutChannelsMETA    channels;
    uint32_t                             resolution;
    XrPassthroughColorLutDataMETA        data;
} XrPassthroughColorLutCreateInfoMETA;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • channels defines the color channels expected in one LUT element. The number of bytes expected per LUT element is 3 for XR_PASSTHROUGH_COLOR_LUT_CHANNELS_RGB_META and 4 for XR_PASSTHROUGH_COLOR_LUT_CHANNELS_RGBA_META.

  • resolution is the number of LUT elements per input channel. The total number of elements in the LUT is resolution3.

  • data contains the data the LUT is initialized with.

Description

resolution must be a power of 2, otherwise the runtime must return XR_ERROR_VALIDATION_FAILURE. The runtime may impose a limit on the maximum supported resolution, which is indicated in XrSystemPassthroughColorLutPropertiesMETA. If resolution exceeds that limit, the runtime must return XR_ERROR_VALIDATION_FAILURE.

data contains a 3-dimensional array which defines an output color for each RGB input color. The input color is scaled to be in the range [0, resolution]. For an RGBA LUT, the RGBA tuple of output colors for an input color (Rin, Gin, Bin) is found in the four bytes starting at the offset 4 * (Rin + Gin * resolution + Bin * resolution2). For an RGB LUT, the RGB tuple of output colors for an input color (Rin, Gin, Bin) is found in the three bytes starting at the offset 3 * (Rin + Gin * resolution + Bin * resolution2).

Color LUT data must be specified and interpreted in sRGB color space.

Runtimes must employ trilinear interpolation of neighboring color values if the resolution of the color LUT is smaller than the bit depth of the input colors.

The value of XrPassthroughColorLutDataMETA::bufferSize in data must be equal to resolution3 * bytesPerElement, where bytesPerElement is either 3 or 4 depending on channels. Otherwise, the runtime must return XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META.

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-2024, The Khronos Group Inc.