And again, that method doesn’t define the shore, it defines the distance from the surface to the ground. You can have a sandbar very close to the surface of the water, but not breaking, and both the depth biased and distance to nearest methods will assume it is a shoreline and start generating waves where there shouldn’t be any at all.
The only way to accurately determine the shoreline is through a texture mask or a skirt mesh. Vertex painting is too expensive if you’re going to cover the entire ocean with vertices, and skirt meshes won’t work for very large oceans, so this leaves the texture option as the best one. If you do use a depth-based method, it will only be good for rocking seas and simple foam, not waves along the shore.