. , OP - OpenGL. , :
zNear, , :

SYMBOL MEANING TYPICAL VALUE
------ -------------- -------------
fov vertical field of view 45 – 90 degrees
aspect Aspect ratio around 1.8 (frame buffer Width / Height)
znear near clip plane +1
zfar far clip plane. 10
SYMBOL MEANING FORMULA
---------- ------------------------------- --------------
halfHeight half of frustum height at znear znear∗tan(fov/2)
halfWidth half of frustum width at znear halfHeight×aspect
depth depth of view frustum zfar−znear
( http://davidlively.com/programming/graphics/opengl-matrices/perspective-projection/)
- - (NDC), " ". , 2x2x1 (x, y, z). , (-1, -1, 0) - (+1, +1, +1), .
, zNear zFar, , zFar → zNear.
Your collision detection and response system is responsible for ensuring that the camera does not get too close to geometry. Too close is a function of your zNear and geometry boundaries. Even if you have a zNear 1E-9, the geometry will be cropped when it gets too close to where the clip comes from.
So: fix the collision detection and stop worrying about your zNear.
source
share