Fluted Glass is an image filter shader that distorts an input image through configurable ribbed or streaked patterns, simulating the look of fluted or textured glass. Grid shape, distortion profile, blur, edge softness, and grain are all individually adjustable.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/paper-design/shaders/llms.txt
Use this file to discover all available pages before exploring further.
This is an image filter shader — it requires an image input. In React, pass a URL string to the
image prop and it is loaded automatically. In vanilla JS, pass a fully loaded HTMLImageElement to the u_image uniform.Usage
- React
- Vanilla JS
Props
The source image to filter. In React, pass a URL string — the component loads it automatically. In vanilla JS, pass a fully loaded
HTMLImageElement as u_image.Shape of the repeating grid pattern. Use the
GlassGridShapes enum (vanilla JS) or string literal (React).| Value | Description |
|---|---|
lines | Straight parallel lines |
linesIrregular | Organically varying lines |
wave | Sinusoidal wave pattern |
zigzag | Zigzag stripe pattern |
pattern | Crosshatch pattern |
The profile of distortion applied within each stripe. Use the
GlassDistortionShapes enum (vanilla JS) or string literal (React).| Value | Description |
|---|---|
prism | Prism-like refraction |
lens | Lens-shaped bulge |
contour | Contour-following distortion |
cascade | Cascading waterfall-like flow |
flat | Flat, minimal distortion |
Size of the distortion shape grid. Range:
0 to 1.Direction of the grid relative to the image, in degrees. Range:
0 to 180.Power of distortion applied within each stripe. Range:
0 to 1.Texture shift in the direction opposite the grid. Range:
-1 to 1.Extra distortion along the grid lines. Range:
0 to 1.One-directional blur over the image and extra blur around edges. Range:
0 to 1.Glass distortion and softness on the image edges. Range:
0 to 1.Color gradient added over the image and background, following the distortion shape. Range:
0 to 1.Thin strokes rendered along the distortion shape, useful for anti-aliasing on small grids. Range:
0 to 1.Background color as a CSS color string (including alpha). Visible outside the image frame.
Color of shadow gradients applied over the distortion pattern.
Color of highlight strokes along the distortion edges.
Shorthand to set all four margins simultaneously. Range:
0 to 1.Distance from the left edge to the effect. Range:
0 to 1.Distance from the right edge to the effect. Range:
0 to 1.Distance from the top edge to the effect. Range:
0 to 1.Distance from the bottom edge to the effect. Range:
0 to 1.Strength of grain distortion applied to shape edges. Range:
0 to 1.Post-processing black/white grain overlay strength. Range:
0 to 1.Presets
The following presets are exported from@paper-design/shaders-react:
| Export | Name | Description |
|---|---|---|
defaultPreset | Default | Straight lines with prism distortion |
wavesPreset | Waves | Wave grid with contour distortion and blur |
abstractPreset | Abstract | Irregular lines at high scale and full blur |
foldsPreset | Folds | Cascade distortion with margins giving a folded edge look |
Enums
ImportGlassGridShapes and GlassDistortionShapes from @paper-design/shaders when using the vanilla JS API: