Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Depth peeling and coplanar issue (z-fighting)

Threaded View

  1. #1
    Intern Contributor
    Join Date
    Dec 2011
    Posts
    59

    Depth peeling and coplanar issue (z-fighting)

    Hi,

    I have troubles with the depth peeling technique and coplanar surfaces. The original algorithm is able to peel only one layer at the i-th depth, so if you have more than one, only one will be peeled.

    I found this paper online http://dl.acm.org/authorize?6581249, he says

    Extending F2B: We present the Z-fighting free F2B (F2BZF) depth peeling by adapting the F2B algorithm to peel all fragments placed at the same depth.
    When we have peeled all fragments at one depth, the next depth layer underneath is returned. To obtain all fragments at the same depth we discard the fragments that are not placed at this depth.
    To distinguish among z-fighting fragments, we extract (peel) the color of the fragment which has the maximum primitive identifier (build-in variable glPrimitiveID of GLSL [Kessenich 2009]). One extra geometry pass is used to calculate the sum of the (remaining, not peeled) z-fighting fragments and find which of them should be extracted next. We discard peeled fragments of the same depth by eliminating all fragments that have a primitive identifier smaller than the maximum primitive id determined during the previous step. Both computations are performed in one pass using additive and maximum blending operations respectively.


    I dont get how he can calculate the sum of the remaining z-fighting fragments and the next hightest id with the add and max blending..

    Shader code here

    http://www.cs.uoi.gr/~fudos/siggraph2011.html

    He should use an extra color texture (with internal pixel format RGBA_32F) to store the identifiers
    Last edited by elect; 12-05-2013 at 07:41 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •