mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 11:27:21 -06:00
Brush phase 6c. A stroke composites in float, then each pixel is rounded to 8 bits, so a soft, low-flow stroke's gentle gradient collapses into flat bands (the audit counted 35 levels against 119 at 16-bit). The pixels the stroke changes now get the same deterministic per-pixel offset of under half a level on every channel before quantisation: - fractional values round up or down in proportion, so bands become fine grain; - a value already on an 8-bit level rounds back to itself, so exact colours never change, and pixels the stroke doesn't touch are left alone; - the offset depends only on the pixel's position, so the live preview, the commit and a replay agree. 16-bit and float targets are unchanged.