diff --git a/docs/concepts/coordinate-systems.md b/docs/concepts/coordinate-systems.md index 706a55c..23c2bcf 100644 --- a/docs/concepts/coordinate-systems.md +++ b/docs/concepts/coordinate-systems.md @@ -99,3 +99,25 @@ For our triangle, every vertex follows this path: 4. **Viewport transform (automatic):** GPU scales NDC to window pixel coordinates. The triangle appears on screen. In a real 3D application, this journey includes model, view, and projection matrices before clip space. For the rainbow triangle, the journey is three steps through identity transforms. The hardware pipeline stages are the same regardless. + +```text +Vertex Buffer (NDC positions) + │ + ▼ +Vertex Shader → Clip Space (vec4, homogeneous) + │ + ▼ +[Fixed: Perspective Division: (x,y,z) ÷ w] + │ + ▼ +NDC Cube [-1,+1]×[-1,+1]×[0,1] + │ + ▼ +[Fixed: Viewport Transform: scale + translate] + │ + ▼ +Viewport/Framebuffer (pixel coordinates) + │ + ▼ +Rasterization → Fragments → Fragment Shader → Output Merge → Screen +```