gitmyhub

singularity

Rust ★ 27 updated 2d ago

A drifting black hole that gravitationally lenses your desktop. Ray-traced Schwarzschild geodesics, live.

A Rust desktop app that overlays a physically simulated, drifting black hole that visually warps your screen like real gravity.

RustWGSLWindowssetup: moderatecomplexity 3/5

Singularity is a desktop application that adds a slowly drifting black hole to your screen, bending everything behind it the way real gravity would bend light. Rather than a simple visual filter, the effect is calculated using actual physics equations that describe how light behaves near a black hole, so the warping, the dark shadow at the center, and the glowing ring of light around it are all produced by the same kind of math astronomers use, not a hand-drawn animation.

The program runs as a single file with no installer and no extra software required. Once started, an invisible overlay covers the screen, the black hole wanders around on its own, and clicks pass through it so the programs underneath still work normally. A tray icon lets someone switch between eight different visual styles, move the hole with the keyboard and mouse, restrict it to one monitor, or turn on a screensaver mode where it only appears after the computer sits idle for a while.

There is also an optional "Kerr mode" that gives the black hole spin, which changes the physics calculation and produces a more dramatic, asymmetrical warping effect, at the cost of more graphics processing power.

The project is written in Rust and is built and tested on Windows, which is described as the primary and most reliable platform. A macOS version exists in the code but has never been tested on real Apple hardware, and Linux is not supported yet because neither of its two common display systems currently offers a way to exclude a single window from being captured by itself, which this effect depends on. For people who do not want to build the program from source, there is also a simpler alternative that runs the same visual effect as a shader plugin for a separate tool called ShaderGlass.

The project only ever makes one network request: once a day it checks GitHub to see if a newer version is available, and this check can be turned off in a configuration file. It is released under the MIT license.

Where it fits