Overview
Paper Shaders are highly customizable through parameters that control colors, animation, distortion, and visual effects. This guide covers how to customize shaders to match your design needs.Using Presets
Each shader comes with carefully crafted presets that showcase different aesthetics:- React
- Vanilla JS
Available Preset Exports
Each shader component exports its presets:Color Customization
Color Formats
Shaders accept colors in multiple formats:- React
- Vanilla JS
Color Limits
Each shader has a maximum color count:- MeshGradient: 10 colors
- DotOrbit: 40 colors
- GodRays: 5 colors
- Warp: 10 colors
- StaticMeshGradient: 10 colors
- StaticRadialGradient: 10 colors
Working with Alpha
Colors support transparency:Parameter Ranges
Most shader parameters use normalized 0-1 ranges for consistency:Common Parameters
Speed Parameter
Thespeed parameter is special:
When
speed={0}, requestAnimationFrame stops entirely, making static shaders
completely free from ongoing performance costs.Frame Parameter
Set starting frame for deterministic results:Shader-Specific Parameters
MeshGradient
DotOrbit
Water (Image Filter)
Warp
GodRays
Dynamic Updates
Update parameters in response to user interaction:- React
- Vanilla JS
Combining Shaders
Layer multiple shaders for complex effects:Responsive Parameters
Adjust parameters based on screen size:Color Palette Tools
Generating Complementary Colors
Color Interpolation
Best Practices
Performance-Conscious Customization
1
Use static shaders when possible
Set
speed={0} for backgrounds that don’t need animation.2
Limit color count
More colors = more GPU calculations. Use 3-5 colors for best performance.
3
Reduce parameters on mobile
Lower distortion, grain, and other effects on mobile devices.
4
Test on target devices
Always test customizations on actual devices, not just desktop.
Visual Quality Tips
Color Harmony
Color Harmony
- Use complementary colors (opposite on color wheel) for vibrant looks
- Use analogous colors (adjacent on color wheel) for harmony
- Include one darker color for depth
- Test with different backgrounds
Animation Speed
Animation Speed
- Subtle effects: 0.2-0.5 speed
- Standard: 0.8-1.2 speed
- Energetic: 1.5-2.5 speed
- Match speed to your brand personality
Parameter Balance
Parameter Balance
- Start with preset as baseline
- Adjust one parameter at a time
- Avoid maxing out all effects (looks noisy)
- Less is often more
Preset Switching
Create smooth preset transitions:Saving Custom Presets
Store and share your custom configurations:Next Steps
Sizing & Fit
Control how shaders scale and fit containers
Performance
Optimize customized shaders for production
API Reference
Explore all shader parameters
React Usage
React-specific customization patterns
