How it works...
When we prepare a geometry that will be drawn in a 3D application, the geometry is usually modeled in the local coordinate system--the one in which it is more convenient for the artist to create the model. However, the graphics pipeline expects the vertices to be transformed to a clip space, as it is easier (and faster) to perform many operations in this coordinate system. Usually it is the vertex shader that performs this transformation. For this, we need to prepare a matrix that represents a perspective or orthogonal projection. Transformation from the local space to the clip space is performed by just multiplying the matrix by the position of a vertex.
The same matrix, apart from the projection, may also contain other operations, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access