3 ms·
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
by coldnebo 13y ago
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.
- tel 13y agoObviously at this point we should begin ray-tracing.
- devindotcom 13y agoI'll call John Carmack.