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 5 of 5

Thread: Depth Test

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jun 2012
    Posts
    207

    Depth Test

    Painters algorithm is inefficient because " It simply paint the background objects first and then paint the near objects over the top of them. This may use a trivial amount of paint on the canvas (much less be useful for manual painting), but for graphics hardware, this results in repeated writes to the same fragment location, each of which has a performance overhead. Too much overwrite slows down the rasterization process, and we call such renderings fill limited" so in case of GL_DEPTH_TEST we discard the fragments in depth test only, but till then we process the fragments through rasterization and all because rasterization takes place independently for each primitive. so there would be very little performance gain for operations after depth test.

    Is that correct? I am assuming here it is not tile-base rendering in which case there is early z-killing at the time of rasteriation.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    788
    Hmm, are you describing reasons why the painter's algorithm is inefficient or reasons why the z-buffer algorithm is inefficient?
    Also, this does sound a bit like a homework question...

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jun 2012
    Posts
    207
    I am trying to figure out the difference in the performance of painter's algorithm and z-buffer algorithm. In the first one, pipeline is execute till the end for each fragment while for the second one it is executed till depth test where we discard the values. Is that correct?
    If so, I think there wont be much performance gain as compared to early z-killing for which we skip the frag shader too.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    788
    You are omitting one step from painter's algorithm: sorting of polygons by depth.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Jun 2012
    Posts
    207
    Quote Originally Posted by carsten neumann View Post
    You are omitting one step from painter's algorithm: sorting of polygons by depth.
    I almost forgot that one. Thanks for your inputs.

Posting Permissions

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