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


Problem
01A 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.
Pipeline
02Five 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.
threshold → blur × N → composite
→ color response → grain
N = round(radius² / 4)
radius = 4.9 → 6 blur iterationsPipeline notation from the existing renderer, not a shader-source excerpt.
Calibration
03I 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-10Key decisions
04Model 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.
Blur at quarter resolution
WhyWide, soft scattering has little high-frequency detail.
Trade-offA resolution approximation that must be checked against the reference.
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.
Results
05The 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 / Built
06Designed
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.
Next
07More calibrations against different film stocks, with the measured reference kept beside each parameter set.