where n is the refractive index,
θi is the angle of incidence with respect to the surface normal,
θt is the angle of the refracted ray, and the subscripts
1 and
2 indicate the side of the incident and refracted ray, respectively. The ray splitting algorithm automatically also detects when rays undergo total internal reflection and suppresses the release of refracted rays accordingly.
