This 2D water shader was done following a YouTube video by PlayWithFurcifer.
All credit goes to Fucifer: https://x.com/TweetFurcifer
Some minor hacks applied post v4 update
Added additional comments so this can be implemented by beginners (incl. me)
Example scene included
You will find these instructions next to the shader code along with additional (hopefully useful) comments.
Please note I'm a beginner with shaders, so I am most probably messing things up. Any comments and tips are super welcome.
- First create a new sprite. Any sprite will do. Dragging a default "icon.svg" is not a must but strongly advised.
- Select the sprite. Under Inspector -> Material add a New ShaderMaterial;
- Select the material (the white BALL). Shader -> New Shader, Options: Type: Shader; Mode: Canvas Item, Template: Empty; Path: whatever-you-want
- Paste this code in the shader editor
- Under shader parameters add noise and noise2, make sure to set them to seamless. I use FastNoise, you can choose hichever noise you wish. Experimentation is part of the fun :)