How to create ocean shoreline ?

I think depth only works with translucent materials. He seems to be using an opaque one.