docs: add coordinate space journey diagram

This commit is contained in:
2026-05-30 20:59:18 -05:00
parent 72411b9786
commit 2bc7b5c58e

View File

@@ -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. 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. 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<f32>, 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
```