Projection Matrix
Projection matrix three main component:
- Aspect ratio
- Field Of View (FOV angle)
- Normalization
Aspect ratio
We scale, shink thing on x-axis.
FOV:
Talking about 'how much object can we see?'
- The bigger FOV, the object have to be smaller.
- The smaller FOV, the object have to be bigger.
so, we inverse the scale factor to: 1 / tan(angle/ 2)
Normalizing
- zfar: the maximun value we can disapy
- znear: the closest value we can saw.
So zfar / (zfar - znear), zfar over the total Z distance give us normalized value. And at the end we subtract the offset.
The flow of projection: