- February 23, 2012 at 9:16 pm #30762
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?February 29, 2012 at 11:08 am #35497
HSR doesn’t necessarily use the depth buffer.
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).
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.