HSR Confusion

This topic contains 1 reply, has 2 voices, and was last updated by  Joe Davis 5 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30762

    presbywf
    Member

    I’m a little confused about hidden surface removal and the “normal” depth buffer (i.e. the one we explicitly create).

    Say I have 5 boxes that I want to render.  The primitive information is passed into the ISP where it’s rasterized and then HSR is done.  Is the normal depth buffer ever actually queried during any of this?  Does the HSR only look at the primitive information it has been passed?

    #35497

    Joe Davis
    Member

    HSR doesn’t necessarily use the depth buffer.

    Case 1:
    If you rendered 5 boxes and didn’t attach a depth buffer to your framebuffer, then the boxes would be rendered in submission order. In this case, the ISP would use the tag buffer to keep track of the latest primitive that covers a given fragment within a tile to ensure that is the only fragment rendered (removed overdraw).

    Case 2:
    If you rendered 5 boxes with a depth buffer attached, then the fragment closest to the camera would be rendered. In this case, the ISP would use the depth buffer. If a fragment of a primitive being processed is closer to the camera than the current value in the depth buffer for that pixel, then the depth buffer would be updated with this fragment’s depth value and the tag buffer would be updated to reference this fragment. If a fragment of a primitive being processed is further from the camera compared to the value in the depth buffer for that pixel, then it will be ignored. This process is repeated for all primitives within a tile until the ISP has constructed a complete tag buffer for the tile of all fragments that need to be rendered.

    You may already be aware, but our SDK documentation (including our “SGX Architecture Guide for Developers” doc) can be found here. I’ve filed a bug against the document for the HSR explanation to be improved.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.