THREE.JS / FOUNDATIONS — WEBGPU DEPTH TEXTURE
A scene, then its distance field.
A bounded implementation of the official depth-target contract: render the scene into a floating-point depth attachment, then display that attachment through a fullscreen preview.
Initializing depth texture—
Preparing the target, depth attachment, and preview.
Study issue
- BACKEND
- —
- TARGET
- —
- DEPTH
- —
- SCENE
- —
- VIEW
- —
- STATE
- —
- SAMPLE
- —
Depth attachment controlsTSL / REFERENCE
Depth texture contract
Native WebGPU assigns a FloatType DepthTexture to a RenderTarget, renders the scene into that target, then exposes the attachment through a QuadMesh node material. WebGL2 keeps an explicit depth-texture shader reference.
Derived from the pinned official WebGPU Depth Texture example. This bounded study uses deterministic torus-knot placement and does not claim the official random field, exact page/pixels, arbitrary device/performance coverage, or whole-example fidelity.