I have several puzzles about projection with near and far clipping plane.
I made a cube with front face Blue at +z axis and back face Red at -z axis, the side length of the cube is 0.5.
Make model and view matrix identity matrix, take orthogonal projection as example.
when set near and far cliping plane negative values, the result face showed as follow:
What puzzled me :
1.OpenGL Projection Matrix declares, the near plane is the projection plane, is it right? what is the actual projection plane in OpenGL ?
2. when using glOrtho or something similar API:
glOrtho(GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top,
GLdouble nearVal, GLdouble farVal);
the near clipping plane is always interpet as -nearVal, and far clipping plane interpret as -farVal.It has nothing to do with the camera lookat direction because the camera position and direction influence the view matrix, after view transformation, we can say camera in OpenGL is always point to -Z axis, that's why we interpret nearVal and farVal the way above, Am I right ?
3.In the picture above, when camera is within the viewing frustum, how to projection on to the near plane ? Please help to explain the result.