Updated refraction derivation.