FANDOM


Refract-0

Name Edit

Refract - computes a refraction vector.

Synopsis Edit

vector3 refract(vector3 i, vector3 n, vector1 eta);

Parameters Edit

i
Incidence vector.
n
Normal vector.
eta
Ratio of indices of refraction at the surface interface.

Description Edit

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.