Caisson

Graphics, Python and OpenGL

winliqglass

Apple's Liquid Glass material on Windows. Shapes act as lenses, joined by a smooth-min field, and bend the background at the rim with spectral dispersion and specular highlights.

8
Wavelength taps recombined for the spectral edge.
2
Render passes, so glass samples the scene underneath it.
0
Frost by default. The rim does the work.

The material

Frost defaults to zero. Heavy backdrop blur makes a render read as fogged plastic, so the rim does the work: a hairline highlight, a narrow bevel and a clear interior.

The renderer makes two passes, so knobs and toolbar glass sample the scene beneath them instead of sitting on a flat overlay. Rounded rectangles are superellipses, because curvature that ramps up out of a straight edge avoids the visible step an arc makes at its tangent point.

Try the lens

Lens

A small model of the rim behaviour: magnification in the middle, compression toward the edge and the three colour channels pulled slightly apart. Move it with the pointer.

What the shader does

  • LensingA circular thickness profile over a narrow SDF band bends light outward at the rim hard enough that the distant background folds into visible compression rings, while the interior stays clear.
  • Spectral edgeEight wavelength taps are recombined through a narrow RGB response, with the chromatic part of the residual amplified on its own so the fringe saturates without ringing on high-contrast edges.
  • Light pipeA filleted edge traps light, couples it in near the silhouette and runs it around the outline, separating the wavelengths further at every bend.
  • RecordingScripted sessions render straight to MP4, headless.