The recent trend in graphics hardware has been to replace fixed functionality with programmability in areas that have grown exceedingly complex.
Vertex processing involves the operations that occur at each vertex, most notably transformation and lighting. Fragments are per-pixel data structures that are created by the rasterization of graphics primitives. A fragment contains all the data necessary to update a single location in the framebuffer. Fragment processing consists of the operations that occur on a per-fragment basis, most notably reading from texture memory and applying the texture value(s) at each fragment.
But if you have ever been frustrated because OpenGL did not allow you to define
area lights or because
lighting calculations are performed per-vertex rather than per-fragment or, if you have run into any of the many limitations of the traditional OpenGL rendering model, you may need to write your own OpenGL shader.
Here’s a brief
list of what’s possible with OpenGL shaders:
list of what’s possible with OpenGL shaders: