dronus
10-02-2005, 12:40 PM
sorry. its me again.
i got some probs related to the depth buffer i think.
i draw a scene in with vastly different scales, so its hard to fit the depth buffer. i set up a mechanism which moves the far/near clip planes via glFrustrum according to the position of the nearest and farthest objects. now i discovered one/two problems:
-first, sometimes far away geometry looses some polys as you can see here:
http://www.hirnsohle.de/pics/screens/depthBufferProblem.jpg
the "sun" on top right has some holes which shivers over their surface if camera/object is slightly moved. some polys, depending on transform, are not drawn i guess.
-second, the far plane only seems to clip the geometry (mostly not useful) bot doesn't scale the depth buffer, which seems only affected by the near plane. (i observed that fact as the "holes" mentioned above appear at ever the same distance of the NEAREST object, where i set the near clipping plane to.
now two questions arise:
-is it possible to control the depth buffers NEAR and FAR points to use it in full?
-if not, is it possible to fix the holes-bug? in fact, the "sun" is drawn over glClear-background, so all their polys could render, even if they are almost infinite away?? maybe inf>inf gets false with depth test? id like to tell gl to overwrite in "unclear" depth situations instead of leaving holes...
many thanks
Paul
i got some probs related to the depth buffer i think.
i draw a scene in with vastly different scales, so its hard to fit the depth buffer. i set up a mechanism which moves the far/near clip planes via glFrustrum according to the position of the nearest and farthest objects. now i discovered one/two problems:
-first, sometimes far away geometry looses some polys as you can see here:
http://www.hirnsohle.de/pics/screens/depthBufferProblem.jpg
the "sun" on top right has some holes which shivers over their surface if camera/object is slightly moved. some polys, depending on transform, are not drawn i guess.
-second, the far plane only seems to clip the geometry (mostly not useful) bot doesn't scale the depth buffer, which seems only affected by the near plane. (i observed that fact as the "holes" mentioned above appear at ever the same distance of the NEAREST object, where i set the near clipping plane to.
now two questions arise:
-is it possible to control the depth buffers NEAR and FAR points to use it in full?
-if not, is it possible to fix the holes-bug? in fact, the "sun" is drawn over glClear-background, so all their polys could render, even if they are almost infinite away?? maybe inf>inf gets false with depth test? id like to tell gl to overwrite in "unclear" depth situations instead of leaving holes...
many thanks
Paul