View Full Version : Any way to temporary disable the far clipping plane?
07-06-2004, 10:07 AM
I need to disable Far Clipping Plane to render some distant points. Is it possible?
Or I have to push the Far Plane with e.g. glFrustum, render those points, and then to restore my old Frustum? I suppose it's OK to chage the Frustum during the rendering, but I never tried before...
07-06-2004, 12:51 PM
No you cannot disable it.
You can set it pretty far away though, just make sure the near clipping plane is n't to close to the viewer.
07-07-2004, 04:15 AM
Have a look at http://oss.sgi.com/projects/ogl-sample/registry/NV/depth_clamp.txt , it may prove useful
07-07-2004, 06:35 AM
Hi NiCo, thanx for the hint. Yes, I looked at it, and that might be "it", but it's supported only on NVidia HW which is not acceptable.
And when changing Near and Far planes with gluPerspective, Z buffer gets cleared, so it's not convenient. I'll render in several passes, grouped by object distances. First those really far away, then the others.
07-07-2004, 06:39 AM
It's possible to construct a projection matrix with an infinite far plane (you can derive it yourself fairly easily by seeing wha happens to the elements of the "normal" projection matrix when far tends to infinity). If you search for "infinite projection matrix" in google I'm sure you'll get lots of hits. It's commonly used for rendering stencil shadow volumes.
07-10-2004, 09:59 AM
Thanx harsman, but that would decrease the Z buffer accuracy, when translating Z coordinates to [0, 1] range. I think two (or more) passes will do better.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.