Develop

Passthrough sample overview

Updated: May 11, 2026

Overview

This Blueprint-only sample provides nine levels that demonstrate passthrough features including layer configuration, color styling, color maps, LUT blending, masking, and lifecycle events. Each level focuses on a specific passthrough capability with a shared VRPTPawn that includes teleport locomotion.

What you will learn

  • Configure passthrough as a background layer for AR-style experiences
  • Apply passthrough styles including color curves, contrast, brightness, posterize, and edge detection
  • Create and apply 256-value color maps for custom color grading
  • Blend texture-based LUTs for passthrough color correction
  • Animate color scale and offset values at runtime
  • Mask passthrough using painted brush strokes and mesh geometry
  • Handle passthrough layer lifecycle events (resumed, paused)

Requirements

  • Meta Quest 2, Quest 3, or Quest 3S
  • Unreal Engine 5.x with the OculusXR plugin
  • Project settings: bInsightPassthroughEnabled=True and r.PostProcessing.PropagateAlpha=True
For build setup and configuration, see the sample README.

Get started

Clone or download the sample from the GitHub repository. Open the project in Unreal Engine 5 with the OculusXR plugin enabled. Verify that bInsightPassthroughEnabled is set to True in the OculusXR plugin settings and r.PostProcessing.PropagateAlpha is set to True in the project rendering settings. Build and deploy to your Meta Quest device. The sample opens to PTStartup, which serves as a splash screen before transitioning to the other levels.

Explore the sample

File / SceneWhat it demonstratesKey concepts
PTStartup (map)
Passthrough splash screen on startup
Initial passthrough layer setup
PTBackground (map)
AR-style passthrough with grabbable virtual objects
Background layer, object interaction
PTStyles (map)
Color curves, contrast, brightness, posterize, edge detection
Passthrough style parameters
PTColorMap (map)
256-value color map editor for custom grading
Per-channel color remapping
PTColorLut (map)
Texture-based LUTs with weight blending
LUT textures, blend weights
PTColorScaleAndOffset (map)
Animated color scale and offset (SEIZURE WARNING)
Runtime color animation
PTMaskedBrush (map)
Paint strokes that reveal passthrough
Brush-based masking, user input
PTMasked (map)
Poke-a-hole circle mesh revealing passthrough
Geometry-based masking
PTLayerResumedEvent (map)
Passthrough lifecycle event handling
Layer resumed/paused callbacks
VRPTPawn (Blueprint)
Shared pawn with teleport locomotion
Passthrough pawn setup, teleport

Runtime behavior

The sample opens to PTStartup, which displays a passthrough splash screen. From there, users navigate between nine levels using teleport locomotion provided by the shared VRPTPawn.
Each level demonstrates a distinct passthrough feature:
  • PTBackground shows passthrough as an AR backdrop with grabbable virtual objects floating in the real environment.
  • PTStyles provides controls to adjust color curves, contrast, brightness, posterize amount, and edge detection strength in real time.
  • PTColorMap exposes a 256-value editor where each entry remaps a brightness level to a custom color.
  • PTColorLut applies texture-based look-up tables with adjustable blend weights for smooth transitions between looks.
  • PTColorScaleAndOffset animates color scale and offset values continuously. Note: this level contains rapid color changes that may affect photosensitive users.
  • PTMaskedBrush lets users paint strokes in the air that reveal passthrough through the painted area.
  • PTMasked displays a movable circle mesh that acts as a portal revealing passthrough beneath virtual content.
  • PTLayerResumedEvent demonstrates handling passthrough layer lifecycle callbacks when the layer pauses or resumes.

Key concepts

Required project settings

Two settings must be enabled for passthrough to work correctly:
; In DefaultEngine.ini or plugin settings
bInsightPassthroughEnabled=True

; In rendering settings (required for alpha-based compositing)
r.PostProcessing.PropagateAlpha=True

Passthrough color styling

The PTStyles level applies real-time adjustments to the passthrough feed:
Color Curves  → Per-channel tone mapping
Contrast      → Overall contrast adjustment
Brightness    → Exposure-like brightness control
Posterize     → Reduces color levels for stylized look
Edge Detection → Highlights edges in the passthrough feed

Masked passthrough

Two masking approaches are demonstrated:
  • Brush masking (PTMaskedBrush): User paints strokes that define areas where passthrough shows through virtual content. Each stroke generates geometry that acts as a passthrough reveal mask.
  • Mesh masking (PTMasked): A circle mesh moves with the user’s hand, creating a poke-a-hole effect where passthrough is visible within the mesh bounds.

Extend the sample

  • Combine passthrough masking with Scene API to reveal passthrough only through detected windows or doors.
  • Create custom LUT textures for branded or artistic passthrough looks.
  • Use passthrough lifecycle events to gracefully handle system interruptions.
  • Apply edge detection styling for accessibility features that highlight real-world edges.