Creating a Stylized Water Shader Need some help

Greetings, I’ve been working on this shader for the past few weeks trying to achieve an ocean shader similar to Rime and The Witness. So far I’m pretty happy with the work I’ve done since I’m was very rough on my shader tech knowledge. Everything I put into this shader was from a collection of tutorials, hints and ideas pointed out in videos and posts from other forums. I’ve still got plans to add more stuff like gerstner waves, a 2nd shoreline effect, I still need to tie in via blueprint the wet sand and stone with the rising and lowering tide. There is one thing that I’m stuck on though and was hoping for help and that is to figure out how both in Rime and the Witness, how they add the swirly details behind the shoreline. It seems to follow along the contour which I have no idea how to achieve. I don’t know if there is someway to procedurally generate patterns on a mask with a material function or some trick I can use to achieve that look. For the shoreline, I’m using distancetonearestsurface with mesh distance fields. Here is a pic of the work so far. If anyone has any ideas on how to get that look, I’d love to hear about it.

Here are a couple pics of my progress and an additional image as reference.

http://imgur.com/e988vpc

http://imgur.com/z9wALIg

https://media.playstation.com/is/image/SCEA/rime-screen-01-ps4-us-20aug14?$MediaCarousel_Original$

Can anyone help me? I posted the question on the answer hub here as well. Need help with Stylized shoreline effect - Rendering - Unreal Engine Forums

If you’re using mesh distance fields, you could likely trace out further from the shoreline in increments and add the result as a “white” color to get those swirls/drawn-waves that trace the shoreline. I used a technique to get mesh distance field info further than the source by stacking trace distance calls in the material, the thread where I learned how to do it from @RyanB can be found here, perhaps you could modify it to fit the xy checks you’d need to do this.

Best of luck!

Thanks for the response hippowombat! Sorry for not answering earlier. I thought of trying something like that but the way you stack it seems like it will help more. I also learned about blending modulation so I think I’ll try combining both techniques. I’ll post an update when I get things working!