Light leaves the source as photons. Each photon goes straight until it meets a surface. A mirror reflects it. At glass or water the Fresnel equations give the chance R that it reflects; else it refracts by Snell's law, with an index n that changes with the wavelength λ.
Real light goes 3.00 × 10⁸ m/s, too fast to see. Here the photons in flight go at a slowed speed c that you set, about a metre a second. In glass or water of index n each photon goes at c/n, so a pulse slows down and its front bends as it goes in. That change of speed is the cause of refraction.
The pool bottom looks straight down through the water. The surface is a sum of travelling waves in two directions. At each point the sunlight refracts through the surface normal by Snell's law and goes to the floor at the depth d. Each small patch of water sends its light to a patch of floor; where the floor patch is smaller than the water patch, the floor is brighter by the ratio of the two areas, E = |dA₀| / |dA|. Where a patch folds to a line, the floor gets the bright lines of the net. The tiles also wobble: each view ray bends at the same surface.
The pool cross-section is a vertical slice of a pool. The surface is a sum of travelling sine waves h(x, t). Each crest is a weak lens: sunlight refracts at it by Snell's law and focuses at the depth d ≈ 1 / ((1 − 1/n) A k²). Where the focus is near the floor, the floor gets a bright spot that moves with the wave. The plot under the floor is the light on the floor. With the lamp below, rays that meet the surface at more than the critical angle, 48.6° in water, reflect back: total internal reflection.
The light image adds the path of every photon, so a pixel is as bright as the number of photons that cross it. Where the rays of a family come near each other the image is bright. The edge where they touch and fold back is the caustic. On it the Jacobian J of the ray map is zero, and the irradiance E ∝ 1/|J| goes to a peak.
In the pool each wave crest is a weak lens. Where a crest focuses at the depth d, the rays crowd into a bright line on the floor. See the 3D pool for the net of these lines in two dimensions of floor.