Lab

Liquid Glass

Oct 05, 2026

A glass sphere full of slow green fluid. Small spheres fly in and melt into one mass, then the mass reshapes into cubes or scatters into a floating formation.

React Three FiberGLSLRay MarchingSDF

Overview

The glass is a single shader on a sphere. It ray marches a signed distance field: spheres blended with a smooth union, wrapped in a rippling glass shell. Light refracts in and out of the glass, and the fluid inside is sampled along the path and twisted as the glass spins. Drag to spin it: the fluid lags behind the shell, twists and sloshes, then settles. Pick a shape below the scene: Cluster keeps the mass, Cubes morphs it into three interlocking cubes, and Scatter sends the spheres out to the corners of an icosahedron, where they float apart.