View Full Version : depth buffer

03-20-2001, 05:23 AM
Two questions....

1) Is there anyway to read directly from or write directly to the depth buffer. In particular I would be using a GeForce card, ie. hardware accelarated and not software implementation.

2) Is there any way to increase the resolution of the depth buffer. I have heard of this w-buffer as opposed to a conventional z-buffer. This is supposed to give greater resolution at greater distances. (does it?) Is it possible to implement this under hardware accelarated OpenGL? My problem is polygon depth fighting with each other when close to each other at great distances. I need more resolution at a greater distance.



03-20-2001, 04:39 PM
1/ drawpixels/readpixels with GL_DEPTH_COMPONENT
also you can draw the geometry with glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE)
so nothing gets drawn , but the depth info gets written

Tom Nuydens
03-21-2001, 02:03 AM
2) Depending on what your scenes look like, this might be of some use: http://groups.yahoo.com/group/opengl-gamedev-l/message/17389

- Tom

03-31-2001, 05:51 AM
Quick FIX:
Use glScalef(0.3, 0.3, 0.3) before positioning your camera and rendering your scene.
And use glEnable(GL_NORMALIZE) to keep the normals...normal. (I know it's slow, but it helps).

This will allow you to have much larger scenes without the problems with the z-buffer, because in the world of opengl it will actually be a very small scene, but very dense.