Smooth look on WebGPU: WGSL port fed by GPU inputs and CPU overrides (t88 phase 2c)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 22:42:12 -04:00
co-authored by Claude Opus 5.5
parent 65054e691b
commit 452b6aed32
26 changed files with 780 additions and 80 deletions
+14
View File
@@ -4,6 +4,20 @@ What agents have done, newest first. Add an entry for every piece of work: the d
note or request it was for, what changed, the files touched, the tests run, and anything left
open or not verified. Keep each entry short; the git history has the details.
## 2026-10-27: t88 phase 2c, smooth look on WebGPU (Codex + Claude Code)
- WGSL port of the smooth look (`src/render/gpu/smooth.js`, `smooth-shader.js`, `smooth-slope.js`):
the GPU colour pass writes all four smooth inputs for plain cells; the CPU rare-cell overrides
(`cell.js`, now also mold walls) fill them for built pieces and objects (12.73/3.41/0.38% of
factory cells at zoom 12/6/2). Field AO via three GPU mip passes; nine-tap glow kept; no
WebGPU `smoothPace` (max GPU time 1.24 ms). Legacy still selectable.
- Checked by Codex: 21 screenshot pairs legacy vs WebGPU, mean RGB error 0.01-0.22/255, small
counts off by more than 8 (thin AO and edge rounding), no missing shapes or open joins; input
readbacks equal legacy. Smooth factory drawWorld zoom 2 28.2 -> 10.0 ms; real loop zoom 2 CPU
p50/p95 34.7/39.0 -> 14.5/15.7 ms. Claude did not inspect the images (token budget).
- Open for 2d: adapters with fewer than five storage textures per stage fall back to legacy.
- Tests: `python3 test/run_all.py --browser` passed.
## 2026-10-27: t88 phase 2b, lighting on the GPU (Codex + Claude Code)
- `src/render/gpu/light.js`: light sources per light cell (transmittance, sky from `roofY`, heat,