Features
- Multiple grid patterns (lines, waves, zigzag, patterns)
- Various distortion shapes (prism, lens, contour, cascade, flat)
- Configurable shadows and highlights
- One-directional blur effects
- Edge softness control
- Grain overlay options
Basic Usage
Parameters
Visual Parameters
Source image to apply the fluted glass effect to
Background color in hex, rgb, or rgba format
Shadow color for darker areas in hex, rgb, or rgba format
Highlight color for lighter areas in hex, rgb, or rgba format
Size of the distortion shape grid
Grid shape pattern:
lines: Regular parallel lineslinesIrregular: Lines with irregular variationswave: Wavy patternzigzag: Zigzag patternpattern: Complex sine pattern
Shape of distortion within each stripe:
prism: Sharp prismatic distortionlens: Lens-like curved distortioncontour: Contoured distortion with depthcascade: Cascading wave distortionflat: Minimal flat distortion
Power of distortion applied within each stripe
Direction of the grid relative to the image in degrees
Color gradient added over image, following distortion shape
Thin strokes along distortion shape, useful for antialiasing
One-directional blur over the image with extra blur around edges
Glass distortion and softness on the image edges
Texture shift in direction opposite to the grid
Extra distortion along the grid lines
Distance from all edges to the effect (applies to all sides)
Distance from the left edge to the effect
Distance from the right edge to the effect
Distance from the top edge to the effect
Distance from the bottom edge to the effect
Strength of grain distortion applied to shape edges
Post-processing black/white grain overlay
Sizing Parameters
How to fit the shader into the canvas dimensions
Overall zoom level of the graphics
Overall rotation angle in degrees
Horizontal offset of the graphics center
Vertical offset of the graphics center
Animation Parameters
Animation speed multiplier (0 for static)
Manual frame control for animation
Presets
The FlutedGlass shader comes with several built-in presets:- Default: Classic fluted glass with prism distortion
- Abstract: Irregular lines with high blur and distortion
- Waves: Wave pattern with stretch and contour distortion
- Folds: Cascade distortion with margins
Examples
Wave Pattern
Abstract Effect
Subtle Folds
Technical Details
Shader Uniforms (Vanilla JS)
When using the vanilla JavaScript API:Grid Shapes
lines(1): Regular parallel lineslinesIrregular(2): Irregular line patternswave(3): Sine wave patternzigzag(4): Zigzag patternpattern(5): Complex 2D pattern
Distortion Shapes
prism(1): Sharp prismatic effectlens(2): Curved lens effectcontour(3): Depth contour effectcascade(4): Cascading wavesflat(5): Minimal distortion
Performance Notes
- Static shader (no animation by default)
- Blur parameter can impact performance at high values
- Grain effects are relatively lightweight
- Works best with high-resolution source images
