Fragment Culling

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Fragment Culling

      I have been reading about the Pixel Shader and Conservative Depth Output, and cant seem to nail down exactly when/how fragment culling is performed.

      When are the depth stencil tests performed? I found an entry on the Game Dev site that said that it occurs after the pixel shader, but the *book that I have indicates that it should be "performed as early as possible," and then goes on to an example where it is being performed in the pixel shader when the PS attempts to write fragments to the depth output (depth stencil?).

      The book also metions the use of Hi-Z, and that when the pixel shader writes to the depth stencil it is somehow altered so that Hi-Z cannot be used. But, when CDO is configured it can.

      Is Hi-Z used in conjunction with Depth Stencil Testing? Put another way, does the depth stencil test comparison function tell Hi-Z how to do fragment culling?

      How does CDO keep the PS from interfering with the Hi-Z? From what I have read it just sets a range for acceptable depth changes from the interpolated depth. Does CDO simply allow depth changes to be made while fragment culling is being performed? It seems redundant to have a second inequality that the change has to fulfill before it is depth tested.

      *book: Praactical Rendering and Computation w/ D3D11
    • RE: Fragment Culling

      That's a good question and beyond my knowledge. I'll ask a friend of mine who knows more than I and get back to you!
      Mr.Mike
      Author, Programmer, Brewer, Patriot