Drag the mouse to rotate.

This was based on "An Approximate Image-Space Approach for Interactive Refraction", by Chris Wyman.

Usually when you see refraction in a 3D scene that isn't ray-traced, only the refraction against the front surface of the object is calculated. The first surface is easy, and it does a fair job of fooling an undiscerning eye, but it's far from accurate. Truly accurate refraction requires computationally expensive ray-tracing, but Chris' paper offers an efficient method of approximating front and back surface refractions, which comes close to physical accuracy.

Programmed in Dart. Source code available at GitHub.