https://www.youtube.com/watch?v=LhQ85bPCAJ8
<aside> π‘ Objects inside the view frustum will be projected to the Near Plane (3Dβ2D projection). Anything outside the frustum will be clipped.
There are 6 clip planes: Near, Far, Top, Bottom, Left, Right
</aside>
<aside> π‘ * Move the Near Plane forward (+ve z-axis) β Zoom In β Objects become bigger
</aside>
<aside> π‘ Use similar triangles theorem to find the projected 2D points on Near Plane
</aside>
<aside>
π‘ Problem: we need to divide by z
to gain the correct projected points
Solution: store z
value to w
in gl_Position
and pass it into the Rasterizer, which will handle the Perspective Division (dividing z
) for us
</aside>
z
coordinate to be further away from the camera if you donβt see anything rendered on the screenz
value > 1 β visible range [-1, 1]