I’ve been working on my own water material for a personal project now and while I’ve been quite succesful with the actual water shader so far I’ve run into some issues with the water foam around intersecting geometry.
So I’m working on a more stylized foam and I’d like the foam to form around any intersecting geometry. After doing a lot of research and experiments I found the exact thing I’d like to achieve:
Unfortunately I haven’t found a way to contact the blogger and the comment I left on the blog has gone unanswered so I now turn to you guys here.
I’m basically looking for some pointers or even better an example setup of what is shown in the blog. I’ve replicated the foam material itself but I just can’t figure out how to use the distance fields to generate my wanted UV coordinates.
Here is a link to the foam technique that is used in the above blogpost:
Any help would be greatly appreciated as I’ve been trying to solve this on my own for the past week with no success.