Skip to content

WebGL / 3D.

The idea

It borrows only the inverse-square lens concept; everything layered on top is hand-written math. A 2D screen-space gravitational lens — bounded lens drag plus a static swirl — that you can fly a wind across.

A real moon in the ring

Inside the lens sits an actual NASA public-domain photo (Moon = LRO/LROC, Earth = Blue Marble), equirectangular-mapped onto a sphere and shaded by the scene light direction — full ↔ crescent phases, with tone, brightness, size, rotation and tilt. The flow shimmers over it like heat-haze.

The flow

An FBM anisotropic domain-warp drives a “wind” that streams across the lens. Gaussian / reciprocal ridges form filaments, density and thickness vary by radius, and per-channel refraction adds chromatic color — finished with a soft bloom and a full-screen vignette.

Controls

A live control panel tunes the lens bend, the wind, the filaments, the celestial body (moon / earth, phase, tone, size, tilt, spin) and bloom — 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