26 lines
1.1 KiB
Markdown
26 lines
1.1 KiB
Markdown
# The Rendering Pipeline
|
|
|
|
The four rendering stages:
|
|
|
|
1. Vertex Specification
|
|
2. Vertex processing
|
|
3. Rasterisation
|
|
4. Fragment shader
|
|
|
|

|
|
|
|
- **Application stage** is the software that runs on the CPU
|
|
- 
|
|
- **Vertex processing stage** is responsible for processing operations on individual vertices
|
|
- In this stage vertex positions are transformed from model space to world and then view space, and projected to clip coordinates
|
|
- Vertex **post processing**:
|
|
1. Primitive Assembly
|
|
2. Clipping
|
|
- 
|
|
3. Perspective divide
|
|
4. View-port transformation
|
|
- **Rasterisation stage** is responsible for calculating all of the pixels inside the triangles that are being rendered
|
|
- **Pixel processing stage** is responsible for processing operations on individual fragments.
|
|
- Texturing can also happen in the fragment shader
|
|
- Fragment shader computes a colour which is then merged with the colour buffer
|
|
- Merging calculates which fragments are hidden behind other fragments and only keeps the colour for the visible fragment |