This version
Light bent by the moving surface bunches up into bright, shifting patches on the pool floor: where neighbouring refracted rays converge, the floor glows.
How this version works
At render scale 0.8, the fragment shader builds a moving surface from five directional sine waves with different amplitudes and speeds. Nine surface samples estimate first and second derivatives using finite differences. The second derivatives form a refraction mapping whose inverse absolute determinant supplies brightness, capped to prevent singular peaks. First derivatives slightly displace a procedural tiled floor, while concentrated light adds pale highlights and a radial darkening softens the edges.
The trick in this version
The shader approximates light concentration locally from surface curvature rather than tracing and accumulating individual refracted rays. Everything is calculated in one fragment pass, without a stored water simulation or a separate caustic texture.
Historical context · GPU
2011 · Evan Wallace
WebGL Water
A GPU height-field simulation you draw on, with a draggable sphere, raytraced reflections and refractions, soft shadows and caustics, on floating-point textures.
- Platform
- GPU · GLSL
- Era
- GPU
- Rendered on
- GPU
- Tags
- caustics · refraction
- Sources
- WebGL Water (2011)