Skip to content

Draw soft light as gradient-aligned bands in low-contrast cells - #17

Merged
vaprdev merged 3 commits into
mainfrom
gradient-cells
Oct 10, 2026
Merged

vaprdev merged 3 commits into
mainfrom
gradient-cells

Conversation

@vaprdev

@vaprdev vaprdev commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

In low-contrast cells (glows, haze, sky gradients) the free two-color fit picked whatever octant pattern happened to fit best, so soft light came out as speckle. bandSplit() now gives those cells a split aligned with the gradient: halves, quarters or a middle stripe, kept with the same hysteresis as other splits.

 writeOctant / writeQuadrant(cell)
+  band = bandSplit(cell)       # only when the cell is soft (flat fit error under SOFT)
+  if band fits nearly as well as the free split → draw the band
   otherwise → best free split

Evidence

Reference (scene, brightened) | before (origin/main) | after:

gradient cells
gradient cells 2

Cost, dev/check.ts tundra ocean city jungle back to back twice: 7.20 → 7.40 ms/frame. Worst flicker 83 → 87 cells (limit 150).

Verified: typecheck, build, dev/check.ts --max-ms=60 in octant and quadrant mode (0 failed), --verify-dirty 90/90, screenshots up to date.

Merge Danger

Door: two-way

Blast Radius: glyphs in soft cells of every wallpaper.

@vaprdev
vaprdev merged commit c428c2b into main Oct 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant