Looking down through about 1.2 m of water at rippled sand.

Watch the caustic cells grow as this increases. Same surface, same sun — the pattern just spreads on its way down.

The fast little surface-tension wrinkles riding on top of the swell. Two wave systems, different physics.

Red and blue refract by slightly different amounts. Drag to zero and the caustics go dead white — that's the tell.

How fast the water eats red. Everything past that is what's left over.

What's actually running: four gravity waves plus a capillary layer, summed as a height field. The gradient of that field gives a surface normal at every point.

The view ray refracts through the normal and lands on the sand. Separately, a sun ray is traced down through the surface — and the brightness on the sand is the Jacobian of that mapping: take a tiny square of surface, refract its corners, measure how much the patch shrank on the way to the bottom. Squeezed means bright. That's a caustic, computed rather than pasted on.

The whole refraction runs three times at three indices of refraction, which is where the rainbow edges come from.