a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
In the field of computer graphics, a shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility. Shaders are used to program the graphics processing unit (GPU) programmable rendering pipeline, which has mostly superseded the fixed-function pipeline that allowed only common geometry transformation and pixel-shading functions; with shaders, customized effects can be used.
Types of Shaders
- Vertex Shaders - Manipulates vertex data.
- Pixel Shaders - Determines the color that each pixel should have.
- Geometry Shaders - Generate new graphical primitives based on the ones it receives.
- Compute Shaders - Computes arbitrary information. Supported from OpenGL 4.3 and Direct3D 10.
- Mesh and Task Shaders - Brings the compute programming model to the geometry pipeline, replacing vertex and tessellation shaders.
- Metal Shading Language