The mushrooms are exposed to a precise wavelength of ultraviolet light within the UV spectrum. Naturally occurring ergosterol (previtamin-D) within the mushrooms is converted to ergocalciferol (vitamin D2) once exposed to UV light.
During the light exposure, there is a series of photochemical and thermal reactions that converts the ergosterol to vitamin D2.
This photochemical process is similar to the process by which vitamin D3 is produced in human skin. The vitamin D process is controlled with a specific time and intensity of light exposure in order to obtain specific levels of vitamin D2 in the mushrooms.