Programmable Shaders
- Manipulate the light and color using arbitrary user programs
- Applied to either vertices or pixels (also called fragments)
- Applied uniformly to all elements
- Commonly programmed in the following languages: Assembly, Cg, GLSL, HLSL
Vertex Shader
- Manipulates vertex's position, normal, color, or texture coordinate
- Can also access arbitrary data designated by the programmer
- Typically applied before vertices are clipped
Pixel Shader
- Manipulates pixel's color and depth
- Can also access arbitrary data designated by the programmer
- Depending on resolution, an excess of 2 million pixels may need to be rendered, lit, shaded, and colored for each frame
References