9 Commits

Author SHA1 Message Date
xfy
6ff5a05e74 docs(spec): correct Ω_θ cross term (a√M/r^1.5, not a·Ω_φ/r)
The vertical epicyclic frequency's cross term is a√M/r^1.5 (radius to the
−1.5), following Okazaki 1987. The spec previously wrote a·Ω_φ/r, which makes
Ω_θ too large and breaks monotonic growth of precession with spin. Caught
during Task 1 implementation by the grows_with_spin test; syncing the spec
to the corrected formula that shipped in 891eadf.
2026-07-16 17:53:12 +08:00
xfy
95968c0575 docs(spec): Kerr orbiting planets design (Phase 3.4)
Spec for 5-8 planets on Kerr circular orbits with strong-field Lense-Thirring
nodal precession. Path A: CPU computes position each frame, uploads to the
existing storage buffer; shader unchanged.

Physics: closed-form Ω_φ (Bardeen 1972 eqn 2.16) and Ω_θ (Caltech Ph236
epicyclic vertical frequency), giving exact nodal precession Ω_φ - Ω_θ.
χ=0 degenerates exactly to Schwarzschild (Ω_LT = 0, Newtonian Ω_φ).

Explicitly rejects Mino-time analytic geodesics (Fujita-Hikida): circular
orbits collapse the three-frequency decomposition to Ω_φ alone, elliptic
functions have no WGSL/std backing, and it would break physics.rs's
single-testable-mirror design. Closed-form Kerr frequencies are the right
tool for circular orbits.

Orbit radius bound to k·kerr_isco(χ), so planets track the disk inner edge
as spin changes and span the strong-field region (k=2.5 → r ∈ [1.25, 7.5]).
Random initial attitudes (ChaCha8Rng + UI seed) so the three orbital planes
precess at different Ω_LT rates — the visible Kerr signature.

Decomposes Planet into OrbitParams (immutable elements) + Planet (derived
center), keeps SphereData GPU layout untouched. Adds time_scale UI knob
because Ω_LT at r=8 needs ~25 min per revolution otherwise.
2026-07-16 16:46:10 +08:00
xfy
d1ea789274 docs(spec): volumetric accretion disk design
Design for replacing the smooth zero-thickness disk with a Gargantua-style
volumetric gas disk. Supersedes the Phase 3 non-goal "disk stays a zero-
thickness plane" - user feedback identified zero thickness as a root cause
of the disk looking too smooth.

Key decisions captured:
- Approach A volumetric integration: in-slab sampling reuses the existing
  RK45 adaptive step (dense where light bends, sparse where straight),
  no separate ray-march. Midplane edge-capture retained for straddling steps.
- Ridged multifractal noise (ridge^2) for sharp bright filaments, replacing
  the smooth FBM blobs that produce the current mushy texture.
- Separate density field (smoothstep-gated FBM) for gas clumping, plus a
  logarithmic-spiral arm modulation riding the Keplerian shear.
- DiskQuality tier enum (Off/Low/Medium/High) gates octave counts; Off is
  a full revert to the flat disk as perf escape hatch + visual A/B.
- physics.rs untouched: volumetric integration is render-sampling layer,
  never enters the geodesic solver; existing tests stay green.
2026-07-15 11:17:12 +08:00
xfy
5c6c20fa00 docs: spec cinematic rendering (HDR bloom + FBM disk + ACES + AA)
Design for raising the renderer from geometrically-correct-but-flat to
Gargantua-reference fidelity. Four user-selected traits:

- HDR color + ACES tone mapping (Rgba16Float offscreen, Narkowicz fit)
- Multi-pass HDR bloom (bright-pass → down-pyramid → up-pyramid → composite)
- Domain-warped FBM disk texture (replaces two-sine noise)
- Anti-aliasing via render_scale + gaussian-speck stars

All quality options configurable via a dedicated egui Quality panel,
with tiered web defaults (Low bloom, no MSAA/star-AA) vs desktop (High).
BloomQuality::Off falls back to the original LDR path for WebGPU
browsers without float-filterable support.

Geodesic integrator (deriv/rk45_step/is_captured_rk45) untouched —
the physics.rs mirror contract is unaffected. No new tests.
2026-07-14 18:24:36 +08:00
xfy
0693c3d165 docs: Phase 2 (Kerr) design spec 2026-07-13 18:24:49 +08:00
xfy
041e8f3b21 docs(spec): correct Bevy 0.19 API details (verified)
- Material2d bind group is group 2 (#{MATERIAL_BIND_GROUP}), not group 1
- RenderPlugin has no wgpu_backends field; enable bevy 'webgpu' feature instead
- WgpuSettings::default() auto-selects BROWSER_WEBGPU on wasm32
- Imports from bevy::sprite_render (Material2d, AlphaMode2d)
- Component-based spawning (Camera2d, Mesh2d/MeshMaterial2d), no bundles
- getrandom 0.4/wasm_js handled transitively by Bevy
2026-07-09 18:47:44 +08:00
xfy
c1bfe2b25e docs(spec): add desktop + web (WebGPU) platform support
- WebGPU-only web target (Bevy forces WebGPU/WebGL2 at build time; WebGL2
  lacks storage buffers our planets feature needs)
- Add §13 Platform support: build toolchain (trunk/wasm32), backend gating,
  fallback message, web defaults (render_scale 0.75, steps 200)
- Add src/web.rs, web/index.html, Trunk.toml to file structure
- Add web-sys dep; add web build + perf verification milestones
- Update storage-buffer risk note: valid on native + WebGPU
2026-07-09 18:30:56 +08:00
xfy
60bfdb9ca6 docs(spec): add egui parameter UI (bevy_egui 0.41) + dependencies section
- Switch interaction from keyboard to a collapsible egui 'Controls' panel
  with grouped sections (Camera/Disk/Doppler/Renderer/Background/Grid/Planets)
- Pin bevy_egui 0.41.0 (verified against crates.io: bevy ^0.19 + egui ^0.35)
- Add Dependencies section §0; add src/ui.rs to file structure
- Clarify mouse-input routing between egui panel and orbit controller
2026-07-09 18:26:24 +08:00
xfy
c2d4bf779a docs: add Interstellar black hole renderer design spec
Analyzes reference video (BH + tilted Doppler disk + lensed halo + stars),
specifies full 8-feature scope (adds cubemap skybox, lensed planets, Flamm
grid), Schwarzschild Phase 1 with Kerr Phase 2 follow-up, Bevy 0.19
full-screen Material2d architecture.
2026-07-09 18:20:38 +08:00