Interaction between incoming waves and the coast. The effect is based purely on local depth. As the waves approach the shallows, they get shorter and taller, until a point where they suddenly lose a lot of amplitude.

If the wind blows away from the shore, though, this becomes a mess. I'll need to check the gradient of the distance to the coast and inhibit the effect.

#GameDev #IndieDev #IndieGame #GodotEngine #Godot #ProceduralGeneration #ProcGen

@thomastc Nice work! I think a solution probably looks like taking the dot product of the wind vector and the terrain gradient and using that to determine wave amplitude. Awesome stuff :)
@jsbarretto Yeah, that's the idea. The gradient needs to be smoothed, otherwise small underwater bumps will do weird things. The definition of "small" depends on wavelength though. Maybe something something mipmaps.
@thomastc Ah, fair enough. Perhaps just sampling a handful of times over a wide area would be enough? The further apart the samples, the less effect any small discontinuities would have, and it's not like you really care to capture any significant detail
@jsbarretto So basically mipmaps 😉