Need help with Stylized shoreline effect

I’ve been working on this ocean material for a while and I’ve gotten stuck on creating a mask for my shoreline foam. I’m trying to create something that resembles the Rime ocean shoreline. Something similar to the image linked. I’ve managed to create a simple shoreline foam using mesh distance fields and my material can take in a mask which can make the effect a bit more interesting but what I want is the waviness effect that follows the contour of the shoreline rather than world space and I have no idea how to do this. Is there a way to spawn shapes along the mask with a material function or a simpler way to create an effect that follows the contour? Thanks for any help.

Is anyone able to help me?

nice job i really like your game
I need to know how to make that ;—; you found a blueprint or something like that can help me? thank you!

I just want to say that I am partly inspired by rime for my project and I think it’s amazing that somehow I ended up on your thread looking to solve the same issue. Here’s a screenshot of my project, Duality. If I find a solution I’ll comment it here.

Hi
I have just seen your thread, I have seen the shore effect before using a spline based solution to give the effect (link: UE4 Spline Mesh Solutions - YouTube )

I am assuming it uses a flat mesh with an animated texture/flipbook to create the wave effect and is tiled along the plane that follows the spline. I have not looked into creating spline meshes as I currently do not have much spare time but that would be my guess of where to start.
Hopefully it helps.