Project: Shift & Spectrum, NASA Space Apps 2026, challenge "Planet X and SPHEREx"
Audience: the team (Atish, Kevin and Moon, who is also called Munazir) and Claude Code. This spec lives in docs/rendering/ (this index plus the fragments below) and is referenced from CLAUDE.md.
Status: amended to 12 Nov 2026 (D-39: haptics cut, the audio code in frontend/src/sound/; R13 the sound of a world; Q-430 pitch polarity). Before that, 9 Nov 2026 (Q-132: the event is desktop Chrome on the A15 laptop, sound only; Q-133 body tone; Q-134 Track path sound). Items marked [verify] must be checked against real output before relying on them; every one is listed in R12. Proposals marked Q-188 to Q-194 wait for a decision entry.
Precedence: decisions in decisions/ override this doc. Decision IDs (D-xx), backlog IDs (B-xx) and question IDs (Q-xx) refer to that folder; its index names the topic file of each ID. Terms: glossary.
The original single file (docs/CONTEXT-rendering-haptics.md) was split into the fragments below. Section numbers are kept with an R prefix: "rendering doc §8.4" elsewhere means R8.4 here. Load only the fragment a task needs.
| File | Sections | Load this when… |
|---|---|---|
| principles-stack.md | R0, R1, R2 | starting any rendering/haptics task: scope, non-goals, the 6 principles, pinned package versions |
| data-contract.md | R3, R3.1, R3.2, R3.4 | touching the card/render-params schema, provenance tags, view-mode fields, HapticProfile (canonical TV / ObjectCard / RenderParams) |
| type-selection.md | R3.3 | backend type selection (stage 3): SBDB, SIMBAD otypes, exoplanet thresholds |
| display-rules.md | R4, R5, R5.1–R5.7 | working on the viewer: display levels, lighting, view modes, honesty toggle, scale bar, performance budget and event target, interaction (Feel and Touch modes), motion, quality levels |
| engines.md | R5.9 | the D-37 prototype engines (world, star, rock) on raw WebGL2: when they draw (+ Artistic only), the three.js fallback, the determinism exemption, copied code and deviations, the unmeasured A15 frame rate |
| engines-performance.md | R5.9.1 | the issue #93 performance waves: star, rock and fly compile and lifecycle, caches, the fly view's static G-buffer, the shared simulation (in a worker by default), the three.js viewer's resolution and bloom, the dev switches and bench pages |
| build-mould.md | R5.8 | the Build split view, the moulding steps, New seed and honesty while building |
| surface-generation.md | R6, R6.1–R6.7 | baking height/normal/albedo maps (asteroids and brown dwarf bands): card→params rules, seed, noise, craters, Sobel normals, Gemini/depth paths, caching |
| renderers/asteroid.md | R7 (intro), R7.1, R7.2 | rendering asteroid_shape (433 Eros, the demo body) or asteroid_procedural (also holds the R7 intro rule on refused layers) |
| renderers/comet.md | R7.3 | rendering comet (3I/ATLAS, stretch; 67P with a mesh nucleus): nucleus, gas shells, dust, epoch toggle |
| renderers/brown-dwarf.md | R7.4 | rendering brown_dwarf / brown_dwarf_binary |
| renderers/stars.md | R7.5, R7.5.1–R7.5.5 | rendering star, star_mira, star_ttauri, and the star surface (spots, flares) |
| renderers/candidate.md | R7.6 | handling candidate (no 3D) |
| renderers/shader-kinds.md | R7.7 | planets, gas giants (the shared CPU field), nebulae and novae (volumes, no haptics, Q-103) |
| renderers/world-engine.md | R7.7.1 | the D-37 world engine's values for planets and gas giants: card against preset, albedo, lava worlds, clouds, CO₂, giants and rings, and the issue #93 physics (critical points, saturation pressure, tides, runaway greenhouse) |
| haptics/platform-encoding.md | R8, R8.1–R8.3 | (haptic parts cut, D-39; the sound rules stay live, see its banner) what each platform does (event: sound only on the A15), texture vs data haptics and the honesty rule for sounds, vibration patterns (after the event) |
| haptics/sources.md | R8.4 | (haptic parts cut, D-39; the sound rules stay live, see its banner) implementing a source: height map, mesh, field, terrain, flow, band, data pulse, light curve; what feeds the body tone |
| haptics/profiles.md | R8.5, R8.6 | (haptic parts cut, D-39; the sound rules stay live, see its banner) mapping an object type to its texture/data haptics, or doing spectrum haptics |
| haptics/calibration.md | R8.7 | (haptic parts cut, D-39; the sound rules stay live, see its banner) haptics/sound settings (event); first-use vibration calibration (after the event) |
| haptics/engine-api.md | R8.8 | (haptic parts cut, D-39; the sound rules stay live, see its banner) writing HapticEngine, drivers, trains or the tone stream (TS reference code) |
| haptics/wiring.md | R8.8.1 | (haptic parts cut, D-39; the sound rules stay live, see its banner) wiring the engine, Feel, the body tone, Listen and Track into the app (M5) |
| haptics/audio-pairing.md | R8.9, R8.9.1, R8.9.2 | (haptic parts cut, D-39; the sound rules stay live, see its banner) writing the audio driver: timing, mapping, timbre by tag, Bluetooth latency; the body tone (Q-133); the Track path sound (Q-134) |
| sound/overview.md | R13, R13.1 | the flyover soundscape and weather: what it is, terms, rules (honesty, refusals, determinism, no vibration, sound only after a click), the spec section map |
| sound/inputs-air.md | R13.2, R13.3 | the engine and card inputs with their tags, the new wrapper accessors, air physics (γ, c, ρ, Z, P(z), T(z), absorption) |
| sound/place-wind.md | R13.4 | the listener, the hKm port, the sample pattern and classes, place features, the planetary wind model, gas giants, the local frame |
| sound/sources-weather.md | R13.5, R13.6 | the sound sources and their physics gates; lightning, thunder and the weather overlay with flash safety |
| sound/bake-mix.md | R13.7, R13.8 | baking the beds in a worker (loops, seeds, budgets, re-bake), the 10 Hz mixer, levels, world scaling, presentation, pan |
| sound/buses-stage.md | R13.9 | the buses, the ambience duck, the master limiter, the sound settings and Sound popover, stage audibility, the harmonic branch (built in #111) |
| sound/ui-lifecycle.md | R13.10 | the Sound chip, captions, "What you hear", reduced motion, the lifecycle state machine, the performance budgets |
| sound/files-tests.md | R13.11 | the ambience files, the tests, every constant, what is out of scope, the verify list, the module contract and the Appendix D rulings |
| sound/chord-pitch.md | R13.12 | the spectrum chord and the pitch polarity (long wavelength = low pitch, Q-430) |
| accessibility.md | R9 | alt text, aria-live, control sizes, reduced motion, focus, sound as an alternative |
| layout.md | R10 | finding where rendering, viewer and haptics code lives and who owns it |
| layout-repo.md | R10.1 | where the rest of the repo lives (interim, until the architecture spec owns it) |
| acceptance-tests.md | R11 | writing tests: the event gates, the automated e2e gates, the post-event phone tests |
| reference/README.md | R11.1 | the target reference frames, the seed/time convention for comparing renders, golden frames |
| reference/checklist.md | R11.2 | the visual review a renderer must pass before it merges |
| reference/frame-time.md | R11.3 | measuring frame times on the A15 (and the phones after the event) |
| reference/a15-checks.md | R11.4 | the one-sitting runbook for the A15: machine record, GPU probe, frame times, bloom, device lost |
| open-items.md | R12 | checking any [verify] item: owner, event or after, what resolves it |