You can click to add new raindrops.
Each raindrop is represented using Gaussian metaballs centered at positions . A pixel at position is part of a raindrop if:
If the pixel is within a raindrop, it has a corresponding surface normal that is the gradient of the above function. To get the refracted image, we then query the colour of the image a point offset from the pixel by some constant times the normal vector. Some shading is also done with luminosity dependent on normal.
Background image credit: Matanaka farm buildings by Karora, Public Domain