2 comments

[ 3.4 ms ] story [ 14.4 ms ] thread
Nice. But I expected some gravity, so the raindrops slide slowly over the “glass”.

Another problem is that when the raindrops are too big, then a “cross” appear over them (I guess it’s an artifact of the ilumination.) http://imgur.com/bX9Uebp

Hmm, gravity can be implemented easily I think. Another thing is that raindrops are not always perfectly circular.

The "cross" is an artifact of the way I deal with saturation. The raindrops are simply Gaussian functions and the shading/refraction depends on the gradient thereof. If you keep clicking in one spot, the function values and the gradients become very large -- then the top half of the raindrop becomes black and the bottom half becomes white. To mitigate this, I simply run everything through the sigmoid function f(x) = 2/(1-exp(-x))-1, but this leads to the "cross" artifact. I'll think about how to deal with this a bit more.