Shoreline Foam Experiments (Patreon)
Content
I've been experimenting with my idea for shoreline foam. It looks like it'll be pretty straightforward to implement, except for the foam texture. In this screenshot, the foam is pure white, untextured.
The foam image will have to be stored in an additional layer of the texture. And since liquids with glowmaps already uses the two layers specified in the texture format, it seems that the texture format will have to be modified. Which opens up another question: should foam have glowmaps?
Anyway, I'll keep improving the other aspects of the foam (depth, curve shape, inner rasterization optimizations) before deciding on what to do about texturing it.
The main limitation of this shoreline foam technique, as can be seen on the pillar on the right, is that the foam doesn't extend orthogonally to walls. However, this is barely noticeable during gameplay.
And the advantages are numerous over other shoreline foam techniques:
- No extra geometry.
- No extra rendering passes.
- No extra overdraw.
- It conforms to the shape of all submerged objects, including players and enemies.
- It's fully integrated with the wavy shorelines, ondulating together in sync.
Sure, it'll make liquids a bit slower to render, but it will still be much faster than any other technique.