I am having some issues setting up a pixel shader for use with a depth-only pass (rendering shadow maps).
The reason I am at all using a pixel shader for this is so that I can sample the diffuse texture and clip if on a sufficiently transparent pixel.
Here is my incredibly simple pixel shader:
void PS_DepthOnly(vs_depth_out IN) {
clip(DiffuseMap.Sample(DiffuseSampler, IN.texcoord).a - 0.1);
return;
}
Now this all works as intended, but the debug layer is complaining about the pixel shader expecting a render target to be bound to slot zero.
I have in fact intentionally unbound any render targets prior to drawing using the above pixel shader; I set it to have a void type, which I was under the impression would mean that it would not write to any render target. But this doesn't seem to be the case. Am I missing something here?
Now I know that I can just disable the warning, but it seems like it is actually trying to write something to the render target, while I was hoping it would be possible to bypass that part alltogether?