Energy, not averaging
A bright light stays bright after defocus. The lens redistributes its energy into a disc; a Gaussian averages already-clipped pixels and kills the glow.
Optical simulator · per-surface ray tracing
Light enters through the first glass, refracts at every surface, gets clipped by the aperture and reaches the sensor. The bokeh in your image is born from that path — not from a blur filter.
01 — Before & after
A Gaussian blur spreads pixels that are already recorded. A lens spreads light. Drag the divider and compare the same scene — the optical side was computed live, on this page, by tracing rays through a Double-Gauss 50 mm.
A bright light stays bright after defocus. The lens redistributes its energy into a disc; a Gaussian averages already-clipped pixels and kills the glow.
The aperture blades draw the bokeh. Stop down and the circle becomes a heptagon; round the blades and it turns circular again.
Off-axis, the beam is clipped by the front and rear glass. The disc becomes a cat's eye pointing to the center of the frame.
With spherical aberration, blur in front of and behind the focus plane differs: a bright ring on one side, a soft center on the other.
Each glass has its own index and dispersion. Red, green and blue focus at different places and create fringes on the disc edges.
With RGB + depth, each plane gets the blur of its own distance and the foreground covers the discs behind it — with no halo of the subject's color.
02 — App renders
Real output from the simulator. Drag each divider.
03 — Live lab
This is a lightweight version of the engine running in your browser. Drag a glass element to move it, the blue handles to change curvature and the orange ones to open or close the aperture. The bar under the lens focuses. The bokeh on the right is recomputed on every move.
Real 3D ray tracing (vector Snell, spherical surfaces, diameter clipping and polygonal iris) with Abbe-based dispersion at three wavelengths. Simplified for the web: no Fresnel, coatings, ghosts, diffraction or depth. The full app traces on Vulkan/CUDA with up to 1024 samples per pixel.
04 — The app
Pick a lens, open an image, video or depth map and see the preview on the GPU. Edit the prescription, follow the light path and the blur shape at the center and across the field.
Update · Desktop app 1.2.17
1.2.17 brings flare born from the image’s own lights, iris diffraction, real dirt on the glass and filters you rotate in 3D. All computed by the same lens that makes your bokeh.
Reflections between glass surfaces come from the photo’s light sources and depend on the lens, coating and aperture. Flare is added to the image without darkening the rest.
RealFlare styleThe star is the diffraction of the current iris: even blades give N rays, odd blades 2N. Stopping down strengthens it; out of focus it turns into bokeh.
iris FFT · 16 λFingerprints, dust, scratches and fungus on the front element. Dirt only shows where light is strong and defocuses with the aperture.
4 layersRotate the glass in a 3D viewer. There are 8 prism types with blurred edges, a continuous Black Mist and a seamless Kaleidoscope.
try it below ↓Drag panels and dock them top, sides or bottom, or float them as windows. The top menu has File, Edit, Effects, View, Window and Help.
saved layoutThe depth map matches the blur. Clipped highlights in 8-bit photos regain energy before bokeh and flare.
up to 8 EVPlugin preview with the 1.2.17 look: After Effects, DaVinci Resolve and Nuke (Portuguese UI) and Blender 0.4.1. Stable English plugins remain available.
Portuguese, English and Simplified Chinese are included in the same app. This website is also available in all three languages.
New · Live 3D filters
The same filter code as the app, running in WebGL2. On the left, rotate the glass in 3D. On the right, see the effect on the photo and drag to compare with the original. You can try it with your own photo.
Lightweight preview of the 15 filters and 8 prisms in app 1.2.17. In the app, filters run after the optical blur, in floating-point linear light. Your photo is processed only in your browser.
05 — Library
Double-Gauss, Sonnar, Tessar, Petzval, triplets, anamorphics and retrofocus. Each profile changes the optical model, focal length, glass size, maximum aperture and iris.
| Lens | Focal | Aperture | Family | Blades | Character |
|---|
06 — Engine
07 — Platforms
App 1.2.17 is available for Windows x64 and includes all three languages. The integrations below have separate packages.
Upcoming integrations of the same optical engine: