06 Space, camera and depth
Matrices: object → world → screen
Local coordinates → world → camera → projection.
-3.143.14
2580
Exercise
Runs once per vertexDrag numbers, or edit the code
JS side
gl.uniformMatrix4fv(uModel, …) // rotation 0.50 / 0.10gl_Position = projection × view × model × position; read it right to left.
Try it
- Set the field of view to 80°: stronger perspective
- Switch to the vertex stage and find the three matrices