Fluted Glass
Look at an image or a procedural gradient through ribbed glass, with frost, groove shading, highlights, and prism fringes.
Overview
Fluted Glass imitates reeded glass panels. Each flute acts as a small cylindrical lens: it squeezes a wider strip of the scene behind it and, at high distortion, mirrors it, which is what makes the real material read as glass rather than stripes. On top of the refraction:
- Frost blurs along the flutes like sandblasted glass.
- Shading darkens the grooves between flutes.
- Highlight runs a soft sheen down each flute and catches a thin bright rim.
- Dispersion bends red and blue slightly differently, leaving faint prism fringes at strong edges.
With animated, the glass drifts slowly sideways over a still scene. Without src, it sits over a slow three-color field, a ready-made backdrop for hero sections and cards.
The playground uses free Unsplash photographs by Marc Wieland and Martin Péchy.
Installation
Usage
Procedural backdrop
import { FlutedGlass } from "honestui/shaders"
<FlutedGlass
className="h-80 rounded-xl"
sourceColors={["#0e1226", "#ff7448", "#8d7bff"]}
fluteSize={40}
/>Image
<FlutedGlass
alt="An alpine lake reflecting an orange sunset between dark mountain ridges."
className="h-80 rounded-xl"
angle={12}
distortion={0.7}
frost={0.35}
src="https://images.unsplash.com/photo-1776348568867-24146d18b736?auto=format&fit=crop&w=1600&q=85"
/>Remote image hosts must allow cross-origin use so WebGL can read the pixels. Wider flutes read as architecture; narrow ones read as texture. Distortion past about 0.5 mirrors each strip, which looks most like real glass on photographs with strong shapes.
Accessibility
Fluted Glass deliberately obscures what is behind it, so never put information a reader needs inside the source image. In image mode, write alt text describing what the image contributes, or an empty string when it is decorative; the original image shows until the canvas is ready and remains in the accessibility tree afterwards.
The drift stops when the user prefers reduced motion, while the element is offscreen, and while the page is hidden. Keep text on a separate layer and check contrast against the brightest part of the scene.