Hi everyone,
I'm computing the nearest/furthest point of a mesh (actually its bounding volume) to the camera and changing the near/far clip-plane dynamically accordingly, in order to keep depth buffer precision errors to its minimum.
However, after setting the closest point found as the near clipping plane I'm getting this error:
I've verified that there are no other points closer than the point being retrieved as the one nearest to the camera, but still that point being clipped. i.e. It can be the case that the closest point is in one of the corners of the box, but that corner is being clipped entirely.
Definitely adding a little offset to the near clip-plane would avoid the problem, but not sure that would be the proper solution; as. in theory, just passing the closest point should be working, but not sure why it's not.
Any ideas?
Thanks
PS.- Also, the offset needs to be of 0.12 for it to render properly, which is too much to be a precision problem.