Color Mapping Techniques
Updated: Apr 15, 2026
The passthrough layer exposes a Color Map Type property that controls how the system remaps pixel colors in the passthrough image stream. You can choose from a number of different techniques to map each input color to a different output color. The following options are available:
- None (
ColorMapType_None): Display passthrough images unchanged. - Color Adjustment (
ColorMapType_ColorAdjustment): Adjust the image’s brightness, contrast, and saturation. Saturation adjustment only has an effect on devices that support color passthrough. - Grayscale (
ColorMapType_Grayscale): Adjust brightness and contrast and apply a posterization effect to grayscale passthrough images. Color passthrough images are converted to grayscale first if this option is chosen. - Grayscale To Color (
ColorMapType_GrayscaleToColor): Colorize grayscale passthrough images, adjust brightness and contrast, and apply a posterization effect. Color passthrough images are converted to grayscale first if this option is chosen. - Color LUT (
ColorMapType_ColorLut): Apply a color look-up table (LUT), which maps each RGB input color into an arbitrary RGB(A) in the passthrough image stream. - Interpolated Color LUT (
ColorMapType_ColorLut_Interpolated): Apply the blend between two color LUTs to the passthrough image stream. This option can be used to smoothly transition between two color LUTs.
Grayscale and Grayscale To Color options are provided for compatibility. Prefer using Color Adjustments or color LUTs to build apps that can leverage color passthrough. You can check if the current device supports color passthrough using IsColorPassthroughSupported from UOculusXRFunctionLibrary in the Meta XR Plugin and adjust the styling accordingly:
Color Look-Up Tables (LUTs)
A color LUT is a 3D array which maps each RGB color to an arbitrary new RGB(A) color. Color LUTs enable a wide range of effects, ranging from subtle color grading to stylizations such as posterization, selective coloring, and chroma keying.
:::caution Deprecated component
UOculusXRPassthroughLayerComponent is deprecated as of Unreal Engine 5.6. The color LUT APIs themselves are not deprecated and work with both the deprecated component and the recommended persistent passthrough path. For new projects, use
persistent passthrough instead.
:::
To apply a color LUT via Inspector, do the following:
- In the Oculus XR Passthrough Layer component Inspector, locate Stereo Layer Shape and set it to User Defined Passthrough Layer. Note that this shape class is deprecated in Unreal Engine 5.6. Reconstructed Passthrough Layer is the recommended replacement.
- Enable Color Map by checking the checkbox.
- Under Color Map Type, select Color LUT.
- Under Color LUT Source, select a
UOculusXRPassthroughColorLut asset or create a new one. - The LUT Weight slider controls the blend between the original colors and the LUT.
- To customize
UOculusXRPassthroughColorLut, open the inspector.
- In the inspector, under Color LUT Type, select Texture.
- Under LUT Texture, select a texture for which
Texture Group is set to Color Lookup Table (referred to as “LUT texture” in this document). See Creating Color LUTs for more information on supported formats and how to generate them. Color LUTs built for Unreal Engine’s native color grading capabilities are compatible.
To create smooth transitions between LUT states, use the Blueprint functions described below.
To apply a color LUT via Blueprints, use the following functions from UOculusXRPassthroughLayerBase (available on all passthrough layer shapes):
- Set Color LUT Source: Sets the color LUT on a passthrough layer (source color LUT when Color Map Type is Interpolated Color LUTs).
- Set Color LUT Target: Sets the target color LUT on a passthrough layer. Only applicable when Color Map Type is Interpolated Color LUTs.
- Set Color LUT Weight: Sets the LUT weight on a passthrough layer.
- Remove Color LUT: Remove the application of any color LUT on a passthrough layer.
Color LUTs and other color mapping features are mutually exclusive. Calling any of these functions will replace the color map defined in a previous call.
On current Meta Quest devices, the maximum supported color LUT resolution is 64. The color LUT resolution impacts memory usage and GPU performance. For that reason, it is advisable to keep the resolution as small as possible given use case and quality constraints. For example, start with a color LUT of resolution 16, then check if increasing the resolution to 32 significantly improves the visual quality.
Animating Color LUT Transitions
To fade a Color LUT in or out, or transition between two different color LUTs, call Set Color LUT Weight with a different value for LUT Weight during each frame of the transition. Before changing LUT Weight, set the Color LUT Source and Target (if Color Map Type is Interpolated Color LUTs) to the desired values. Set Color LUT Weight is a lightweight operation that doesn’t add a lot of overhead and can be called in every frame.
Animating Color LUT Contents
Some use cases require color LUTs to change continuously beyond linear interpolation. For example, an app could dynamically adjust the saturation of different color hues based on the state of the app or external input (such as audio).
To change the color LUT object in the Blueprints, use the function Set LUT From Array. This function also accepts an Ignore Alpha Channel parameter that controls whether the alpha channel of the LUT data is discarded. The LUT data must be defined as a 3D color array. The color values are laid out “blue-major”, that is, the resulting color value for an input color triplet (R, G, B) in range [0, Resolution] must be stored at the index LUT[R + G * Resolution + B * Resolution * Resolution].
The updated data will automatically be used on all passthrough layers that are currently using that UOculusXRPassthroughColorLut instance. There is no need to call Set Color LUT Source or Set Color LUT Target to propagate the changes.
If the target color LUT was previously using a texture source, the texture source will be overwritten.
For high resolution color LUTs (especially 64^3), calling Set LUT From Array in every frame can have a notable impact on app performance. Try to keep the LUTs as small as possible in such cases - a resolution of 32^3 or lower is recommended.