Tue, Mar 8, 2016
Transformation Matrix to Transform Objects from NDC Coordinates to Screen Coordinates (Viewport Transform)
One matrix transformation in the 3D to 2D transformation pipeline is the viewport transform, where objects are transformed from normalized device coordinates (NDC) to screen coordinates (SC). In short, it's the transformation of numbers in the range [-1, 1] to numbers corresponding to pixels on the screen, which is a linear mapping computed with linear interpolation. In this article, I cover the math behind the generation of the viewport transformation matrix.