dilevin / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
2 stars 5 forks source link

Projection Matrix #61

Open AlekseyPanas opened 8 months ago

AlekseyPanas commented 8 months ago

in model_view_projection, we are given the view and projection matrices.

If I understand correctly, we convert the geometry (given in world coordinates) into camera coordinates and then use the projection matrix to convert it to 2D.

However, the projection matrix is mat4, which means the output vector is 4D. What is the projection matrix (i.e, what values does it have) and what exactly does it do?

wenzhi-guo commented 8 months ago

Your understanding is correct. You are doing all the computation with homogeneous coordinates and hence the output vector is 4D.