C Specification

The XrPassthroughBrightnessContrastSaturationFB structure is defined as:

typedef struct XrPassthroughBrightnessContrastSaturationFB {
    XrStructureType    type;
    const void*        next;
    float              brightness;
    float              contrast;
    float              saturation;
} XrPassthroughBrightnessContrastSaturationFB;


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.

  • brightness is the brightness adjustment value in the range [-100, 100]. The neutral element is 0.

  • contrast is the contrast adjustment value in the range [0, Infinity]. The neutral element is 1.

  • saturation is the saturation adjustment value in the range [0, Infinity]. The neutral element is 1.


XrPassthroughBrightnessContrastSaturationFB lets applications adjust the brightness, contrast, and saturation of passthrough layers. The adjustments only are applied before any additional effects (such as edges) are rendered on top.

The adjustments are applied in CIELAB color space (white point D65) using the following formulas:

  • L*' = clamp((L* - 50) × contrast + 50, 0, 100)

  • L*'' = clamp(L*' + brightness, 0, 100)

  • (a*', b*') = (a*, b*) × saturation

  • Resulting color: (L*'', a*', b*')

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 (c) 2014-2021, The Khronos Group Inc.