Underwater Caustics Lab

Physical Optics & Fluids — Hologram interactive shader collection

Underwater Caustics Lab simulates the shimmering light patterns seen on the floor of a swimming pool or shallow ocean — caustic networks formed when sunlight refracts through a wavy water surface. The effect occurs because the curved water surface acts as a dynamic lens array, focusing and defocusing light into bright concentrated lines and dark shadows.

The shader uses Gerstner wave equations to model the water surface, then traces refracted light rays through the surface using Snell's law vector formulation. Caustic intensity is computed via the Jacobian determinant of the refraction mapping — where rays converge, intensity spikes to form the bright caustic lines. Cauchy dispersion separates wavelengths slightly, adding the subtle chromatic fringing visible in real underwater caustics.

Parameters control wave amplitude, frequency, water depth, and Cauchy dispersion coefficient for chromatic separation.

Technical Details

Experience this shader live at hologram-puce.vercel.app/underwater-caustics-lab