Multi depth Z-buffer

In order to apply CSG to non-convex objects in image space, it could be useful to be able to operate on a multi depth Z-buffer.

Give me an example on why this is needed

Maybe I’m wrong but I think multiple Z-buffer can be achieved with the upcomming ARB_superbuffer extension.

[EDIT] spelling…

[This message has been edited by Corrail (edited 02-08-2004).]

What exactly is meant by multiple depth-buffers in this context? By that I mean, what sorts of operations would be done on the buffers?

I don’t think superbuffers will let you do anything with multiple depth-buffers at once, but it will let you share one depth-buffer with multiple color buffers. Is that the desired functionality?

I do not know superbuffer specification exatcly but you can map any number of colorbuffers, textures, vertex arrays, … to a memory object. So if you use a memory object as a color buffer and as a rectangular texture in one pass (which should be allowed) you can write a fragment shader/program that do additional depth-testing.

AFAIK this should be possible.

[This message has been edited by Corrail (edited 02-09-2004).]

Here’s an excellent example of a multi-level z-buffer.
Support 2 different blend methods, one for when the depth-test fails (ie, new pixel is further away than the one in z-buffer), and one for when it passes (new pixel is nearer than the one in z-buffer).
This would eliminate having to sort transparent objects.

/agree with cryo… That z buffer would be nice, also for shadowmapping without biasing

Originally posted by cryoknight:
Here’s an excellent example of a multi-level z-buffer.
Support 2 different blend methods, one for when the depth-test fails (ie, new pixel is further away than the one in z-buffer), and one for when it passes (new pixel is nearer than the one in z-buffer).
This would eliminate having to sort transparent objects.

That effect can be acheved by using GLSLang shaders, just disable z test/write and do your own z testing/writing in the shader with that special effect.

Or you could first disable z writing and set the depthfunc to GL_GREATER and render the polygon with the zfail blendfunc.
then enable z writing, set the depthfunc back to GL_LEQUAL and render polygon with the zpass blendfunc
Actuarly in that method you only use one z buffer.

To eliminate having to sort transparent objects you would need a multilevel color/z buffer.
And it would have to be hardware supported to be worth the effort.