Water simulates a liquid surface over an input image using layered caustic noise and simplex waves. It can also run as a standalone animated texture without any image input, filling the canvas with an abstract rippling pattern.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.
When used as an image filter, the
image prop is required. In React, pass a URL string and the component loads it automatically. In vanilla JS, pass a fully loaded HTMLImageElement to u_image. Without an image, the shader renders the caustic pattern over the colorBack color.Usage
- React
- Vanilla JS
Props
Optional source image to apply the water distortion to. In React, pass a URL string. In vanilla JS, pass a fully loaded
HTMLImageElement as u_image. When omitted, the shader renders the caustic pattern over colorBack.Animation playback speed multiplier.
Pattern scale relative to the image. Range:
0.01 to 7.Strength of the caustic distortion applied to the image UV coordinates. Range:
0 to 1.Additional distortion based on simplex noise, independent of the caustic layer. Range:
0 to 1.Strength of the second caustic distortion layer. Range:
0 to 1.Amount of highlight color blended over the image following the caustic shape. Range:
0 to 1.Caustic distortion power applied at the image edges. Range:
0 to 1.Background color visible outside the image frame, or used as the base when no image is provided.
Color of the caustic highlight overlay.
Presets
The following presets are exported from@paper-design/shaders-react:
| Export | Name | Description |
|---|---|---|
defaultPreset | Default | Balanced caustic distortion with subtle highlights |
slowMoPreset | Slow-mo | Slow, large caustic waves with visible highlights |
abstractPreset | Abstract | High-scale, high-caustic standalone texture |
streamingPreset | Streaming | Fast moving wave distortion |