VSE Gamma Cross

examples/vse-gamma-cross/

The GAMMA_CROSS fade is not the naive linear mix: it blends in a gamma-0.5 space, so the mid-cross dips below the sRGB lerp. Tiny per-frame renders are asserted against the closed form per frame.

Rendered headless by the example itself. Select it to enlarge.

witnesses out = ((1-t)*sqrt(A) + t*sqrt(B))^2 with t = (frame - start) / duration, never 1 inside the effect. The mid lerp deviation is 0.250; AgX-default sampling poisons the fit (Standard is mandatory).

tags sequencer rendering

runs on 4.5 LTS · 5.1 · 5.2 LTS

blender --background --python examples/vse-gamma-cross/vse_gamma_cross.py --

falsify it Breaks the contract on purpose and must exit 4

blender --background --python examples/vse-gamma-cross/vse_gamma_cross.py -- --swap-inputs

A runnable follow-up to vse-cut-list: the check renders tiny frames across a GAMMA_CROSS between signal-orange and azure strips and asserts every sample against the fade's actual math — because AI-generated sequencer code assumes the cross is the naive linear mix, and it is not.

What it witnesses: the fade math and the frame convention behind it.

What each check catches on failure: asserting the naive lerp as the expectation (exit 6, deviation 0.2490 at mid), the endpoint-inclusive t convention (exit 5), and swapped cross inputs (exit 4, input1=T2).

Version witness: the blend math is identical on Blender 4.5 LTS, 5.1 and 5.2 LTS — every sample matches to the quantization step. The creation contract from vse-cut-list still gates the timeline: strips (never .sequences), and new_effect ending in length= on 5.x vs frame_end= on 4.5.

The render is the evidence itself, mounted. All 32 frames of the cross are rendered by the sequencer and laid side by side as a filmstrip: the GAMMA_CROSS strip on top, and directly beneath it the same two strips crossed by the sequencer's linear CROSS effect, frame for frame. Both filmstrips are authentic sequencer pixels shown unaltered (closest-texel sampling, emission only, Standard view) on a hooded grading monitor beside a three-ball control surface. The gamma strip sinks into a dark neutral valley at mid-cross where the linear strip passes through violet; three small warm ticks mark the t = 1/2 column. A GAMMA_CROSS that was really a lerp would make the two strips identical, so the still visibly breaks with the contract.

Before shooting, the render path guards its own comparison (exit 9): every frame must fill its tile edge to edge — a 5.2 COLOR strip bakes the scene size into its width/height at creation, so strips built before the tile resolution is set letterbox into black bars (probe: in-frame spread 1.0) — and each strip's mid frame must match its closed form, so the lower strip really is the lerp (probe: wiring GAMMA_CROSS in its place fails at 0.249).

Run#

# Correctness check (tiny per-frame sample renders) — the CI check:
blender --background --python vse_gamma_cross.py --

# Falsifier: GC T2 -> T1. Must exit non-zero (inputs).
blender --background --python vse_gamma_cross.py -- --swap-inputs

# Also render the grading-monitor still (EEVEE on a GPU host; cycles on GPU-less):
blender --background --python vse_gamma_cross.py -- --output bench.png
blender --background --python vse_gamma_cross.py -- --output bench.png --engine cycles

Exit codes#

Per-script sequential checks. 9 is a valid check code; there is no rule against it.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3GC span off closed form
4GC inputs are not T1 → T2 (--swap-inputs lands here)
5Sample t convention drifted
6Cross sample off the gamma-0.5 closed form
7Mid-cross lerp deviation missing (naive mix)
8--output produced no file
9--output filmstrip guard: a frame not uniform, or a strip's mid frame off its closed form
10--output framing violation (gallery_framing)

The blender-smoke workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the needs-5.1 PR label, or manual dispatch). Smoke does not pass --output. Its catalog falsifier is --swap-inputs (expects exit 4).

Source

examples/vse-gamma-cross/vse_gamma_cross.py View the script on GitHub →
A hooded grading monitor showing two orange-to-blue filmstrips: the gamma cross on top sinks to dark grey in the middle, while the linear cross beneath it passes through violet.