In OpenGL Version 4.3 and above, there are six shader stages/types: vertex, geometry, tessellation control, tessellation evaluation, fragment, and compute. In this chapter, we'll focus only on the vertex and fragment stages. In Chapter 7, Using Geometry and Tessellation Shaders, I'll provide some recipes for working with the geometry and tessellation shaders, and in Chapter 11, Using Compute Shaders, I'll focus specifically on compute shaders.
Shaders are fundamental parts of the modern OpenGL pipeline. The following block diagram shows a simplified view of the OpenGL pipeline with only the vertex and fragment shaders installed:
Vertex data is sent down the pipeline and arrives at the vertex shader via shader ...