Execution model
When a primitive stage has ended, its processing in the vertex primitive stages (vertex shaders, geometry shaders, and clipping) becomes rasterized. The fragment shader execution begins this rasterization.
Consider a triangle; in order to paint that triangle onto the screen you need to convert it from its native vectorial form (vertices coordinate) to discrete pixels. The system that carries out that action is the fragment shader module, being executed once per each fragment.
The more of the framebuffer's area the primitive covers, the more times the fragment shader will be executed. The fragment shaders' performance has direct influence on your application's fill rate (the speed at which the GPU can output fragments).
Having said that, let's see two very important constraints about fragment shaders:
A fragment shader can't read the framebuffer. It's only capable of writing into it. If you need to mix your framebuffer with the result of your fragment shader computations, you...