Whitecaps and Foam For a Dynamic Ocean

Hello,
I’ve been working to implement an ocean into unreal. So far I have the basic waves working by using some Gerstner waves, and it looks pretty good. I’ve been trying to add in some whitecaps and some foam, but I’ve been having some issues doing that. I’ve seen lots of other shaders use them, but I have been unable to figure out how to do it for myself in a way that looks decent. I’ve tried just checking if wave was above a certain height and then having it sample from the foam. I’ve also tried using the world aligned blend, but I have been unable to results from that as well because it would appear that most of the normals are facing in the upwards direction which ends up covering most of the water. I’m just curious if anyone has any experience or is willing to share some insight on how I might go about doing this.

Thanks.