fresnel VEX function
Computes the fresnel reflection/refraction contributions given an incoming vector, surface normal (both normalized), and an index of refraction (eta).
Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex
See also: refract

void fresnel(vector i, vector n, float eta, float kr&, float kt&)

void fresnel(vector i, vector n, float eta, float kr&, float kt&, vector R&, vector T&)
Computes the fresnel reflection/refraction contributions given an incoming vector, surface normal (both normalized), and an index of refraction (eta). The amount of reflected light will be returned in kr, and the amount of transmitted light will be returned in kt. Optionally, the reflection and transmission vectors can be returned in the R and T variables. The R and T variables will be normalized vectors on exit.
eta is a relative index of refraction, the ratio between the interior and exterior index of refraction, where the exterior is defined by the direction of the normals (normals point away from the interior).