Original Post
I want to perform post-processing with normal data (for edge detection like in the C++ PostProcess sample). I have a pixel shader that outputs a COLOR0-semantic and a COLOR1-semantic value (for simplicity of debugging I just have the shader output a solid-color constant for both). When I render, I have the default render target set to index 0 and I have called SetRenderTarget to set index 1 to a render-target texture with: the same dimensions and format as the default RT, 1 mip level, and the RenderTarget Usage flag set. Is my understanding correct that the pixel shader should then write the COLOR0-semantic value to the 0-index render target and the COLOR1-semantic value to the 1-index render target? If I comment out the call: SetRenderTarget(1, myRenderTargetTexture), the main render target (i.e. the screen) looks fine, though clearly I don't have the normal data that I want. However, when I do call SetRenderTarget for my 1-index RTT, the screen does not get cleared, though I am still calling Device.Clear(ClearFlags.Target). Does Device.Clear clear all render targets? Anyone see any issues with what I am doing/my understanding of the process? Thanks in advance.