This does seem possible with distance fields and “DistanceToNearestSurface” node.
I’ve managed to use the output from that node to mask in a different normal map depending on if it’s in the “foam” area or not… however there are some things to work out.
Screenshot of the material - only applied to my water plane.
However theres a large fade-out area (marked with a blue bracket in the above screenshot) that I’d like to cut down, although it’s not that noticeable once I use actual textures instead of black/white
Blueprint for the material
I circled most of the important nodes, the others don’t really matter, I’m just using them for testing/getting more control for material instances.
I guess the lerp in the 3. circle can be skipped completely etc. The normal map I’m using is also just as a test… please ignore that :rolleyes:
I’ve got no idea how to mask it out like in that “Bears don’t drift” screenshot where it seems to apply some kind of a texture along the contour of the shore through this method though. I’ve got some ideas if you’ve got a mesh surrounding the objects (similar to the stylized UE demo in the launcher) but dynamically? no idea.
Hopefully someone could give me a tip with that.