Reeded Glass Field
A pane of fluted glass standing in front of a hidden light. The pointer drags the light behind it, and every rib refracts its own sliver, so the light reads as a comb of luminous shards that slide from rib to rib. A press sends a ripple of curvature through the glass.
WebGL20 deps1 file · 29 KB TSXreduced-motion aware
Props
"use client";
import { useEffect, useRef } from "react";
import type { CSSProperties, ReactNode } from "react";
/**
* ReededGlassField: a full-bleed background of fluted (reeded) glass standing
* in front of a hidden light. The pointer drags the light behind the glass;
* every rib refracts its own sliver of it, so the light shows as a comb of
* thin luminous shards that slide from rib to rib as it moves.
*
* One WebGL2 fragment pass, no buffers. The scene behind the glass is
* analytic (a soft tall light with an ice-white core, a faint horizon, two
* hairline highlights). The glass is a row of ribs: inside each rib a
* cross-section profile gives a refraction offset, and the scene is sampled
* through it three times, once per colour channel, with a dispersion that
* only grows toward the rib edges. Each rib therefore shows a compressed,
* mirrored copy of the window of scene behind it.
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}Details
About this background
Most glass effects blur what is behind them. Reeded glass does something stranger: every rib is a small cylindrical lens, so it shows its own squeezed, mirrored copy of whatever stands behind it. This field puts one tall, soft light behind a pane of ribs and lets the pointer drag it. As the light moves, the shard inside each rib slides the opposite way while the lit ribs hand the glow along the pane, which is the slow, liquid motion the real material has. Each rib also bulges a little as the light passes and calms again once it has gone. Colour is split three ways per rib and only at the rib edges, so the fringe stays a thin cyan and violet line instead of turning to rainbow. Seams carry a dark gap and a specular hairline. A press sends a travelling wave of curvature through the ribs, a ripple of about a second. Curvature, ribs, angle, dispersion and three cross-section profiles are all live props. Left alone, the light drifts, so it opens on something worth looking at.
Curator’s note
Paper Shaders made the still; this is the same glass left alive. The light is analytic and the glass is a single refraction pass, so there is no buffer to run out of and the whole effect costs one fragment shader. The trick that makes it read as glass rather than stripes is that each rib shows a compressed, mirrored window of the scene and the light slides through that window, so the shard moves against the light.


