Hello everyone. I’ve been lately trying to make a procedural planet generator for an RTS mobile game. I’ve finally started work on the water that will fill the planet, and I wanted to have foam form on the shores. I’ve tried several foam techniques, and all use scene depth to get the foam to only show on the shore. Here’s an example of what I would like to achieve (notice the foam on the lakes’ borders)
I’ve experimented with Brackeys’ force field shader (FORCE FIELD in Unity - SHADER GRAPH - YouTube), but I only get a white circle on the center of the view instead of getting foam on the borders of the water mesh that collide with the planet.
Is there a good way to get the above result with shader graph and URP?
Thank you in advance.
Edit: I’m using Sebastian Lague’s tutorials to create a cube sphere for the planet terrain, and I’m creating a second cube sphere for the water sphere.