Ripple Shader in Godot
I wanted to play with glsl and godot, so I experimented with making a ripple effect inspired by the macOS Drift screensaver.
Each line is drawn with a shader
Roughly, the high level steps were:
- Spawn a grid of mesh instances using MeshInstance2D
- Space them out organically in a circle using blue noise
- Render each mesh’s texture with a shader
- Draw a segment using Inigo Quilez’s 2D distance functions
- Pass in noise and sample based on time to get scrolling effect
- Pass in position of each mesh to know where to sample the noise
- Offset segment angles, thickness and color based on noise value