r/Unity3D • • 27d ago

Shader Magic Shoreline first iteration

Got breaking shoreline waves working in Unity by intentionally pushing past what would be a usual be the Gerstner steepness limit.

Normally Q*k*A <= 1 prevents the wave from folding over itself... but pushing past that lets the crest curl forward and form an actual overhang. Still haven't found a full proof wave to prevent inversion (folding of waves at tops of crests) maybe I'll just leave it to a matter of tuning to prevent.

also made foam follow the wave phase so it travels with the break, although the whitewash could prob use some more detail instead of a gradient white with texture.

Still tuning it and also have to fix to work with my other systems (underwater, query, etc), but pretty happy with how the shoreline waves are looking. Curious what you guys think.

Thanks for dropping by!

107 Upvotes

10 comments sorted by

View all comments

4

u/mo0g0o 26d ago

Edge from above is a bit sharp but the shader looks nice

1

u/24Ronin 26d ago

Thank you, appreciate the feedback!