A pixel shader computes color and other attributes of each pixel. Pixel shaders range from always outputting the same color, to applying a lighting value, to doing bump mapping, shadows, specular highlights, translucency and other phenomena. A pixel shader alone cannot produce very complex effects, because it operates only on a single pixel, without knowledge of a scene's geometry or of neighboring pixels. A pixel shader is a computation kernel function. Pixel shaders can alter the depth of the pixel (for Z-buffering), or output more than one color if multiple render targets are active.
|