Refraction reimplemented.
New demo.