Projects04 of 04
Black Hole Wallpaper
A seamless-loop black hole render, written as GLSL shaders and encoded to video on the GPU. It is the background of this site's hero.
Overview
The scene is a Schwarzschild black hole with an accretion disc, seen through a lens that bends light the way real photon paths do: the shader integrates u'' + u = 1.5 Rs u^2 for every pixel. Behind it sit a three-layer star field, galactic bands, slow background pulsars and the odd meteor.
It is a port of the night sky from my own game engine, reworked for a wallpaper: an off-centre, rolled composition, stars that stay sharp at any resolution, and a loop that hands the last frame straight back to the first. A Python script renders the frames offscreen with moderngl, runs bloom and tonemapping passes, and pipes the result into ffmpeg on NVENC.
Notes
- Light bending is computed per pixel from the Schwarzschild equation, not faked with a distortion filter.
- The disc pattern is crossfaded against itself across the loop, so the video repeats with no visible seam.
- Everything except the pipe to ffmpeg stays on the GPU, including the YUV conversion.