One thing that strikes me with it, is that its a bit too random, need a bit of maindirection wave. Anyway, regarding the foam, instead of using masks, you could use vertex color to mark where it should be. Dont know what kind of object your ocean is, but if you use landscape, you should be able to easy paint the vertex…