Why there is a need for Vitamin D supplement when in fact it is synthesized inside our body. Well, it is needed for exclusively breastfed infants, elderly, people with greater melanin and those with fat malabsorbtion (NIH 2007).
There are two options in case additional vitamin intake is necessary. One is taking Vitamin D capsules, the other is eating ultraviolet treated mushrooms. A study made by Feeney (2006) showed that Vitamin D2 of mushroom could be increased by exposure to UV-C. The precursor ergocalciferol is being converted to Vitamin D2 under ultraviolet exposure.
The vitamin D precursor inside human body is cholecalciferol. Both vitamins have the same function.
A recent study by Boston University Researchers (Michael F. Holick et al) which was published at ift.org showed that eating ultraviolet treated mushrooms is as effective as taking commercial vitamin D capsules, for healthy adults.
So in case there is a need to supplement the vitamin, taking either vitamin D capsule or ultraviolet treated mushroom is acceptable. Maybe a sun exposed mushroom would give appreciable amount of specific nutrient.