docs(renderer): renderer-unification design spec#385
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
skymap | 5ba7c11 | Commit Preview URL Branch Preview URL |
Jul 06 2026, 05:24 PM |
…acklog Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…clarification Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…leted/ /feature-done audit verdict: READY. Tests 3765/3765 green (606 files), typecheck clean (both configs), all checkboxes ticked (visual gates user-attested), zero new TODO/FIXME markers, no unexpected files vs the plans' File Structure sections, no backlog entries to sweep. Deferred (documented in the spec's "Later" section): main-app adapter behind GalaxyEngineHandle after renderer unification (#385), catalog-driven parameterisation, render-on-demand/pick/mobile budgets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tool (#402) * docs(spec): galaxy-renderer tool — port the Claude Design spike as a dev tool Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(plan): galaxy-renderer tool — three-part TDD implementation plan Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): tool scaffold — vite app on port 5400 with tool-local WESL root Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(utils): makeValueNoise — seeded trilinear 3D value noise Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): model type vocabulary + tempColor/hiiPalette helpers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): classifyHubbleType + splitStarBudget table dispatch Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(galaxy-renderer): bulgeSize falsy fallback matches the spike (|| not ??) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): stride-8 star/dust writers — overflow throws Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): makeWarpOffset — S-shaped, twist-precessing outer-disk warp Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): GalaxyBuildContext — explicit closure env, RNG draw-order contract Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): population builders I — bulge, bar geometry, bar, disk Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): population builders II — spiral arms, irregular clumps, halo, globulars Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): dust field + arm/bar/lenticular/irregular dust builders Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): generateGalaxy orchestrator + worker entry — determinism battery Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(plan): tick plan-01 checkboxes — all tasks executed and reviewed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): engine type contracts — handle surface, render/lod split Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): pure camera helpers — orbitEye, panAxes, lensShift Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): packCameraUniforms — 112-byte camera UBO layout Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): bakeExtraTransform — rigid transform baked into instance buffers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): seven WESL shaders — stars, dust, dual-filter bloom, tonemap composite Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): createGalaxyEngine — five-pass HDR chain, worker-backed regen, orbit input Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): defaults + Viewport + live main.tsx — first pixels Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(galaxy-renderer): plan-02 gate — fix upsample header, README controls + pass chain Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): store factory + galaxy/render/lod slices Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): compare/extras/ui slices — six-slice store with AppState trip-wire Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): data tables — paramSpec, stage patches, reference galaxies Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): rng-injected randomizer + background-galaxy spec builder Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): preset wire format — spike-compatible flat r-bag, split at the seam Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): descriptor pipeline — rotation/scale-invariant galaxy fingerprints Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(galaxy-renderer): dominantArms docstring states the true flat-spectrum behaviour Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): fitPlan + autoFit coordinate descent + image descriptor loader Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): engineBridge — the single store→engine imperative boundary Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(galaxy-renderer): pin the bridge's fire-time fit suppression Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): runCompareFit — auto-fit orchestration over store + engine Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(galaxy-renderer): fitStarted precedes the photo load; error path preserves null score Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): UI foundation — shared vocabulary + section/slider/tonemap primitives Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(galaxy-renderer): TonemapSelect composes a form-control vocabulary class, not btnGhost Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): control panel — type picker, sliders, extras, presets Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(galaxy-renderer): restore hii + dust-ring sliders via PARAM_SPEC extension Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(galaxy-renderer): randomizer skips slider-only PARAM_SPEC keys — spike-faithful sampling Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(galaxy-renderer): Hud + ComparePanel + App assembly — feature-complete tool Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(galaxy-renderer): final-review fix wave — dispose completeness, comments, README, plan ticks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(plan): mark galaxy-renderer tool complete — plans + spec to completed/ /feature-done audit verdict: READY. Tests 3765/3765 green (606 files), typecheck clean (both configs), all checkboxes ticked (visual gates user-attested), zero new TODO/FIXME markers, no unexpected files vs the plans' File Structure sections, no backlog entries to sweep. Deferred (documented in the spec's "Later" section): main-app adapter behind GalaxyEngineHandle after renderer unification (#385), catalog-driven parameterisation, render-on-demand/pick/mobile budgets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The 2026-07-02 powers-of-ten architecture review re-checked this spec's premises against current main (post #394/#396) and found four stale spots: - Migration table: add clipPathDebugPass (UI_PASSES member since the tour work) and note drawPickDebugOverlay as a debug composite step — main already has three hand-rolled composites before #386 adds its fourth. - FrameStep program: the volume prepass + flow compute are nested inside BOTH HDR encoder branches today; the program lifts them, and the executor owns the single/split timing fork as an execution strategy (TIMED_SLOT_NAMES then derives from the program). - Pick: new prerequisite — camera-for-pick becomes a value from the slab table; the pointSpritesPass byte-snapshot side channel (lastFrameUniformBytes) makes per-slab pick unimplementable. - Phase 2: renderer factories declare targetFormat explicitly; three coexisting initGpu idioms named; GpuContext.format = swap format only. Also: state PR #386 (foreground path) is a draft, not merged; phase-1 merge-order handling; cite the real tone-map curve test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Re-verified the spec against current
Also corrected the framing that the foreground path is on main (it's draft PR #386), added phase-1 merge-order handling for #386, and cited the actual tone-map curve test. Branch merged with 🤖 Generated with Claude Code |
Iteration outcome (all five locked with the user): - FrameStep render steps carry an explicit slab: the (target, slab) pair selects each step's layer set by construction; buildFrame() generates the same shape when slabs go dynamic. - ContentSpace dropped — layers carry a plain slab: number. - New SlabView, built once per render step by the executor and threaded into draw/drawPick; no vpFor on ReadyFrameContext, layers/renderers stay slab-ignorant, the per-pass ctx.vp casts retire. - No deps: PassDeps on layers — layers read state.gpu.* directly; PassDeps deleted in phase 2 (gpu-handle-nullability end-state). - flow compute stays a FRAME step via a COMPUTE name→fn table. Adds the executor contract sketch (strategy axis + derived timing slots) and updates the file inventory. No open questions remain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plans (one per spec phase, executed via subagent-driven-development): - 01-compositor: Compositor primitive (all three blends) + the postProcess tonemap repoint; shaders/toneMap/ deleted; curve mirror moves in. - 02-registry-and-program: eight @types/engine/frame types, slabs.ts (NEAR0/COSMO + slabViewOf), ContentLayer conversion of all 14 passes, frameProgram(tone) + strategy executor + derived timing slots, target table + consolidated resize, targetFormat factory cleanup, PassDeps deleted. 11 tasks, green suite at every commit, flip isolated in Task 7. - 03-pick: pick camera becomes a value (lastFrameUniformBytes deleted, full 176-byte re-home table), drawPick rows, per-slab pickProgram, frontmostPick. Also dissolves proceduralDiskRenderer's second camera stash. - 00-index: ordering, locked cross-plan seams, #386 merge-order. Spec correction from plan-time shader verification: volumeUpsamplePass stays a content layer (its 4-tap rotated-grid low-pass is essential grain suppression) and drawPickDebugOverlay stays a bespoke debug renderer (r32uint textureLoad visualisation) — neither is a Compositor consumer. The FRAME program loses the volume→hdr composite step; the volume double-gate knot is fixed by one shared deriveVolumeLiveness projection. Also recorded: the blend→dstFormat constructor mapping (a pass encoder cannot be queried for its attachment format). Backlog: render-graph-restructure item removed (index line + detail file) per the spec's acceptance note — the FrameStep program supersedes it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Implementation plans added to this PR (commit 417ad8b) — three phase plans + an index under
One spec correction fell out of plan-time shader verification (spec updated in the same commit): The superseded 🤖 Generated with Claude Code |
…ab model The fold plan executes on the #386 branch after plans 01+02 land: the bespoke foreground wiring (encodeForegroundPass/Over, foregroundLabelsPass, foregroundComposite + shaders, foregroundOffscreen, four ReadyFrameContext fields) dissolves into two ContentLayer rows, one depth-bearing RenderTargetSpec row, the activated NEAR0 slab (origin-relative f64 computeForegroundViewProj), and three appended FRAME steps. #386's deferred visual gate becomes the plan's final gate. Two contract amendments the fold surfaced, both fixed pre-execution: - Compositor alpha semantics are now a column of the blend table (replace → 1.0; over/additive → preserve src alpha, packed as a preserveAlpha uniform derived from the blend). Plan 01's 'over' was premultiplied with a forced alpha-1.0 emit — folding #386's straight-alpha composite onto that would have painted the foreground offscreen over the whole screen. - Depth attachments become target-table + executor data in plan 04 (foreground:0 is the first row to exercise RenderTargetSpec.depth). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Plan 04 added: fold PR #386 (zoom-to-earth) onto the layer/slab/program model ( Strategy: plans 01+02 execute on Two contract gaps the fold surfaced, fixed pre-execution in this commit:
Behaviour deltas the fold accepts (all named in the plan): foreground offscreen renders after the hdr→swap tonemap (no data dependency), pass+composite skipped entirely when no body is enabled (touched-set rule — the branch always opened both), and the foreground gains dev-only per-layer timing slots. |
What
Adds the design spec for unifying skymap's renderer paths.
The recent zoom-to-Earth work added a third render path (opaque, depth-tested, f64 near-field bodies) bolted onto a frame loop that previously had two (additive HDR scene + premultiplied-OVER UI overlay). This spec proposes one compositor model that subsumes background, foreground, and pick:
slab(which view-projection + depth range),target(which texture),blend(additive / opaque / over). Today whichPass[]array a renderer lives in implicitly fixes all four of projection, precision, blend, and target.Compositorprimitive replaces three byte-identical tone-map / composite implementations (postProcesstonemap,foregroundComposite,volumeUpsampleblit).ContentLayerregistry + a dataFrameStepprogram replaceHDR_PASSES/UI_PASSES/ the hand-wired foreground. Frame order becomes data (and therefore unit-testable).Essential differences (precision, frustum, blend) are preserved; accidental duplication is erased.
Status
Draft — under review. No code changes; this is the design doc that will drive a future
writing-plans.Spec:
docs/superpowers/specs/2026-06-29-renderer-unification-design.md🤖 Generated with Claude Code