Home / Forums / Understanding the View-Projection Matrix: Camera Space to Normalized Device Coordinates (Part 3)

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Tutorial

Understanding the View-Projection Matrix: Camera Space to Normalized Device Coordinates (Part 3)

DirectXRay
DirectX 12 / Vulkan Dev
MEMBER
Rep: 240
Join Date: Feb 2023
Posts: 31
Thanks: 60
3y ago · Sep 7, 2022 4:52 PM
#1
Step-by-step mathematical breakdown of how 3D world coordinates transform through View and Projection matrices into [-1, 1] NDC space.
DirectXRay · DirectX 12 & Vulkan Command Lists
The following users thanked DirectXRay for this post:
ImGuiStyler
ImGui Animation Specialist
MEMBER
Rep: 210
Join Date: Mar 2024
Posts: 22
Thanks: 55
3y ago · Sep 7, 2022 9:03 PM
#2
World * ViewMatrix converts to Camera View Space (Z is depth). ViewSpace * ProjectionMatrix transforms into Homogeneous Clip Space (x, y, z, w).
ImGuiStyler | Clean Custom UI Controls & Easing
SecurityAudit
AppSec & Code Auditor
MEMBER
Rep: 135
Join Date: Jan 2025
Posts: 28
Thanks: 29
3y ago · Sep 9, 2022 3:03 AM
#3
Dividing x and y by w (Perspective Divide) yields NDC coordinates ready for viewport screen scaling.
SecurityAudit | Secure C++ Architecture & Boundary Auditing