“Trece años dedicò a esas heterogéneas fatigas, pero la mano de un forastero lo asesinò y su novela era insensata y nadie encontrò el laberinto.”
J.L. Borges, El jardìn de senderos que se bifurcan.


Lounging by the pool

This water effect uses two heightmaps to keep track of the height of the water surface at instant t and t − 1. Each frame, the current heightmap is used to propagate the waves and produce the next heightmap. The current and next heightmaps are then swapped.

The normal to the water surface is then used to compute the refraction of the lightray coming vertically at the surface, and that ray is used to sample a background texture (here a blue checker board pattern). The same surface information allows to compute the reflection ratio, which is used to adjust the “brightness” of the surface by blending the sampled color with the white light color.