Shader

In certain rendering engines such as Renderman, shaders are needed to describe to the renderer what attributes the shaded surface has. Originally shaders had to be programmed and compiled in C or C++ but that is somewhat rarer today. There are very few commercial raytracers that actually require much programming nowadays, but there are still those that reward it. Writing shaders still requires programming though hundreds of shaders are usually already available to the artist. Traditionally, shaders have been divided into several general categories based on what role they play:

In some computer graphics applications the term displacement shader is synonymous with bump map shader. In others, the two are terms describe different things. Bump mapping refers to a shader that alters the brightness value of pixels on an object depending on the incidence of light sources hitting the object, giving the impression of depth. This is sometimes called a displacement shader. Because this is only a shader, there is no real geometry added, saving CPU time when rendering, but at the cost of realism. Actual displacement maps work differently, by displacing an objects mesh according to the brightness value of a greyscale image. Displacement maps can be used not only to add more realism by changing geometry, they can be a simple solution to easily creating landscapes, hills and mountains.

Volume shaders use complex calculations to alter rays of light when they pass through transparent or translucent mediums, such as smoke, or water. Volume shaders often use complex refractive calculations and usually increase the render time significantly.

These make final adjustments to the pixels of the image before they are output. These are comparable to the filters of Adobe Photoshop. Depth of field is an effect implemented through the use of imaging shaders: first, a depth map of the scene is rendered in greyscale, then that image is used as a mask for a blurring effect so that only far away objects seem out of focus.