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
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 *
resolution
2).
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 *
resolution
2).
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 resolution
3 * 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
.
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.