Compare commits

...

3 Commits

Author SHA1 Message Date
xfy
c699d9891b feat(disk): raise density_freq default to 2.0
Higher default turbulence frequency gives the volumetric disk more
trackable texture features at startup, making the Keplerian rotation
(rot ∝ 1/r^1.5) visually readable without needing to open the egui
panel. The old 0.8 default produced a near-featureless smooth slab at
default settings — the disk was rotating but the eye had nothing to lock
onto. 2.0 sits in the upper half of the slider range (0.2–3.0) while
still leaving room to push higher for debugging.
2026-07-17 14:08:08 +08:00
xfy
671b36a520 docs(readme): note phase4-experimental branch + its known blocker
Records that an exact-Kerr attempt exists on the phase4-exact-kerr-
experimental branch (CPU sub-percent accurate, shader visual broken)
and names the resume strategy: per-pixel debug-color output to localize
the CPU/WGSL divergence. Saves the next session from re-discovering the
state of the work.
2026-07-17 13:55:15 +08:00
xfy
3d1ead0fd3 docs(readme): sync Status with shipped Phase 3 (HDR/volumetric/blackbody/jets/AA/planets)
The Status section was stale: Phase 2 was still marked 'pending
visual/performance validation' and Phase 3's sub-phases (3.1–3.4)
were entirely absent despite each having landed with its own spec,
plan, and commits.

Updates after human-in-the-loop validation confirmed spin=0
degeneracy, frame-dragging asymmetry at spin>0, and desktop/web FPS
at the new defaults:

- Phase 2: 'implemented, pending validation' -> 'shipped & validated'.
- Phase 3 (cinematic): new section listing the HDR/bloom pipeline,
  volumetric disk (3.1), blackbody disk + relativistic jets (3.2),
  anti-aliased lensed-image rings (3.3), and Kerr orbiting planets
  (3.4) — each with the physics/aesthetic it ships.
- Performance defaults: record the concrete per-target defaults
  (steps/render_scale/bloom/disk/aa for desktop vs web) and the
  release-profile LTO/codegen choices so the README reflects what
  the code actually ships.
- Future work renamed Phase 3 -> Phase 4, since Phase 3 is now
  filled by the cinematic work.
2026-07-17 10:27:19 +08:00
3 changed files with 16 additions and 5 deletions

View File

