earlydepthstencil

Forces depth-stencil testing before a shader executes.

earlydepthstencil   

Remarks

Depth-stencil testing is normally done during pixel processing by a pixel shader. Forcing early depth-stencil testing causes the testing to be done prior to the shader execution; the purpose is to improve per-pixel performance by culling/reducing/avoiding unnecessary pixel processing.

An application can force early depth-stencil testing by supplying the attribute or the hardware may execute early depth-stencil testing provided no depth values are written and no unordered access operations are performed in a shader as an optimization.

This attribute is supported in the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute
x

 

Shader Model 5 Attributes

Shader Model 5