There is no duplicate ocean in my example.
- There is an ocean mesh (the blue cube obviously). Nothing special here.
- The sphere inside. Nothing special here.
- The hull mesh - simply a smaller cube here (not a plane, but I suppose it could be), with the materials shown.
The proxy mesh takes up the interior volume of the hull up to the water level.
One solution is to have the blocker mesh sample the wave function, so it can displace its own verts to align with the water. This would require it to have the same polygon density as the water though for top surface, since if it had fewer polygons then tiny gaps would still appear.
Here is the gap, exaggerated a bit here. The camera is clipping into the surface of both the water mesh and the hull proxy so that the top surface of the water is visible:
Here is the gap removed with pixel perfect alignment:
Essentially it needs to be just far enough above the surface that it doesn’t z-fight with the water but close enough that there is no visible gap when your cameras clipping plane intersects both surfaces. There’s probably a better way to solve that gap but that’s more work than I’m able to spend on this.
Although now that I think of it, if your water material is two sided, you need a second layer just below the surface to block it when looking up from inside.
It would be better to swap to a one sided version of the ocean material when the player is on the ship, as they can presumably never be on the ship and underwater at the same time anyway.
There is literally nothing else to this material. Other than what is shown, and being set to SLW it is completely default.
It should make whatever is using it totally invisible due to the “color scale behind water” setting at 1. When placed in front of another single layer water material that is farther away, it will overwrite make it disappear.