@ -72,8 +72,19 @@ docs/superpowers/ design spec + implementation plan
## Status
**Phase 1 (Schwarzschild)** — shipped: shadow, tilted Doppler accretion disk with lensed Einstein halo, lensed starfield, lensed planets, lensed Flamm grid, optional cubemap skybox, live egui controls, desktop + web/WebGPU.
**Phase 1 (Schwarzschild)** — shipped & validated: black shadow at the critical impact parameter, tilted Doppler accretion disk with the lensed Einstein halo (disk backside lensed up-and-over and down-under), procedural lensed starfield, lensed Flamm-paraboloid curvature grid, optional cubemap skybox, live egui Controls panel, desktop + web/WebGPU.
**Phase 2 (Kerr)** — **implemented, pending visual/performance validation.** The Schwarzschild fixed-step RK4 integrator was replaced by a Kerr geodesic with an adaptive Dormand-Prince RK45 loop: a spin parameter χ ∈ [0,1] drives frame-dragging and a spin-dependent capture radius (Kerr horizon), the disk inner edge tracks the Kerr ISCO, and `render_scale` is now wired through an offscreen render-to-texture + upscale pass. The CPU mirror (`src/physics.rs`) covers the Kerr derivative, the RK45 step, and the adaptive loop, and the unit tests assert the spin = 0 degeneracy plus capture/escape behavior at spin > 0. What remains is the human-in-the-loop checklist: spin = 0 visual regression against Phase 1, frame-dragging asymmetry at spin > 0, and desktop/web FPS at the new defaults — see `docs/superpowers/plans/2026-07-13-interstellar-blackhole-phase2-kerr.md` (Task 8).
**Phase 2 (Kerr)** — shipped & validated. The Schwarzschild fixed-step RK4 integrator is replaced by a Kerr geodesic with an **adaptive Dormand-Prince RK45** loop. A spin parameter χ ∈ [0,1] drives the Lense-Thirring frame-dragging term in the bending acceleration and a spin-dependent capture radius (Kerr horizon r₊); at χ = 0 the frame-dragging term vanishes and the integrator is exactly Schwarzschild. The disk inner edge tracks the Kerr ISCO (6M = 3 Rs at χ = 0 → M = Rs/2 at extremal spin). The CPU mirror (`src/physics.rs`) covers the Kerr derivative, the RK45 step, and the adaptive loop; 14 unit tests assert the spin = 0 degeneracy, the monotonically shrinking ISCO/horizon/capture radius, and capture/escape behavior. `render_scale` is wired through an offscreen render-to-texture + upscale pass.
**Phase 3 (future work).** Full exact Kerr Cartesian pseudo-Hamiltonian (Σ/Δ/Carter-separable form) for sub-percent photon-orbit accuracy at high spin, retrograde spin, tilted spin axis, and adaptive integrator *order*. See `docs/superpowers/specs/2026-07-13-interstellar-blackhole-phase2-kerr-design.md` §9.
**Phase 3 (cinematic)** — shipped & validated:
- **HDR pipeline** — full-screen quad chain: bright-pass → blur pyramid (2 down + 2 up) → composite with ACES filmic tone-map. `BloomQuality` (Off / Low / Medium / High) despawns/respawns the bloom sub-graph; Off composites scene-only ACES.
- **Volumetric disk (3.1)** — fbm + ridged-multifractal turbulence replaces the zero-thickness slab; per-segment integration along the bent ray, scale-height H/R radial thickness, three `DiskQuality` tiers gating octave counts.
- **Blackbody disk + relativistic jets (3.2)**`DiskColorMode::Blackbody` keys a Tanner-Helland color to a Novikov-Thorne radial temperature profile shifted by the Kerr 4-velocity Doppler factor; bipolar relativistic jets along the spin axis are spin-gated (Blandford-Znajek: suppressed at χ = 0 regardless of the toggle).
- **Anti-aliased lensed-image rings (3.3)**`AaQuality` supersamples the higher-order ring wraps (1 / 2 / 4 sub-rays per pixel) to smooth the discrete bands into a continuous gradient.
- **Kerr orbiting planets (3.4)** — lensed planets on Kerr equatorial orbits (`Ω_φ` Bardeen 1972) with Lense-Thirring nodal precession (`Ω_LT`), deterministically seeded (ChaCha8Rng), live respawn on seed/count/radius change.
**Performance defaults** target ~60 FPS on discrete/integrated GPU (developed on Apple M4): desktop `steps=300`, `render_scale=0.75`, `bloom=High`, `disk=High`, `aa=Low`; web drops to `steps=200`, `render_scale=0.5`, `bloom=Low`, `disk=Low`, `aa=Off`. Release profile uses fat LTO + single codegen unit on desktop; the web profile overrides `opt-level="z"` for binary size.
**Phase 4 (future work).** Full exact Kerr Cartesian pseudo-Hamiltonian (Σ/Δ/Carter-separable form) for sub-percent photon-orbit accuracy at high spin, retrograde spin, tilted spin axis, and adaptive integrator *order*. See `docs/superpowers/specs/2026-07-13-interstellar-blackhole-phase2-kerr-design.md` §9.
> An earlier attempt (Stage A: exact Hamiltonian core, CPU + shader mirror) lives on the `phase4-exact-kerr-experimental` branch. Its CPU side reaches sub-percent `b_crit` accuracy (χ=0: 0.08%, χ=0.9: 1.5%) but the shader mirror has an unresolved CPU↔WGSL numerical divergence — the rendered disk shows no gravitational lensing despite the CPU trace showing correct 173° deflection. Resume there with per-pixel debug-color output to localize the divergence.

View File

@ -189,7 +189,7 @@ impl Default for BlackHoleParams {
disk_half_thickness: 0.15,
filament_freq: 1.0,
filament_sharpness: 2.0,
density_freq: 0.8,
density_freq: 2.0,
// Raised from 1.0: the new density model has no 0.55 floor and decays
// to 0 at the edges, so a slightly higher multiplier keeps the bulk
// opaque after per-step integration.

View File

@ -101,7 +101,7 @@ impl Default for BlackHoleUniforms {
disk_half_thickness: 0.15,
filament_freq: 1.0,
filament_sharpness: 2.0,
density_freq: 0.8,
density_freq: 2.0,
density_strength: 1.2,
arm_count: 2.0,
arm_tightness: 2.0,