API reference
API reference
Select your platform
No SDKs available
No versions available

OVRPassthroughColorLut Class

Passthrough Color Look-Up Tables (LUTs).
OVRPassthroughColorLut extends System.IDisposable.

Overview

Public Types

enum
ColorChannels {
ColorChannels.Rgb = OVRPlugin.PassthroughColorLutChannels.Rgb, ColorChannels.Rgba = OVRPlugin.PassthroughColorLutChannels.Rgba
}

Properties

uint
ColorChannels
bool
bool
IsValid[Get]
Checks if the LUT is usable.

Public Member Functions

OVRPassthroughColorLut
( Texture2D initialLutTexture,
bool flipY )
Initialize the color LUT data from a texture.
OVRPassthroughColorLut
( Color[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
OVRPassthroughColorLut
( Color32[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
OVRPassthroughColorLut
( byte[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
void
UpdateFrom
( Color[] colors )
Update color LUT data from an array of Colors.
void
UpdateFrom
( Color32[] colors )
Update color LUT data from an array of Colors.
void
UpdateFrom
( byte[] colors )
Update color LUT data from an array of Colors.
void
UpdateFrom
( Texture2D lutTexture,
bool flipY )
Update color LUT data from a texture.
void
Dispose ( )

Static Public Member Functions

static bool
IsTextureSupported
( Texture2D texture,
out string errorMessage )
Check if texture is in acceptable LUT format.

Details

Member Enumerations

enum OVRPassthroughColorLut.ColorChannels
Enumerator
Rgb
= OVRPlugin.PassthroughColorLutChannels.Rgb
Rgba
= OVRPlugin.PassthroughColorLutChannels.Rgba

Properties

uint OVRPassthroughColorLut.Resolution
No description available.
ColorChannels OVRPassthroughColorLut.Channels
No description available.
bool OVRPassthroughColorLut.IsInitialized
No description available.
bool OVRPassthroughColorLut.IsValid
Checks if the LUT is usable.
Can become invalid at runtime.

Member Functions

OVRPassthroughColorLut.OVRPassthroughColorLut
( Texture2D initialLutTexture,
bool flipY )
Initialize the color LUT data from a texture.
Color channels are inferred from texture format. Use UpdateFrom() to update LUT data after construction.
Parameters
initialLutTexture
Texture to initialize the LUT from
flipY
Flag to inform whether the LUT texture should be flipped vertically. This is needed for LUT images which have color (0, 0, 0) in the top-left corner. Some color grading systems, e.g. Unity post-processing, have color (0, 0, 0) in the bottom-left corner, in which case flipping is not needed.
OVRPassthroughColorLut.OVRPassthroughColorLut
( Color[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
The resolution is inferred from the array size, thus the size needs to be a result of resolution = size ^ 3 * numColorChannels, where numColorChannels depends on channels. Use UpdateFrom() to update color LUT data after construction.
Parameters
initialColorLut
Color array to initialize the LUT from
channels
Color channels for one color LUT entry
OVRPassthroughColorLut.OVRPassthroughColorLut
( Color32[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
The resolution is inferred from the array size, thus the size needs to be a result of resolution = size ^ 3 * numColorChannels, where numColorChannels depends on channels. Use UpdateFrom() to update color LUT data after construction.
Parameters
initialColorLut
Color32 array to initialize the LUT from
channels
Color channels for one color LUT entry
OVRPassthroughColorLut.OVRPassthroughColorLut
( byte[] initialColorLut,
ColorChannels channels )
Set the color LUT data from an array of Color.
The resolution is inferred from the array size, thus the size needs to be a result of resolution = size ^ 3 * numColorChannels, where numColorChannels depends on channels. Use UpdateFrom() to update color LUT data after construction.
Parameters
initialColorLut
Color byte array to initialize the LUT from
channels
Color channels for one color LUT entry
void OVRPassthroughColorLut.UpdateFrom
( Color[] colors )
Update color LUT data from an array of Colors.
Color channels and resolution must match the original.
Parameters
colors
Color array
void OVRPassthroughColorLut.UpdateFrom
( Color32[] colors )
Update color LUT data from an array of Colors.
Color channels and resolution must match the original.
Parameters
colors
Color array
void OVRPassthroughColorLut.UpdateFrom
( byte[] colors )
Update color LUT data from an array of Colors.
Color channels and resolution must match the original.
Parameters
colors
Color array
void OVRPassthroughColorLut.UpdateFrom
( Texture2D lutTexture,
bool flipY )
Update color LUT data from a texture.
Color channels and resolution must match the original.
Parameters
lutTexture
Color LUT texture
flipY
Flag to inform whether the LUT texture should be flipped vertically. This is needed for LUT images which have color (0, 0, 0) in the top-left corner. Some color grading systems, e.g. Unity post-processing, have color (0, 0, 0) in the bottom-left corner, in which case flipping is not needed.
void OVRPassthroughColorLut.Dispose ( )
No description available.

Static Member Functions

static bool OVRPassthroughColorLut.IsTextureSupported
( Texture2D texture,
out string errorMessage )
Check if texture is in acceptable LUT format.
Parameters
texture
Texture to check
errorMessage
Error message describing acceptance fail reason
Returns
Did you find this page helpful?
Thumbs up icon
Thumbs down icon