6.4.1 About refractions
Game developers are regularly looking for efficient methods to implementing visually impressive effects in their games. This is especially important when targeting mobile platforms because you must carefully balance resources to achieve maximum performance.
Refraction is the change in direction of a light wave because of a
change in the medium it is passing through. If you want extra realism with
semi-transparent geometry, refraction is an important effect to consider.
The refractive index determines how much light is bent, or refracted, when
entering a material. Refraction is defined as the bending of light as it passes from one
medium, with refrative index n1 to another medium with
recractive index n2.
You use Snell’s Law to calculate the relationship between the refractive
indices and the sine of the incident and refracted angles.
The following figure shows Snell’s Law and refraction:
Figure 6-36 Refraction of light as it passes through one medium to