Files
lightcraft/crates/gpu
Matt MarkhamandCopilot App 9122443f22 pipeline: bound dehaze veil by the pixel's own minimum channel (#2504)
The dark channel is a Gaussian blur, not a patch minimum, so near a
bright neighbour it can credit a dark pixel with more veil than its own
minimum channel holds; (c - air*(1-t))/t then went negative and was
clamped to black - the blotches on CR3 raws. Bound the credited veil by
the pixel's own minimum channel (d = min(dark/air_pre, c_min/air)),
which provably keeps every channel non-negative for any gain, airlight
estimate or windowed fixed_air, in both the CPU and GPU paths. Also
zero-guards the divisions, fixing a 0/0 NaN on an all-black frame.

Regression test: a uniform dark field beside a bright haze must render
uniformly; pre-fix the bleed zone crushed to black.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-22 11:21:40 +00:00
..
2026-10-15 03:40:17 -04:00