News for hackers. Stuff that matters.
Re:Rainyday.js by coldnebo on Monday September 23, 2013 @12:34PM (#6432107)
He can't really do that with the present approach. :)

Each 'drop' of rain is really a circle painted using the reflection scaled to the size of the drop. This approach is very fast, but won't scale well with odd-shaped drops and larger drops. With a small enough spherical drop, it's a good enough approximation for refraction.

With larger drops, you'd start to notice that the reflection isn't a refraction (i.e. the reflection is cutout in the shape of a circle, rather than truly refracted as in a drop of water).

Other approaches could be adding more expensive texture transforms, or WebGL + a refraction shader for bigger and/or non-spherical drops.

Re:Rainyday.js by tel on Monday September 23, 2013 @10:40PM (#6435579)
Obviously at this point we should begin ray-tracing.
Re:Rainyday.js by devindotcom on Tuesday September 24, 2013 @02:59AM (#6436442)
I'll call John Carmack.