mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
Highlight reconstruction rebuilds clipped channels from the chromaticity of unclipped pixels nearby. Three changes to that colour: - an unclipped pixel counts by its brightness ((m / 0.8 clip)^4, at most 1), filled coarse to fine by push-pull, so dark wires across a bright cloud no longer tint it (the iPhone frame of #548 turned cyan at Highlights -100); - pixels within 6 px of clipping (partly demosaiced from clipped samples, 25 % greener than the sky on that frame) give no colour unless nothing else does; - the rebuilt colour is drawn toward neutral at its brightest channel as more channels clip ((n - 1 + s) / 2, s rising as the next channel nears its clip). Binned previews keep each channel the mean of its block and mark blocks with a clipped sample in a mask (develop_binned_masked, reconstruct_masked), instead of taking the block maximum: one clipped specular sample no longer becomes a green speckle at 500 px (HUAWEI PRA-LX1, WAS-LX1A). The denoised twin uses the same mask. Camera-colour fitting keeps the old binning. RENDER_CACHE_VERSION 26 (adjust at merge).