Features
- Realistic water caustic patterns
- Animated wave distortion
- Configurable highlight intensity
- Multi-layer caustic effects
- Edge distortion control
- Works as filter or standalone texture
Basic Usage
Parameters
Visual Parameters
Optional source image to apply the water effect to
Background color in hex, rgb, or rgba format
Highlight color for caustic patterns in hex, rgb, or rgba format
Coloring added over image/background following caustic shape
Power of 2nd layer of caustic distortion for more complex patterns
Caustic distortion power on the image edges
Additional distortion based on simplex noise, independent from caustic
Overall power of caustic distortion effect
Pattern scale relative to the image
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
Horizontal reference point for positioning
Vertical reference point for positioning
Animation Parameters
Animation speed multiplier
Manual frame control for animation
Presets
The Water shader comes with several built-in presets:- Default: Balanced water effect with caustics and waves
- Slow-mo: Slow animation with strong highlights
- Abstract: High-scale pattern for abstract effects
- Streaming: Fast flowing water without caustics
Examples
Slow Motion Water
Abstract Water Pattern
Streaming Effect
Technical Details
Shader Uniforms (Vanilla JS)
When using the vanilla JavaScript API, colors are passed as RGBA arrays with values from 0 to 1:Animation
The Water shader is animated by default. The animation shows:- Moving caustic patterns
- Wave distortion
- Flowing highlights
speed parameter or frame for manual control.
Performance Notes
- Animated shader with continuous rendering
- Uses simplex noise for wave distortion
- Multiple layers can be disabled for better performance
- Best with moderate
sizevalues for visible caustics
