LookLightweight
Depth of field
Camera-like focus blur.
Sharp at one distance, blurry closer and farther, like a camera lens. It makes a render feel photographed and tells the viewer where to look. Costly at full resolution.
- Breaks when
- expensive at full resfocus distance is hard to tune by prompt
- Also called
- DoF, bokeh, BokehPass
Prompts
Rack focus on scroll
pmndrs postprocessing DepthOfFieldEffect on a Three.js scene of eight objects at increasing distance: focusDistance driven by scroll progress (near object at 0, far at 1) with a spring, focalLength 0.02, bokehScale 3. Render the DoF pass at half resolution. Draw a small HTML readout of the current focus distance in meters.
Tilt-shift miniature
A tilt-shift look for an isometric city: blur increasing with distance from a horizontal band at the pointer’s y, using a custom shader pass with a 16-tap Poisson disc whose radius grows linearly outside the band. Boost saturation 15% inside the band. No depth buffer needed; explain why.
Bokeh shapes
Replace the round blur with hexagonal bokeh: in the DoF composite shader, sample a hexagonal kernel of 19 taps and weight highlights above luminance 0.9 by 4× so bright points bloom into hexagons. Show the kernel offsets as a constant array.
Related
Resources · 1
- postprocessing (pmndrs)Merges effects into one pass; prefer over three’s EffectComposer.pmndrsGitHub · code · demoJul 15, 2026