THREE.JS / FOUNDATIONS 36

Focus is a render pass.

Depth of field turns the scene's view-space depth into a lens model: choose a focal plane, set the focal length, then shape the bokeh that blurs everything else.

Initializing depth of field—
Preparing the view-Z depth pass and optical blur…

Click a visible object to move the focal plane there. WebGPU uses TSL view-Z DOF; forced WebGL2 uses the classic BokehPass depth target for a real compatibility comparison.

LAB 36 / DEPTH OF FIELD