Refraction

Refraction was implemented following Snell’s law, with the reflected and transmitted components weighted following Schlick’s approximation of the Fresnel equations.

Refraction and soft shadows

Refraction and soft shadows

Unfortunately, clear objects still cast shadows (no caustics). However, although a sphere with close to unity index of refraction will have no visible Fresnel reflection, increasing the index dramatically will cause the reflected component to grow in intensity until only the rearward reflection is visible.

Index 1.5

Index 2.0

Index 2.5

Index 10.0

This effect would be much more dramatic with a flat shape; however, implementing a volumetric effect with triangles seemed unwieldy. Future improvements would include cube primitives.