Where the ocean meets the shore

Blitz3D Forums/Blitz3D Beginners Area/Where the ocean meets the shore

How would you tell where an ocean meets the shore.
Lets say you have a plane, as the water, and a terrain as the island, and you want to place a foam texture where the ocean meets the terrain. Is there any way to do this?