# Materials v3 — Caustics A swimming pool seen from straight above: turquoise tiles bent by ripples, crossed by a bright net of light with faint colour fringes. The light is computed from the ripples' curvature, not painted. Source: https://steevepommier.com/motion/materials-v3-caustics/ Section: Motion Published: 2026-11-11 Tags: shaders, 2d --- Seen from directly overhead, a grid of turquoise tiles with white grout and a few darker blue ones wobbles under the ripples. Over it runs a net of bright, shifting lines of light, edged with thin red and blue fringes, and a few small white glints. The camera breathes in and out and turns slightly, and the pool returns to its first frame at the end of each loop. The surface is a sum of sines whose directions are spread by the golden angle, each turning a whole number of times per loop. In one pass the shader gets the height, slope and second derivatives; light on the floor is the inverse of the determinant of the surface's curvature, so it peaks where a patch of light collapses to a line. Red, green and blue are focused at slightly different depths, and the tiles are displaced by the slope above them.