Screen effectsNewLight sheets in the air
Volumetric air after the scene, for three.js WebGPU in TSL.

The HaTac engine’s cinematic lens, lifted engine-free with the parts of bloom, present and light shafts it drives.
The HaTac engine’s cinematic lens, lifted engine-free with the parts of bloom, present and light shafts it drives: depth of field from a signed circle of confusion with a 24-tap round or bladed pupil on a prefiltered quarter-size surface (eight taps at half size on Medium), the focused subject restored from native colour and depth so type and edges stay sharp; a shutter that smears only the camera’s own travel between rendered frames, from last frame’s view-projection rebased onto this eye; shafts from a low sun through gaps in the skyline on an isolated twelfth-size field; bloom from a coarser first level; and one display pass that mixes the scattering, applies a lift, gamma, gain and highlight shoulder, then grain that moves only when the picture does, a colour fringe and anamorphic streaks from the brightest lights. Focus is set in metres and pulled in dioptres, so a rack moves evenly through the depths. A small host runs the chain on any raw WebGPU page with an HDR target and reverse-Z depth. No three.js, no dependencies.
Measured 28 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 158, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.90–1.36, CPU 0.54–0.59 ms). What ran: The lens alone on the engine’s optics bench (its gallery shader, one cheap pass): a 24-tap six-bladed pupil racking between dials at 4, 8 and 16 m, bloom at a quarter-size first level, shafts at a twelfth, streak, fringe and grain; the camera at rest (the shutter closed). Phones: tiers are being measured next.
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
install("film-lens")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it upnear.frame()), never per input event or per cue: counting events as frames overstates the pan’s speed and smears a seek.cut: true): the shutter then stays closed and the bloom’s settle history is dropped.subjectMoving).prepareSamples(n) before changing the depth attachment’s sample count (1 or 4): the lens and the shafts compile a variant for each.From HaTac. Adapted from published work, named below.
Hannes Andersson: The HaTac engine’s lens, bloom, present and light-shaft modules, their decisions, tests and measurements, and the optics gallery; the library’s host and demo.
Jorge Jimenez, Next-generation post-processing in Call of Duty: Advanced Warfare (SIGGRAPH 2014): The bloom’s 13-tap downsample with a Karis-weighted first level and the tent upsample, and the gathered depth of field’s idea of a prefiltered half-size surface with signed circles of confusion.
Kenny Mitchell, Volumetric light scattering as a post-process (GPU Gems 3, 2007): The light shafts: a march from each pixel toward the sun over the sky mask, weighted by a decay.
Jorge Jimenez, Interleaved gradient noise (Next generation post processing in Call of Duty: Advanced Warfare, 2014): The per-pixel offset that turns the shafts’ step bands into grain, and the grain’s own pattern.
Krzysztof Narkowicz, ACES filmic tone mapping curve (2016): The fitted curve present tone maps with (aces-fit).
Inigo Quilez, distance functions: The demo’s jetty is drawn with his signed distance functions (box, capsule, capped cylinder, torus, ellipsoid).