Region alpha applies once after the blur: no more overlap stacking
Per-stroke alpha baked into every stroke/disc accumulated through source-over compositing: one shape 0.35, an orphan disc over anything 1-0.65^2 ~ 0.58, hubs toward 1.0 — a lone node's glow read as a darker double-counted spot on top of other regions. The pipeline is now dilate at full opacity -> blur -> scale the whole field by edgeAlpha once at the end. Painted at 1, the alpha channel is a pure coverage indicator (overlaps of any count contribute exactly 1.0), the blur smooths it into a coverage falloff, and the final scaling gives a constant interior alpha everywhere covered, varying only across the blur edges. The blur-off path also runs the readback now (radius 0 = copy) so the end-alpha applies uniformly without blur. Interaction change (user-flagged, accepted for now): different clusters' overlapping halos no longer blend hues proportionally — the later-painted cluster covers the earlier, ownership boundaries softened only by the blur reach. Verified: old build spread 36k of 55k tinted pixels above alpha 100 (stacking); new build concentrates at 70-90 (0.35*255=89 interior with falloff), and an orphan disc now reads no brighter than the skeleton it sits on.
This commit is contained in:
@@ -95,7 +95,10 @@ export interface RegionTuning {
|
||||
/** Max bitmap dimension (cell = worldSpan / this). Fixed set:
|
||||
* see REGION_BITMAP_OPTIONS (dropdown in the panel). */
|
||||
bitmap: number;
|
||||
/** Per-stroke alpha; overlapping strokes stack toward the core. */
|
||||
/** Region alpha, applied ONCE after the blur (dilate at full
|
||||
* opacity → blur → scale). Constant interior, soft edges; overlaps
|
||||
* of any count never stack (DECIDED 2026-09-14 — per-stroke alpha
|
||||
* accumulated through source-over and double-counted orphans). */
|
||||
edgeAlpha: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user