#refraction

Light bending as it passes from one material into another, because it goes at a different speed in each. The index of refraction says how much slower: 1 for air, about 1.5 for glass, 2.4 for diamond. In a shader, refract(d, n, ratio) bends a ray by the ratio of the two indices, and gives nothing back when the ray meets the surface too slantwise to leave (total internal reflection).

1 shader

All techniques · In the glossary