Read the depth that came before.
Color tells you what was rendered. Depth tells you where it was rendered. Inspect the previous viewport’s depth attachment, then convert it into a useful linear mask inside a transparent surface.
Preparing the depth attachment and the transparent inspection surface…
- backend
- —
- view
- —
- depth node
- —
- source
- —
- render order
- —
- frame ms
- —
The depth graph will be compiled after the renderer selects its backend.
viewportLinearDepth
viewportDepthTexture()
linearDepth()
viewportSafeUV()
copy before draw
renderOrder 10
The opaque source world renders first. The window reads the depth attachment that exists at render order 10, so the sample describes the scene behind the surface.
WebGPU executes the viewport depth nodes. The forced WebGL2 route is an explicit direct-color reference because it cannot execute the TSL depth graph.
Derived from the official ViewportDepthTextureNode, ViewportDepthNode, TSL, and depth texture example contracts. Use ?forceWebGL=1 to inspect the labeled fallback.
The renderer could not create the study.