WebGPU pixel look: GPU colours the world, CPU only rare cells (t88 phase 2a)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 19:49:36 -04:00
co-authored by Claude Opus 5.5
parent b2c9ad9533
commit fc05146887
29 changed files with 949 additions and 386 deletions
+3 -2
View File
@@ -38,6 +38,7 @@ def main():
pg.on('pageerror', lambda e: errors.append(str(e)))
pg.add_init_script('window.requestAnimationFrame = () => 0;')
pg.goto(url)
pg.evaluate('CAPS_CHECK')
pg.add_script_tag(content=(ROOT / 'tools/perf-scenes.js').read_text())
assert pg.evaluate('crossOriginIsolated')
# Compare to the unwrapped functions, and hash the byte representation of all grid state.
@@ -66,8 +67,8 @@ def main():
performance.now = () => 5000;
R.rain = rainAt(Math.max(0, Math.min(W - 1, Math.floor(R.camX + R.bw / 2))));
try {
PERF_MARKS = false; drawWorld(); const a = R.canvas.toDataURL();
PERF_MARKS = true; drawWorld(); const b = R.canvas.toDataURL();
PERF_MARKS = false; drawWorld(); const a = worldPixelContext().canvas.toDataURL();
PERF_MARKS = true; drawWorld(); const b = worldPixelContext().canvas.toDataURL();
return a === b;
} finally { PERF_MARKS = false; performance.now = now; }
}''', look)