if you’re using distance fields, look into the “distance to nearest surface” material node. you can mask out intersecting stuff with gradients to fade out/create foam or whatever.
edit: or perhaps that’s not possible with landscapes? can’t remember if landscapes generated them (since I don’t use landscape and I’m still on 4.9)