I have a plane mesh that I am trying to make 'water' from by deforming the vertices on CPU in a 'waves' motion. (I know this is not ideal for performance). But currently I am trying to figure out how to render water underneath the plane such that it perfectly follows the 'waterline' of the plane mesh's movements.
I have tried a Fog-based solution, but that did not allow for aligning with the plane's deforming 'waterline'. I have tried to make another plane perpendicular to this one and deform it in with the same CPU mesh formula, but that was flawed because it does not create the same motions when working with a vertically-oriented plane as opposed to the horizontally-oriented plane that I'm working with.
Therefore, does anyone have ideas for how to render water underneath a deforming 'water' plane mesh, such that the 'waterline' of the plane's moving vertices is indeed adhered to?