OVRPassthroughColorLut
(
initialLutTexture
, flipY
)
|
Initialize the color LUT data from a texture.
Color channels are inferred from texture format. Use UpdateFrom() to update LUT data after construction.
Signature
OVRPassthroughColorLut(Texture2D initialLutTexture, bool flipY=true) Parameters initialLutTexture: Texture2DÂ
Texture to initialize the LUT from
flipY: boolÂ
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
(
initialColorLut
, 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.
Signature
OVRPassthroughColorLut(Color[] initialColorLut, ColorChannels channels) Parameters initialColorLut: Color[]Â
Color array to initialize the LUT from
channels: ColorChannelsÂ
Color channels for one color LUT entry
|
OVRPassthroughColorLut
(
initialColorLut
, 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.
Signature
OVRPassthroughColorLut(Color32[] initialColorLut, ColorChannels channels) Parameters initialColorLut: Color32[]Â
Color32 array to initialize the LUT from
channels: ColorChannelsÂ
Color channels for one color LUT entry
|
OVRPassthroughColorLut
(
initialColorLut
, 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.
Signature
OVRPassthroughColorLut(byte[] initialColorLut, ColorChannels channels) Parameters initialColorLut: byte[]Â
Color byte array to initialize the LUT from
channels: ColorChannelsÂ
Color channels for one color LUT entry
|
Channels
: ColorChannels
[Get] |
The color channels contained in each of the resulting colors.
Can be ColorChannels.Rgb or ColorChannels.Rgba. This property is defined at construction time and cannot be modified.
Signature
ColorChannels Channels |
IsInitialized
: bool
[Get] |
Deprecated
Signature
bool IsInitialized |
IsValid
: bool
[Get] |
Checks if the current state of the LUT is valid for use by an OVRPassthroughLayer.
Signature
bool IsValid |
Resolution
: uint
[Get] |
The size of one edge of the color cube spanned by the LUT.
For example, a resolution of 16 means that the LUT encompasses 16 * 16 * 16 colors. This property is defined at construction time and cannot be modified.
Signature
uint Resolution |
Dispose
()
|
Free the system resources associated with the color LUT.
Subsequent calls to OVRPassthroughLayer.SetColorLut() with this instance will fail.
Signature
void Dispose() Returns void |
UpdateFrom
(
colors
)
|
Updates color LUT data from an array of Color.
The resolution (number of colors) must match the original specification at construction time. The alpha value is ignored if ColorChannels was set to Rgb.
Signature
void UpdateFrom(Color[] colors) Parameters colors: Color[]Â
Color array
Returns void |
UpdateFrom
(
colors
)
|
Updates color LUT data from an array of Color32.
The resolution (number of colors) must match the original specification at construction time. The alpha value is ignored if ColorChannels was set to Rgb.
Signature
void UpdateFrom(Color32[] colors) Parameters colors: Color32[]Â
Color array
Returns void |
UpdateFrom
(
colors
)
|
Updates color LUT data from an array of RGB(A) values.
The resolution (number of colors) must match the original specification at construction time. The expected number of bytes per color is 3 if ColorChannels was set to Rgb, 4 if it was set to Rgba.
Signature
void UpdateFrom(byte[] colors) Parameters colors: byte[]Â
Array of consecutive RGB(A) color tuples
Returns void |
UpdateFrom
(
lutTexture
, flipY
)
|
Update color LUT data from a texture.
Color channels and resolution must match the original.
Signature
void UpdateFrom(Texture2D lutTexture, bool flipY=true) Parameters lutTexture: Texture2DÂ
Color LUT texture
flipY: boolÂ
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.
Returns void |
IsTextureSupported
(
texture
, errorMessage
)
|
Check if the given texture is formatted correctly for the use as color LUT.
Signature
static bool IsTextureSupported(Texture2D texture, out string errorMessage) Parameters texture: Texture2DÂ
Texture to check
errorMessage: out stringÂ
Error message describing acceptance fail reason
Returns bool |
| Member | Value |
|---|---|
Rgb | OVRPlugin.PassthroughColorLutChannels.Rgb |
Rgba | OVRPlugin.PassthroughColorLutChannels.Rgba |