directxdirectx-10

Why my pixels are not clipped against near/far planes


I have a really weird problem. I render some triangles in the scene with D3D10 and what is surprising is that color values of these pixels are not clipped against near/far planes. On the other hand, depth values seem to be clipped fine. Evidence that this works as I have just described is as following:

Idea idea what could be wrong? I think it might be some render state set incorrectly but I don't really know where to look.


Solution

  • I'm making your comment an answer, as it was exactly the issue I had in D3D11 (same in D3D10).

    Make sure that you set DepthClipEnable to TRUE in any D3D11_RASTERIZER_DESC in question.