Foam Texture on Ocean Shader

Hello guys,
I’m new to this forum and I’ve been using UE4 for 2 months and it is great, also the forum and answerhub is very supportive as well, great work guys!

Right now I’m playing with the water shader for ocean, just for the sake of learning rendering on unreal engine. I’ve been poking into lots of water shader thread, from gerstner wave to fft, storm to calm wave, threads from VAOcean to DotCam OceanDemo, amazing vertex displacement etc. But using that is very heavy solution, I’m planning to implement an easier one approach

I’ve made the waves using Gerstner Wave, only from 4 wave, the problem is how would I add foam texture on the top of the wave? also how do I mask the foam texture to make randomly displayed foam on the ocean surface?

Right now this is the result I’ve been working on

Here is my material setup

Thanks!

Hi, did you ever find the solution to add foam to the top of a wave?