wNoiseScale and wNoiseOffset - control water refraction
fNoiseScale - controls foam
maxDepth - set max depth of your water mesh
wDeepColor and wShallowColor - set the water colors for shallow and deep
I’ve added in some gizmos in the PG so you can play around with the spheres and water.
In the spirit of opensource, do what you will with it. It served my needs as a base and there’s a lot more that can be done/customized for your own needs. Feel free to experiment.
@phaselock sorry for resurrecting old thread, but I was googling for stylized water shader and found myself here There is one problem I noticed, that foam edge is rendered even if mesh or it’s part is above water. Foam is rendered as long as target mesh and water mesh overlaps from camera perspective.
As you can see here, part inside of red rectangle is above water. How we could render foam only on the edge where water and mesh actually meets?
Thank you.
I made the original shader so I’ll let you know right away that’s the one downfall of this method and there is no easy work around other then using a completely different method.