Working on some shaders in Unity these days. Here's one.
Same shader, just different bitmaps & vertex colors.
Result, and the things that go into it.
Red vertex color is for the foam, green for the water surface, blue for the muddy edges (black vc shows the rocks). Vertex alpha for alpha blending.
Distortion texture is just the Clouds filter in Photoshop, repeated again in each channel. The distortion texture is applied to the UVs. It's done separately for foam/surface vs. mud/rocks, so the mud/rocks are distorted but don't scroll, while the foam/surface both scrolls and distorts.
The mesh is flat, no depth, a requirement for a game I'm working on.
The color textures for the water are all packed into one bitmap. Red channel = foam, green channel = water surface, blue channel = mud, alpha channel = rocks.
The lava version uses a different bitmap, same rgba layout though.
(bigger image here
, slightly modified but essentially the same)
I can explain more if anyone has questions.
I like how it came out, but it's too expensive for our mobile game so I'll have to revisit it.