Ratatoskr/harness/scene
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nibu b48685b986
Some checks failed
CLA Assistant / CLAssistant (pull_request_target) Has been cancelled
Build pull request / Build pull request (pull_request) Has been cancelled
Check PR title / lint (pull_request_target) Has been cancelled
scene: ridge scene as the default background, no WebGL
Four ridge layers generated once on the CPU from CultMath value-noise fbm, each painted
once to an integer-size 2D canvas over a baked sky; CSS translate3d drift only. Pauses
hidden / reduced motion; falls back to a still image if rAF p95 > 33 ms over 2 s;
?probe=1 shows median/p95. Same createScene contract, tier flag still defaults off.
Ray-march scene stays behind backgroundScene.style = 'raymarch'.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 18:34:13 +00:00
..
bundle.cjs scene: ridge scene as the default background, no WebGL 2026-11-06 18:34:13 +00:00
demo.ts scene: half-float prepass start target where EXT_color_buffer_float is missing; say why createScene is null 2026-11-04 20:39:22 +00:00
drive.cjs harness: trace and diff modes, standalone demo page with steps/pixel readout 2026-11-04 18:26:23 +00:00
entry.ts Background scene: two-pass WebGL2 terrain and world tree with login pull-back 2026-10-31 21:43:40 +00:00
README.md harness: trace and diff modes, standalone demo page with steps/pixel readout 2026-11-04 18:26:23 +00:00
ridgeDemo.ts scene: ridge scene as the default background, no WebGL 2026-11-06 18:34:13 +00:00

Scene harness

Compiles, renders and times the background scene (src/app/features/scene/) in headless Chromium. Not shipped, not run by CI.

node bundle.cjs <outdir>                  # esbuild bundle of entry.ts plus an index.html
node drive.cjs <outdir> compile           # compile and link each stage, JSON report
node drive.cjs <outdir> shots <pngdir>    # rest, mid pull-back and pulled-back screenshots
node drive.cjs <outdir> measure           # GPU time per pass by timer query, two viewports, two levels
node drive.cjs <outdir> variants          # the same with source patches (no erosion, no tree, value-only fbm)
node drive.cjs <outdir> trace             # mean trace steps per pixel and pass ms at three camera poses, PREPASS=0,1 arms
node drive.cjs <outdir> diff <pngdir>     # one frozen frame with and without the prepass, pixel diff and both PNGs
node drive.cjs <outdir> phacelle          # the Phacelle gradient probe behind world.ts `phacelleGradBound`

Needs esbuild and playwright@1.48.2 on NODE_PATH and a Chromium. The first run was done on a host with no GPU, so drive.cjs launches with --use-angle=swiftshader (software Vulkan). On a machine with a GPU, remove those flags to measure the real device. bundle.cjs must run from a directory whose ancestors hold no empty package.json (esbuild reads them).

Timings from SwiftShader are CPU time: use them for the split between passes and for before and after of one change, never as a phone frame time.