Reputation: 1504
I have have been reading The Matrix has You trying to understand the perpective matrix.
This tutorial uses frustum scale fator S
to define the perspective matrix as below .
Xclip = S * Xcamera
Yclip = S * Ycamera
But there are other tutorials like OpenGL Projection Matrix which define the
xclip = 2 * n / (r-l)
yclip = 2 * n / (t-b)
Could some one please help me understand if they are same ?
Upvotes: 0
Views: 93
Reputation: 32587
When you assign S=2n/(r-l)
or S=2n/(t-b)
respectively, you end up with the same equations (don't forget the multiplication with x_camera
and y_camera
in the second case). In the first equations, the scale factor is just precalculated from other constants. Note that the scale factor is usually different for x and y, because the view frustum's base is not a square.
Upvotes: 1