Name[]
Refract - computes a refraction vector.
Synopsis[]
vector3 refract(vector3 i, vector3 n, vector1 eta);
Parameters[]
- i
- Incidence vector.
- n
- Normal vector.
- eta
- Ratio of indices of refraction at the surface interface.
Description[]
Returns a refraction vector given an incidence vector, a normal vector for a surface, and a ratio of indices of refraction at the surface's interface.
The incidence vector i and normal vector n should be normalized.