You can only fake it with stencil and post processes overlays, and it’s not 100% accurate in regards to the water line.
The higher the wave the more error prone it becomes.
(Actually is more about the amplitude and sudden chang in height).
If you look for it, I believe I previously shared pseudo code to do it in a discussion about it.
You may be better off creating a vertical mesh with the wave formula applies to the verts at the top.
You isolate them via a vertex color, and run the function on it to shift the Z like the rest of the water.
The material for the plane could then also use transparency and other effects, which will likely look way better and more polished.
Above all, if you drive the mesh formula correctly based on the vert location you’ll have a 100% accurate stencil that represents where the edge of the water actually is.
Instead of relying on the stencil of the top of the water (the water mesh) which is highly inaccurate depending on angles.
Either way you go about this is rather performance intensive. Particularly with how bad rendering is right now.
Edit:
made some quick footage on it once it uploads:
Edit 2:
Noticed this. If you can’t find the engine function you can make your own based on this essentially. (personal note: it doesn’t seem 100% accurate to the grstner formulae. https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models eqation 9. Chanches are the engine one sin’t right either?)