Animated two-color dithering applied over one of seven pattern sources: simplex noise, warp, dots, sine wave, ripple, swirl, or a 3D sphere. The dithering matrix can be random, 2×2 Bayer, 4×4 Bayer, or 8×8 Bayer. Pixel size controls the resolution of the dithering grid.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.
Usage
- React
- Vanilla JS
Props
Background color (the darker dithered shade).
Foreground color (the lighter dithered shade).
Pattern source used as the input grayscale for dithering. See shape options below.
Dithering matrix type. See type options below.
Pixel size of the dithering grid. Range:
0.5 to 20.Animation speed multiplier. Set to
0 to pause.Static frame position when
speed is 0.Shape options
TheDitheringShapes enum provides the available pattern sources:
| Key | Value | Description |
|---|---|---|
simplex | 1 | Animated simplex noise |
warp | 2 | Sinusoidal warp flow |
dots | 3 | Orbiting dot pattern |
wave | 4 | Sine wave |
ripple | 5 | Radial ripple |
swirl | 6 | Polar swirl |
sphere | 7 | Lit 3D sphere |
Type options
TheDitheringTypes enum provides the available dithering matrix types:
| Key | Value | Description |
|---|---|---|
random | 1 | Random noise dithering |
2x2 | 2 | 2×2 ordered Bayer matrix |
4x4 | 3 | 4×4 ordered Bayer matrix |
8x8 | 4 | 8×8 ordered Bayer matrix |
Presets
| Name | Description |
|---|---|
Default | Sphere with 4×4 Bayer, black and blue |
Warp | Warp flow with 4×4 Bayer, green on dark |
Sine Wave | Wave with 4×4 Bayer, cyan on magenta |
Ripple | Ripple with 2×2 Bayer, warm brown tones |
Bugs | Dots with random dithering, green on black |
Swirl | Swirl with 8×8 Bayer, blue on transparent |
Sizing
This shader usesShaderSizingParams. See Sizing and fit for fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, and worldHeight props.