Nadradený pojem:

A few tips:

- Often, one sets up the projection transformation and does not change it during the course of a game, unless user changes the window
- Think
of
*znear*and*zfar*as distance from the camera - A vertical field of view of 45 degrees is reasonable
- The aspect ratio should match the window size
- Don’t
use zero for
*znear*(use a small number like 1.0 instead)

Some OpenGL programmers combine the modelling, viewing, and projection matrices, and pass the combined matrix to the vertex shader.

This creates a viewing volume with a 45 degree field of view in the y direction (in eye coordinates) for the given window size (width, height). The near clipping plane is 1 unit away from the camera, and far clipping plane is 150 units away.

High

Nadradený pojem: