What is a shader?

In computer graphics, a shader is a type of computer program originally used for shading in 3D scenes (the production of appropriate levels of lightdarkness, and color in a rendered image). They now perform a variety of specialized functions in various fields within the category of computer graphics special effects, or else do video post-processing unrelated to shading, or even perform functions unrelated to graphics at all.