A Tensei analog render made from the latest capture bundle, with reflected daylight and visible film texture.

Tensei algorithm, from first principles

A photograph is a measurement before it is a picture.

Tensei treats capture and rendering as two separate jobs. First it preserves as much trustworthy light information as the phone can measure. Then it spends that information through an analog model: exposure, optics, halation, film response, print response, and grain.

Start with light

The starting fact

The world contains more light than a normal photo can show.

A camera sensor counts photons. Brighter parts of the scene produce larger numbers; darker parts produce smaller numbers. If you double the photons, the sensor value roughly doubles. That is called linear light.

A JPEG or phone screen cannot hold the whole range of real scene light. It has to compress the measurement into a visible picture. Once that compression happens, highlight detail, shadow separation, and the relationship between bright and dark regions can be lost.

Tensei's central rule is simple: do not fake richness after the image has already been flattened. Keep the measurement alive for as long as possible, then make visible decisions with the hidden evidence still available.

Light

The physical signal in the scene. It is not yet a color grade or a style.

Exposure

The camera's choice of how much light to collect before the frame is read.

Dynamic range

The distance between the darkest usable signal and the brightest usable signal.

Linear light

A math space where twice as much light is represented as twice the value.

Headroom

Extra highlight information that exists in the capture but cannot fit directly into the visible image.

Tone curve

The compression function that turns a large measurement range into a displayable photograph.

The evidence Tensei keeps

The renderer does not start with one ordinary image.

The selected capture is a fresh city bundle with visible headroom: 20260522-213012-487-EF523506. Its headroom map is intentionally shown below because it teaches the core idea: there is information outside the ordinary visible frame.

Read the three images left to right. The first is the visible city merge. The second is not a photo; it is the same scene's headroom map, inverted for display. In this scene, pale sky and facade areas have little extra reserve, while darker building, sign, and street structure marks stronger stored headroom. The third is the final analog render after the look model uses both.

Panel 1 What can be shown now

The merged city image after capture, before hidden highlight evidence changes the final look.

Panel 2 What was still measured

The inverted map fills its panel: pale means little reserve; dark city detail means stored headroom.

Panel 3 What the renderer spends

The final photograph after exposure, rolloff, halation, color, print response, and grain.

Merged source frame before the final analog look.
Visible base The image you could display if all hidden highlight evidence were ignored.
Inverted grayscale headroom map of the city scene, mostly pale with darker buildings and street detail showing stronger stored highlight information.
Inverted headroom map Pale areas have little reserve; darker city detail marks stronger stored headroom.
Final Tensei analog render.
Analog render The user-facing photograph after exposure, halation, color, print, and grain.

The algorithm

Each stage has one job, and the output of one stage becomes evidence for the next.

  1. 01

    Collect evidence, not just a frame.

    One phone frame is noisy and fragile. Tensei buffers many recent frames, chooses a useful burst, and records the camera metadata that explains how those frames were made.

    Principle
    More independent measurements can reveal a cleaner signal than any single measurement.
    Consequence
    The final look can lift useful shadows without pretending sensor noise is detail.
  2. 02

    Align and merge the frames.

    The frames are not identical because hands move, objects move, and the sensor samples at different instants. Tensei registers the selected frames into the same coordinate system, weights them, and merges them into a higher-confidence light estimate.

    Principle
    Averaging only helps when the samples refer to the same part of the world.
    Consequence
    Agreement becomes signal; disagreement is limited instead of smeared through the picture.
  3. 03

    Keep the math in linear light.

    Brightness arithmetic is only physically meaningful before the image is display-encoded. Tensei keeps the merge in a linear, high-precision representation so that exposure, noise, highlight pressure, and scattering operate on light rather than on already-styled pixels.

    Principle
    If the numbers represent light, adding and spreading them means something physical.
    Consequence
    Halation and exposure rolloff can be modeled as light behavior, not as a screen-space glow filter.
  4. 04

    Split appearance from headroom.

    Tensei forms a displayable low dynamic range image, but it does not throw away the extra highlight signal. It stores that extra signal as a headroom map. The visible image answers "what should I show here?" The map answers "how much brighter was this place in the real measurement?"

    Principle
    A compressed picture and a hidden-light map can carry more truth than either one alone.
    Consequence
    Highlights can affect color, glow, and rolloff even after the visible image has been compressed.
  5. 05

    Choose exposure under constraints.

    The renderer decides how bright the photograph should feel while honoring the scene assessment. It can lift a dark scene, but it subtracts unresolved noise and watches highlight pressure. The point is not to make everything bright; it is to make the important signal visible without lying about what was measured.

    Principle
    Exposure is a tradeoff, not a brightness knob.
    Consequence
    Shadows become readable when they have signal, and highlights roll off before they become plastic white patches.
  6. 06

    Move highlight energy instead of painting glow.

    In film, bright light can scatter through layers of emulsion and return as a warm halo. Tensei models that as an energy transfer: identify bright sources using color and headroom, spread a controlled amount through a multipass kernel, tint it, and composite it back with compensation.

    Principle
    A halo is convincing when it behaves like displaced light, not when white is added on top.
    Consequence
    The render gets warmth around strong light while preserving local density and texture.
  7. 07

    Translate the result through film and paper.

    The analog look is a response model, not a preset overlay. Tensei passes the image through optics, negative density, color response, print density, palette constraints, skin protection, vignette, and density-space grain.

    Principle
    Analog character comes from interacting response curves, not from one global tint.
    Consequence
    The photograph can feel imperfect and tactile without losing the measured structure underneath.

What this buys you

The final image feels photographic because every visible effect has a reason.

Readable dark scenes

The burst merge improves signal-to-noise before the render decides how far shadows can be lifted.

Highlights with memory

The headroom map keeps bright-scene evidence available after the image has been compressed for display.

Analog texture without a costume

Optics, halation, film color, print density, and grain each operate on the part of the image they are meant to explain.

Implementation anchor

The page is written in plain language, but it maps to the current pipeline.

Capture evidence

The selected bundle records 32 available buffered frames, a 32-frame merge request, exposure metadata, motion weights, replay outputs, and a gain map.

Analog stage order

analogOpticsAcutanceLayer to analogHalationBloomLayer to analogColorRenditionLayer to analogVignetteGrainFinalLayer.

Current look family

Fresh disposable daylight 400: negative density, headroom halation, print density, restrained palette, skin protection, vignette, and grain.