This allows the GPU to still use early-z cull, since it can still trivially reject pixels for cases where the depth test will always fail for the specified upper/lower bound. The depth you output from the shader must then satisfy the inequality relative to the interpolated depth of the rasterized triangle (if you don’t, the depth value is clamped for you). For instance SV_DepthGreater, or SV_DepthLessEqual. Basically rather than using SV_Depth, you use a variant that also specifiea an inequality. What is it?Ĭonservative depth output: this is something you use for pixel shaders that manually output a depth value.
Here is an article about one of the little-known Direct3D 11 features: conservative depth output.