Skip to content
ALI LINOpen to full-time roles
01 / 04←→×

Latent

A film physics engine that gives AI video real halation and grain, running in a browser tab.

role
Design & engineering
stack
WebGL2 · GLSL
timeline
Shipped July 2026
status
Live
latentfilm.com ↗
Recorded Latent calibration output at radius 4.9
Original film reference scan with light blooming around fluorescent fixtures
REFERENCE / film scanLATENT / radius 4.9Fig. 01 · Recorded calibration images. Drag to compare.
Recorded radius

A LUT maps one pixel value to another and cannot see the pixel next to it. Halation is entirely about the neighbourhood.

AI artists want film quality, but prompting “35mm CineStill 800T” does not produce film physics. Plugins like Dehancer model it properly, but they sit outside the browser and break the generation loop. Latent runs in the tab you are already in.

Five GL stages run on the GPU. Their order follows where each step happens on real film; the blur stage performs repeated horizontal and vertical draws.

Masks highlights using gamma-space luminance so the threshold follows perceived brightness.

Renderer / execution order
threshold → blur × N → composite
          → color response → grain

N = round(radius² / 4)
radius = 4.9 → 6 blur iterations

Pipeline notation from the existing renderer, not a shader-source excerpt.

I shot and scanned 800T myself and matched the engine to the negatives: threshold 0.55, radius 4.9, tint 1.2 / 0.03 / 0.03. Green and blue near zero, so the halo is almost pure red, not the warm orange most filters give you.

Above a 9.8 radius cap three settings produced the same image, and my eye could not tell them apart. A dark-field R minus B metric caught it.

Calibration recorded 2026-07-10
Fig. 02 · Halation calibration against the original negative
Fig. 03 · Recorded spectral analysis
Fig. 04 · Calibration workbench and parameter panel
No.DecisionWhyTrade-off
D1

Model neighborhoods, not a LUT

WhyHalation spreads light into nearby pixels. A per-pixel color map cannot express that.

Trade-offA multipass renderer with intermediate textures.

D2

Blur at quarter resolution

WhyWide, soft scattering has little high-frequency detail.

Trade-offA resolution approximation that must be checked against the reference.

D3

Apply grain last

WhyThe developed grain responds to the exposure after halation and color response.

Trade-offThe order is fixed by the physical model rather than arbitrary filter stacking.

5GL stages
4.9Calibrated 800T radius
0.55Highlight threshold

The film engine shipped in July 2026. The calibration workbench and measurements make the output inspectable alongside the source negative.

Device-specific FPS and frame-time benchmarks are not documented in this case study.

Designed

The film workbench, parameter controls, comparison workflow, and visual references drawn from original scans.

Built

The WebGL2 shader pipeline, stock parameter sets, calibration tooling, and measurements used to check the model against those references.

More calibrations against different film stocks, with the measured reference kept beside each parameter set.

Next project · 02Teardown №1
→