Skip to content

Built-in Views

The built-in views are the default diagnostics exported by DEFAULT_DEBUG_VIEWS from the root package. Each view is a small render source: the UI chooses a view, the render plan resolves only the required passes, and the compositor presents the result.

Examples below show both the native runtime and the optional R3F adapter; the same DEFAULT_DEBUG_VIEWS list works in either path — see Native Runtime.

Try them in the homepage demo.

SourceModeOutputUse it to check
beautypassthroughFinal scene color.Baseline rendering.
normalpassthroughView-space geometry normals.Model orientation, hard edges, and geometry normals.
depthdepthPass depth converted to view-space distance.Camera depth, clipping, and depth precision.
SourceModeOutputUse it to check
albedo / baseColorpassthroughBase color without lighting.Texture color and material authoring.
materialNormal / normalMappassthroughMaterial-perturbed normal output.Normal maps and tangent-space detail.
emissivepassthroughMaterial emissive color.Emissive contribution independent of lighting.
SourceChannelOutputUse it to check
roughnessRPacked roughness scalar.Overly glossy or rough materials.
metallic / metalnessGPacked metallic scalar.Metalness maps and PBR setup.
aoBPacked ambient occlusion scalar.AO map contribution.
opacity / transparencyAPacked opacity or inverse opacity.Transparent or cutout surfaces.

Scalar material data is packed into one RGBA target instead of allocating one render target per scalar view. That keeps the composer under common WebGPU color attachment limits.

Unsupported material properties use shader-side defaults instead of temporary material mutation:

  • roughness defaults to 1
  • metallic defaults to 0
  • AO defaults to 1, meaning no material AO contribution
  • opacity defaults to 1

ao reads material-authored AO maps. It is not a screen-space AO buffer unless your app exposes one through a custom view or a dedicated pass.

SourceModeOutputCost model
wireframepassthroughWhite wireframe override material.Renders only when selected or visible in a layout.
lightingOnlypassthroughNeutral non-metal material override.Renders only when selected or visible in a layout.
reflectionOnlypassthroughReflective neutral material override.Renders only when selected or visible in a layout.
overdrawheatmapMeasured contributor layer count (depth prepass + blend counter). Legend: 0 / 1 / 4 / 8+ layers. Click to sample integer layers from the pass buffer.Renders only when selected or visible in a layout.
overdrawVisualheatmapOptional additive overlap visualization (approx). Not in DEFAULT_DEBUG_VIEWS.Renders only when selected or visible in a layout.
lightComplexityheatmapLight Overlap — analytic dynamic light count (point/spot/rect). v1: no shadows, no cluster culling parity. Legend Low → High.Renders only when selected or visible in a layout.
shaderCostheatmapShader-cost heatmap from source-labeled shader-unit buckets.Renders only when selected or visible in a layout.

Demand-driven override passes add another scene render only when the selected layout or viewport plan actually needs that source.

See Performance Model for how single-view switching reuses compatible runtime pipelines.

import {
DEFAULT_DEBUG_VIEWS,
createDebugRenderPlan,
createDebugPipelineRuntime,
createDebugViewUniforms,
resolveDebugViewLayout,
updateDebugViewUniforms,
} from "threejs-debug-view"
const views = DEFAULT_DEBUG_VIEWS
const layout = resolveDebugViewLayout("quad")
const plan = createDebugRenderPlan(views, 0, layout)
const uniforms = createDebugViewUniforms()
const runtime = createDebugPipelineRuntime(scene, camera, plan, layout, renderer, uniforms)
function animate() {
updateDebugViewUniforms(uniforms, plan.activePipelineView, layout, plan.pipelineViews.length, 4)
runtime.pipeline.render()
requestAnimationFrame(animate)
}
import { DEFAULT_DEBUG_VIEWS } from "threejs-debug-view"
import { DebugViews } from "threejs-debug-view/r3f"
<DebugViews
views={DEFAULT_DEBUG_VIEWS}
activeView={0}
layout="quad"
paneCount={4}
showLabels
/>

Use explicit pane assignments when panes must keep fixed views.

<DebugViews
views={DEFAULT_DEBUG_VIEWS}
viewportViews={[
{ view: "beauty", label: "Beauty" },
{ view: "normal", label: "Normals" },
{ view: "roughness", label: "Roughness", resolutionScale: 0.5 },
{ view: "shaderCost", label: "Shader Complexity", resolutionScale: 0.5 },
]}
layout="quad"
paneCount={4}
showLabels
/>