Search documentation

Find a vivid-layer page or product.

Fluted Glass

A configurable glass refraction filter for fluted, prismatic, and irregular surfaces.

pnpm dlx shadcn@latest add @vivid-layer/fluted-glass
Source image

Customize

Size
0.5
Shadows
0.25
Highlights
0.1
Angle
0
Distortion
0.5
Shift
0
Stretch
0
Blur
0
Edges
0.25
Grain Mixer
0
Grain Overlay
0
Margin
0
Scale
1

API reference

The wrapper adds playback and runtime safeguards while preserving the complete Paper FlutedGlass API. See the Paper Fluted Glass reference for the full prop table and accepted ranges.

PropTypeDefaultDescription
imagestring | HTMLImageElementundefinedOptionally supplies the image refracted by the glass effect.
playback"auto" | "always" | "paused""auto"Controls motion policy. Auto pauses for reduced motion and while the shader is outside the viewport.
width / heightnumber | string"100%"Sets the canvas CSS dimensions. Size the parent element to establish the visible area.
maxPixelCountnumber2073600Caps the rendered pixel budget. Override only after measuring the target devices.

Credits

The rendering engine is Paper Shaders, distributed under the Apache License 2.0. The example image is Scott Webb's Banff landscape, released under CC0. vivid-layer supplies the adapter, playback and loading policies, documentation, and Registry packaging.