- color 0
- -
- color 1
- -
- color 2
- -
- depth
- -
- payload
- -
- builds
- -
Opaque materials write color, view position plus metalness, and view normal plus roughness into named attachments.
Deferred rendering stores opaque geometry data first, then reconstructs lighting from a G-buffer. This lab makes the named attachments, override context, transparent forward lane, and final pipeline choice visible beside a direct WebGL2 reference.
Creating the scene, G-buffer, and deferred resolve pass.
Opaque materials write color, view position plus metalness, and view normal plus roughness into named attachments.
overrideNodes() supplies the stored position, direction, and normal back to a standardized PBR material.
Deferred lighting is WebGPU-only here; WebGL2 remains a forward-render reference.
Opaque geometry is rendered once into named color and depth attachments.
Albedo, view position, metalness, normal, and roughness share one pass.
A fullscreen material reconstructs standard lighting from the stored fields.
Transparent geometry remains forward-rendered against the opaque depth.
Switch inspection views and lighting modes, then measure the active output path.
This is a deterministic adaptation of the official deferred example: generated geometry and local lights replace the exact teapot, HDR, Inspector, and scene framing, while the pass, MRT, override context, depth handoff, and RenderPipeline contracts remain executable.
Sources: official deferred example · PassNode · MRTNode · RenderPipeline · TSL