Passthrough windows
Updated: Apr 15, 2026
Passthrough windows let you cut holes in a fully rendered virtual scene so that the real-world camera feed is visible through specific regions of the screen. This technique is sometimes called poke-a-hole because you punch through the virtual content to reveal the passthrough layer behind it.
Before creating passthrough windows, enable passthrough in your project:
- Open Project Settings > Meta XR Plugin > Mobile.
- Enable Passthrough Enabled.
How passthrough windows work
Passthrough windows use the framebuffer’s alpha channel to control which regions of the screen show the real world. Passthrough renders as an underlay behind your virtual content. The alpha channel determines visibility at each pixel:
- An alpha value of 1 makes passthrough fully visible at that pixel, completely replacing the virtual scene.
- An alpha value of 0 keeps the virtual scene fully opaque.
- An alpha value between 0 and 1 creates a blend between passthrough and VR.
You write these alpha values by rendering geometry with a special material after all other scene rendering is complete.
Use the PokeAHoleMaterial
The Meta XR Plugin includes a prebuilt material called PokeAHoleMaterial for this purpose. To locate it in the Content Browser:
- Open the Content Browser settings and enable Show Plugin Content.
- Navigate to
/OculusXR/Materials/PokeAHoleMaterial.
Place this material on any mesh in your scene. At runtime, the mesh writes alpha values to the framebuffer, creating a window through which passthrough is visible.