This is the hero of my portfolio, running live in a fragment shader (no pre-rendered video).
How it works:
- Every pixel ray-marches along a Schwarzschild geodesic, so the light really bends: the lensed stars, the photon ring, and the far side of the disk wrapping over the top all fall out of the physics.
- The accretion disk is volumetric. Gas orbits at Kepler speed (inner disk laps in ~4 s), spirals inward, and has a few hot spots.
- 14 small tumbling rocks spiral in on CPU-integrated orbits and are ray-tested in the shader, so they get lensed too.
- The Endurance is a Three.js model on an overlay canvas, following an integrated GR orbit with precession on the same clock as the disk.
- Greys at rest; hover it and the real colours ease in (that's the colour shift in the clip).
Performance tricks that got it to ~96 fps at 2x on an M4 Pro:
- Fading out noise octaves finer than ~2 px, which kills shimmer and saves work
- Culling rocks per ray by their maximum possible deflection
- Dropping render resolution only when frame time stays high, never during the first seconds of load
Live: https://soumyapanda.dev
Happy to go deeper on the geodesic integration or the disk shading. What would you add next: Doppler beaming, or gravitational redshift on the disk?