Skip to content

WebGL / 3D.

The idea

A strong-field general-relativity black hole, done honestly: for every pixel it integrates the null geodesic through Schwarzschild spacetime (a = −1.5 h² r / |r|⁵), so the disk, photon ring and background starlight are bent by real curvature — not a faked warp.

The disk

The accretion disk flows as seamless FBM on a swirl coordinate, streaming like white light-tails around the hole. The photon ring and the bright lensed underside fall out of the geodesic bending itself.

Lensed starlight

Background stars are bent around the horizon — doubled and smeared into the lens — with the black disk of the event horizon punched out of the warped sky.

Controls

A live control panel adjusts the curvature, the disk flow, brightness / tone and the starfield — plus randomize, pause and save.

Single file

One full-screen fragment shader, vanilla WebGL2 + GLSL ES 3.00, zero dependencies — a single index.html.

Live ↗GitHub