Dispersion

### 6.6.5 Dispersion

For all materials with a ior different from 1.0 the refractive index isn't constant throughout the spectrum. It changes as a function of wavelength. Generally the refractive index decreases as the wavelength increases. Therefore light passing through a material will be separated according to wavelength. This is known as chromatic dispersion.

By default POV-Ray does not calculate dispersion as light travels through a transparent object. In order to get a more realistic effect the `dispersion` and `dispersion_samples` keywords can be added to the `interior{}` block. They will simulate dispersion by creating a prismatic color effect in the object.

The `dispersion` value is the ratio of refractive indices for violet to red. It controls the strength of dispersion (how much the colors are spread out) used. A DISPERSION_VALUE of 1 will give no dispersion, good values are 1.01 to 1.1.

Note: there will be no dispersion, unless the `ior` keyword has been specified in `interior{ }`. An ior of 1 is legal. The ior has no influence on the dispersion strength, only on the angle of refraction.

As POV-Ray does not use wavelengths for raytracing, a spectrum is simulated. The `dispersion_samples` value controls the amount of color-steps and smoothness in the spectrum. The default value is 7, the minimum is 2. Values up to 100 or higher may be needed to get a very smooth result.

Dispersion & Caustics

Dispersion only affects the interior of an object and has no effect on faked caustics (See "Faked Caustics").
To see the effects of dispersion in caustics, photon mapping is needed (See the sections "Photons" and "Dispersion & Photons").