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*) × saturationXrPassthroughBrightnessContrastSaturationFB is provided in the next chain of XrPassthroughStyleFB.
XR_FB_passthrough extension must be enabled prior to using XrPassthroughBrightnessContrastSaturationFBtype must be TYPE_PASSTHROUGH_BRIGHTNESS_CONTRAST_SATURATION_FBnext must be NULL or a valid pointer to the next structure in a structure chain
struct XrPassthroughBrightnessContrastSaturationFB {
XrStructureType type;
void const * next;
float brightness;
float contrast;
float saturation;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BRIGHTNESS
The struct member offsets. |
| public static final int | CONTRAST
The struct member offsets. |
| public static final int | NEXT
The struct member offsets. |
| public static final int | SATURATION
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | TYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrPassthroughBrightnessContrastSaturationFB(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public float | |
| public XrPassthroughBrightnessContrastSaturationFB | |
| public static XrPassthroughBrightnessContrastSaturationFB | |
| public static XrPassthroughBrightnessContrastSaturationFB. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public float | |
| public XrPassthroughBrightnessContrastSaturationFB | |
| protected XrPassthroughBrightnessContrastSaturationFB | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static XrPassthroughBrightnessContrastSaturationFB | create()
Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB | create(long address)
Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB. | create(int
the buffer capacity capacity)Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrPassthroughBrightnessContrastSaturationFB | |
| public static XrPassthroughBrightnessContrastSaturationFB. | |
| public static XrPassthroughBrightnessContrastSaturationFB | |
| public static XrPassthroughBrightnessContrastSaturationFB. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrPassthroughBrightnessContrastSaturationFB. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static float | |
| public static void | |
| public static float | |
| public static void | |
| public long | |
| public XrPassthroughBrightnessContrastSaturationFB | |
| public static long | |
| public static void | |
| public static float | |
| public static void | |
| public static int | |
| public static void | |
| public float | |
| public XrPassthroughBrightnessContrastSaturationFB | |
| public XrPassthroughBrightnessContrastSaturationFB | set(int type, long next, float brightness, float contrast, float saturation)
Initializes this struct with the specified values. |
| public XrPassthroughBrightnessContrastSaturationFB | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public XrPassthroughBrightnessContrastSaturationFB | |
| public XrPassthroughBrightnessContrastSaturationFB |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| BRIGHTNESS | back to summary |
|---|---|
| public static final int BRIGHTNESS The struct member offsets. | |
| CONTRAST | back to summary |
|---|---|
| public static final int CONTRAST The struct member offsets. | |
| NEXT | back to summary |
|---|---|
| public static final int NEXT The struct member offsets. | |
| SATURATION | back to summary |
|---|---|
| public static final int SATURATION The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| TYPE | back to summary |
|---|---|
| public static final int TYPE The struct member offsets. | |
| XrPassthroughBrightnessContrastSaturationFB | back to summary |
|---|---|
| protected XrPassthroughBrightnessContrastSaturationFB(long address, ByteBuffer container) | |
| XrPassthroughBrightnessContrastSaturationFB | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| brightness | back to summary |
|---|---|
| public float brightness() the brightness adjustment value in the range [-100, 100]. The neutral element is 0. | |
| brightness | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB brightness(float value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Returns a new
| |
| contrast | back to summary |
|---|---|
| public float contrast() the contrast adjustment value in the range [0, Infinity]. The neutral element is 1. | |
| contrast | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB contrast(float value) Sets the specified value to the | |
| create | back to summary |
|---|---|
| protected XrPassthroughBrightnessContrastSaturationFB create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Like
| |
| malloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrPassthroughBrightnessContrastSaturationFB. Returns a new
| |
| nbrightness | back to summary |
|---|---|
| public static float nbrightness(long struct) Unsafe version of | |
| nbrightness | back to summary |
|---|---|
| public static void nbrightness(long struct, float value) Unsafe version of | |
| ncontrast | back to summary |
|---|---|
| public static float ncontrast(long struct) Unsafe version of | |
| ncontrast | back to summary |
|---|---|
| public static void ncontrast(long struct, float value) Unsafe version of | |
| next | back to summary |
|---|---|
| public long next()
| |
| next | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB next(long value) Sets the specified value to the | |
| nnext | back to summary |
|---|---|
| public static long nnext(long struct) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static void nnext(long struct, long value) Unsafe version of | |
| nsaturation | back to summary |
|---|---|
| public static float nsaturation(long struct) Unsafe version of | |
| nsaturation | back to summary |
|---|---|
| public static void nsaturation(long struct, float value) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static int ntype(long struct) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static void ntype(long struct, int value) Unsafe version of | |
| saturation | back to summary |
|---|---|
| public float saturation() the saturation adjustment value in the range [0, Infinity]. The neutral element is 1. | |
| saturation | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB saturation(float value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB set(int type, long next, float brightness, float contrast, float saturation) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB set(XrPassthroughBrightnessContrastSaturationFB src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| type | back to summary |
|---|---|
| public int type() the
| |
| type | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB type(int value) Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB type$Default() Sets the | |
XrPassthroughBrightnessContrastSaturationFB structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrPassthroughBrightnessContrastSaturationFB |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrPassthroughBrightnessContrastSaturationFB ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| brightness | back to summary |
|---|---|
public float brightness()
| |
| brightness | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the specified value to the | |
| contrast | back to summary |
|---|---|
public float contrast()
| |
| contrast | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected XrPassthroughBrightnessContrastSaturationFB getElementFactory() Implements abstract org.
| |
| next | back to summary |
|---|---|
public long next()
| |
| next | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the specified value to the | |
| saturation | back to summary |
|---|---|
public float saturation()
| |
| saturation | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected XrPassthroughBrightnessContrastSaturationFB. Implements abstract org.
| |
| type | back to summary |
|---|---|
public int type()
| |
| type | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrPassthroughBrightnessContrastSaturationFB. Sets the | |