6 ms·
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
by dllu 13y ago
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.