Develop
Develop
Select your platform

Passthrough

Updated: Oct 6, 2025
Passthrough provides a real-time, perceptually comfortable 3D visualization of the physical world in a Meta Quest headset. The Passthrough API allows developers to integrate passthrough with their virtual experiences.

Activating passthrough

Use the following code snippet to enable passthrough:
scene.enablePassthrough(true): Enables passthrough. Setting this to false would disable passthrough. skyboxEntity.setComponent(Visible(false)): Sets the skybox’s visibility to false, which allows the user to view the passthrough feed.
Important: Passthrough won’t work if your skybox is visible.

Passthrough LUTs

Passthrough lookup tables (LUTs) transform the colors that passthrough displays. You can use them to evoke a certain style, such as tinting everything red when you are low on health, or to emulate a lighting environment, like dimming lights when a movie starts.
LUT Mapping of a 16^3 RGB cube
The image above is from an article called LUTs vs Transforms: How They’re Different and Why It Matters, which provides a good explanation of LUTs.
This image compares the appearance of an image before and after applying a passthrough LUT:
Showing a before and after of applying a LUT
The API for Meta Quest maps input RGB values with components ranging from zero to 15 to output RGB values ranging from zero to 255. This process is equivalent to mapping a low-resolution 16x16x16 RGB cube to a high-resolution 256x256x256 cube. For instance, you can map the input hex value F3A to F030A0 to obtain a roughly equivalent value.
The following example demonstrates setting up and using a LUT. This app dims the scene by transforming the RGB values to approximately one-fourth of their original settings. The app achieves this by multiplying the components by four, which is one-fourth of 16. This value is the multiplier required to obtain a roughly equivalent color.
// initialize lut
val tbl = Lut()
for (r in 0..15) {
    for (g in 0..15) {
        for (b in 0..15) {
            // set a mapping color for each RGB value in the (0-15)^3 range
            tbl.setMapping(r, g, b, r * 4 + r / 4, g * 4 + g / 4, b * 4 + b / 4)
        }
    }
}

// apply it to the passthrough
scene.setPassthroughLUT(tbl)

Design guidelines

Did you find this page helpful?