Returns a refraction vector using an entering ray, a surface normal, and a refraction index.
ret refract(i, n, ?)
Parameters
Item
Description
i
[in] A floating-point, ray direction vector.
n
[in] A floating-point, surface normal vector.
?
[in] A floating-point, refraction index scalar.
Return Value
A floating-point, refraction vector. If the angle between the entering ray i and the surface normal n is too great for a given refraction index ?, the return value is (0,0,0).