PS Killed Pixels


The metric Pixel Shader Kill Pixel Count represents the number of pixels eliminated in pixel shaders by the texkill instruction, which corresponds to the HLSL clip() function.


If you render a quad with 8×8 pixels size, located entirely within the viewing frustum, and half of the pixels were eliminated in the pixel shader, the Pixel Shader Kill Pixel Count is 32.

Improving performance

As shaders do not have the ability to “exit out” of full processing, the amount of killed pixels does not have a positive effect on shader performance. But in case all the pixels within the 2×2 rendering quad (subspan) are discharged, the quad will be removed from the next stages of the rendering pipeline and will not be written to the render target. This could provide a significant performance benefit, especially in case of rendering to 64-bit or 128-bit render targets.

See Also

Pixel Rendered

PS Invocations

PS Killed Pixels