I render shadowmaps the standard way, that is by binding a depth/stencil buffer and by setting a null render target and a null pixel shader. That works fine except for alpha tested geometry. In this case I need a pixel shader to discard pixels that fail the alpha test. Of course the DirectX debug layer complains as no render target is bound:
#D3D11 WARNING: ID3D11DeviceContext::DrawIndexedInstanced: The Pixel Shader expects a Render Target View bound to slot 0, but none is bound.
The results are correct but I'd like to suppress this annoying warning. Any suggestions ? For example, is there something in DirectX 11 equivalent to the NULL render target hack in DirectX 9 ? Or should I simply create and bind a temporary render target for alpha tested geometry ?
Thanks