
Progressive Bloom Valley
WebGL
A premium WebGL refraction effect that splits the hero surface into shifting glass-like facets for brand launches and portfolio pages.
The hero can hold a refracted surface or a paragraph. Fractal Glass is for pages where the surface earns the paragraph.
Use it for premium heroes, AI/product launches, creative portfolios, and brand moments where the visual payoff justifies GPU work. It should make the site feel technically ambitious, not merely heavier.
The risk in production is budget. Keep meaningful content in HTML, cap DPR by device tier, reduce postprocessing on mobile, pause render loops offscreen, and ship a poster fallback that still feels intentional.
import FractalGlass from "@/components/effects/fractal-glass"; const images = { blob: "https://pub-8abee449136941f5b0a1cd2c014534e9.r2.dev/vault-listing-images/assets-images/h-13.jpg",}; export default function Home() { return ( <> <FractalGlass imageSrc={images.blob} stripesFrequency={40} glassStrength={2.0} glassSmoothness={0.014} parallaxStrength={0.15} distortionMultiplier={8.0} edgePadding={0.12} /> </> );}A branding agency can use Fractal Glass in the hero of its homepage, placing a reel still or campaign image behind a row of refractive glass strips. Moving the pointer adds a slight parallax, so the image shifts through the facets while the agency's positioning line stays in HTML.
The outcome is proof of craft. The surface shows technical ambition in the first second, while the positioning line and contact link stay as ordinary text above it.
Not for low-power-first pages, dense content, dashboards, checkout, or routes where performance is the main conversion lever.
Cap DPR at 1.0 on touch/mobile and up to 1.5 on mid-range desktop. Pause Fractal Glass offscreen and in hidden tabs, reduce postprocessing before shipping, and keep texture sizes controlled.
Keep meaningful content in HTML outside the canvas. On mobile, reduce shader quality and switch to a poster if the scene cannot hold frame rate.
| Prop | Type | Default | Description |
|---|---|---|---|
stripesFrequency | number | 40 | Controls how many refractive glass strips are rendered. |
glassStrength | number | 2 | Controls the intensity of the strip refraction. |
glassSmoothness | number | 0.014 | Controls how smoothly neighboring refraction samples blend. |
parallaxStrength | number | 0.15 | Controls pointer-reactive horizontal parallax. |
distortionMultiplier | number | 8 | Amplifies parallax around distorted stripe regions. |
edgePadding | number | 0.12 | Softens distortion near the media edges. |
Refraction shaders are demanding, so cap DPR at 1.0 on mobile and up to 1.5 on desktop and reduce shader complexity or sample count on the lower tier. There is no quality prop, and DPR is capped at 2, so scale the refraction down with stripesFrequency and glassStrength rather than disabling it abruptly. Profile on real mobile GPUs, where heavy fragment shaders struggle most.
Capture a still of the refracted surface so the fallback keeps the premium, faceted look without the live shader. The hero copy is HTML and reads regardless. Make that still good enough to stand on its own.
Run the shader on demand and stop it when the canvas is out of view or the tab is hidden, resuming on visibility. A live refraction pass is one of the most expensive things to leave running unseen. Visibility-gating it protects frame rate and battery.
The paragraph the glass is meant to frame the headline, claim, and CTA stays in HTML in front of the surface, never inside the shader. The refraction earns attention for the copy; it should never replace it. Keep all actions as real DOM elements.
Choose a static treatment when the refraction is decorative, when performance or mobile reach is the priority, or when text legibility over the surface is at risk. If a still conveys the same crafted feel, prefer it. Reserve the live shader for pages where the surface genuinely earns the paragraph.
Yes, adaptation work tunes the refraction, palette, and contrast so copy stays legible, with motion rules, a performance budget, fallback design, source handoff, and implementation notes. The component ships into and is owned by your codebase.
Need a custom effect? Tell us what to create.