Depth Complexity
The maximum number of fragments falling that could be falling into any pixel.
Determining the depth complexity #
- Have a stencil buffer, the same size of the render target
- Render the scene once without the depth buffer
- For each fragment, increase the integer in the stencil buffer (in the FS)
- Using this buffer as a texture, create a new render target that is half size in both dimensions. The fragment shader takes 4 values from the previous stencil buffer and writes the max.
- repeat log(n) rendering passes, to compute the maximum depth compexity