IT lexicon › Programming › Water effect

Water effect

Programming På svenska → Updated: 2026-08-16

A rippling water surface computed from a simple neighbour-average — one of the 90s' most copied demo effects, and one of the cheapest.

The effect keeps two height buffers and updates each point as the average of its neighbours minus the previous value, with a little damping. The result is waves that spread, bounce off edges and die away just like real water. That buffer is then used to displace the pixels of a background image so it appears to ripple.

"Raindrops" are made by poking single points in the buffer. Even though the maths is one line of code per pixel, the result looks expensive — hence its popularity in PC demos of the mid-90s, around the same time plasma and moiré were every coder's first exercises.

← Back to the lexicon