Orthographic projection is another type of operation that transforms vertices from their local coordinate system to a clip space. But opposed to a perspective projection, it doesn't take a perspective division into account (doesn't simulate the way we perceive our surroundings). But similarly to a perspective projection, it is also represented by a 4x4 matrix, which we need to create in order to use this type of projection.
Preparing an orthographic projection matrix
How to do it...
- Create two variables of type float named left_plane and right_plane, and initialize them with the positions (on the x axis) of left and right clipping planes, respectively.
- Prepare two variables of type float named bottom_plane and top_plane. Initialize them with positions...