nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Depth peeling, multisample buffer, 177.78 (http://www.nvnews.net/vbulletin/showthread.php?t=120387)

kwvtk 10-02-08 02:01 PM

Depth peeling, multisample buffer, 177.78
1 Attachment(s)

The depth peeling algorithm in VTK does not work on an nVidia Quadro FX 3600M (512MB) (driver 177.78) when a multisample buffer is used. It works fine if the framebuffer
is not initialized with a multisample buffer. Same problem with an nVidia GeForce 8800 GTX (768MB) (driver 173.14.12).

It works fine on an nVidia GeForce 6800 256MB (driver 192.12) with or without a multisample buffer.

Note that the algorithm takes care of disabling multisampling rasterization with glDisable(GL_MULTISAMPLE).

A detail bug description is in:


Uncompress the archive with:

$ tar xjvf bug_vtk_depth_peeling_quadrofx3600m.tar.bz2

VTK: http://vtk.org/get-software.php#cvs

Best Regards.

François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA

AaronP 05-15-09 03:35 AM

Re: Depth peeling, multisample buffer, 177.78
Sorry for the very slow response on this. This was investigated and determined not to be a bug:

Originally Posted by OpenGL developer
The first depth peeling step eliminates the front face of the cube, and the following step is supposed to eliminate the rest of the cube. The third pass is supposed to discard every fragment, as they were all rendered in the previous step. With a multisample buffer, however, the left and top faces of the cube are not being discarded.

In summary, this test relies on a comparison using shadow2DRect between a downsampled texture containing the depth buffer from the previous pass and the multisampled buffer (with the same geometry, nothing changed) from the current pass to work the same as if there was no multisample buffer.

The OpenGL spec 3.3.1 (Multisampling) states:
If MULTISAMPLE is disabled, multisample rasterization of all primitives is
equivalent to single-sample (fragment-center) rasterization, except that the frag-
ment coverage value is set to full coverage. The color and depth values and the
sets of texture coordinates may all be set to the values that would have been as-
signed by single-sample rasterization, or they may be assigned as described below
for multisample rasterization.

This seems to explain why the test isn't behaving as the user expects; disabling GL_MULTISAMPLE does not "turn off multisampling", it just disables the alpha multiplication of the rasterized fragment (as described at the beginning of 3.3). This also implies that the fact that this behavior changed post-G80 is not necessarily wrong.

Note the developer can probably accomplish multisample rendering + depth peeling, which I assume is what they really want, with GL_EXT_framebuffer_multisample.

I hope that helps!

kwvtk 05-22-09 12:52 PM

Re: Depth peeling, multisample buffer, 177.78
Thank you. I suspected an issue like that. As it was working with GeForce 6, I was not sure.

As far I as know, there is no depth peeling algorithm working with multisampling.

The following technique takes advantage of multisampling to deal with Order-Independent Transparency, but it is not the depth peeling algorithm itself:


François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA

All times are GMT -5. The time now is 03:32 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.