Frankly, I'm not highly familiar with this, but since nobody else is answering:
The 3rd argument of refract()
is documented as "the ratio of indices of refraction eta". So what you're suggesting makes sense to me. It the ratio is eta
going from material A to material B, the ratio would be 1.0 / eta
going from material B to material A.