Search code examples
directxdirectx-11pixel-shader

No pixel shader means no color output?


I'm doing depth/stencil passes in DirectX11 and I believe I can simply unbind the pixel shader slot to skip the pixel shading and thus all color-output to rendertargets alltogether (even if there are rendertargets bound), and just render to the depth/stencil buffer. I cannot find any documentation to support this theory however. Am I right in my assumption?


Solution

  • It is correct to proceed as you describe.

    The best way to know if something is legit is to enable the debug layer with the appropriate flag at the device creation, d3d will log any inappropriate states or arguments to the API.