mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 10:37:11 -06:00
Linear and radial gradients, luminance and colour ranges and brush strokes are evaluated by a WGSL kernel per component, combined (add/subtract/intersect, component and mask invert, amount) into one device buffer of alpha planes that the per-pixel stage reads directly. Brushes use the CPU's dabs (`masks::brush_dabs`, shared with the rasterizer) and the closed form of the flow accumulation (1 − Π(1 − a·flow), capped at density). Sky / Subject / Background and other heuristic shapes, and brushes of more than 4096 dabs, are evaluated on the CPU inside the same render and uploaded. New equivalence case with CPU-evaluated shapes, subtract/intersect and amount; all cases stay at max 1 LSB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>