Try it live: https://martinrenou.github.io/threejs-caustics
Implementation details: https://medium.com/@martinRenou/real-time-rendering-of-water-caustics-59cda1d74aa