You only output to COLOR1 for AtmosphereBackPS…
In order to make MRT work, you have to output to both rendertargets at the same time from your pixelshader routine.
You have to do something like this for your MRT to work:
Thanks for your reply. That doesn’t seem to be the problem though (but helped me to identify an unneeded float4 in my pixel shader). It seems to be fine to write into any single render target from the pixel shader.
What solves the problem is when I change the creation of the render target:
The crucial part is MultiSampleCount. When I don’t use the multi sample count of the current presentation parameters, it doesn’t work.
Any idea why this is the case? Is there a general restriction that all render targets used at the same time need to use the same multi sample count. Maybe we should add a check for this to the setrendertargets call.