initializing renderer Read the study

RAW WEBGL / HERO GLSL ES 1.00

Quiet light,
uncertain orbit.

A small fragment-shader study in glass, parallax, and drifting star fields — built from scratch with no image textures.

01 / 11

Aster

A pale field with a soft blue edge.

THE LITTLE LAB

Dual layers make the illusion.

The hero pass reconstructs a glass sphere from screen coordinates, samples a rotating galaxy on the front and refracted back walls, then re-evaluates the rim per RGB channel.

01

Sphere mask

Reconstruct the front hemisphere and the refracted back-wall hit from the fragment coordinate. The same rotating sphere supplies both layers of the glass.

02

Star field

A tilted galaxy band, nebula pockets, dust lanes, three star scales, and a pulsar are generated from stable hashes, so every orb gets its own sky without a texture.

03

Liquid shell

The lens falloff grows toward grazing angles, then separate R/G/B samples create the chromatic edge while Fresnel lighting and specular lobes sell the liquid glass.

hero.frag.glsl GLSL ES 1.00
float k = uLens * fall * swell;
float cR = 1.4 * (1.0 + 0.06 * sin(uTime * 1.3 + uPhase));
float cG = 1.2 * (1.0 + 0.06 * sin(uTime * 1.3 + uPhase + 2.1));
vec3 col = vec3(shade(p * (1.0 - k * cR)).r,
                  shade(p * (1.0 - k * cG)).g,
                  shade(p * (1.0 - k)).b);

ABOUT THIS BUILD

A tidy, inspectable starting point for shader experiments.

This is a clean-room recreation of the observable visual idea: circular canvases, a glass rim, colored nebulae, sparse stars, and a five-position carousel. The GLSL, layout, and controls in this folder are original and intentionally dependency-free.