Exp 01
Rack focus
Point anywhere in the photo and the lens pulls focus there, with real depth of field, bokeh and anamorphic flares, rendered live in your browser.
- Date
- October 2026
- Built with
- WebGL 2 · Three.js · GLSL · Depth Anything V2
How it’s made
The idea
On a film set, the focus puller decides where you look. Here you do: point at anything in the photo and the lens racks focus to it, with the shallow depth of field of a cine lens wide open.
From a flat photo to a scene with depth
The photos are mine, shot sharp from front to back. A neural network, Depth Anything V2, estimates how far away each pixel is. That depth map tells the lens how much to blur every point for any focus distance.
The lens, written as a shader
Each pixel gathers about 160 samples around it along a golden-angle spiral, as far as its blur reaches. Bright points weigh more, so they open into discs of light, or upright ovals with the anamorphic glass on. Horizontal flares, chromatic aberration, grain and a hint of focus breathing finish the look.
Light enough for a phone
The heavy pass only runs while the focus is moving, at half resolution; anything in focus comes straight from the original photo. Grain runs at 24 frames per second, and everything stops when the experiment is off screen.
