I have a case like this:
GraphicsDevice.SetRenderTargets(RenderTargetA, RenderTargetB);
... draw first texture to both targets
GraphicsDevice.SetRenderTargets(RenderTargetA, RenderTargetC);
... draw second texture to both targets
The problem is that when SetRenderTargets
is called for the second time, RenderTargetA
is cleared.
In the end I want RenderTargetA
to have both textures on it, while RenderTargetB
should only have the first and RenderTargetC
should only have the second. I know this can be done with RenderTargetUsage.PreserveContents
, but according to this, perserving the contents comes with some performance and combatibility tradeoffs.
Is there some method on GraphicsDevice
or some other way I can use to just set the second render target without effecting the first?
Thanks