Odd culling happening in my RenderTargets

I am using Monogame 3.8 and having a weird problem which didn’t happen in early versions.

I create large RenderTarget2D and draw to it. End() is called. I plan to use this for drawing as Texture2D
example

I can draw it out as a Texture2D and it looks like that above. All good yet.

Now I have a new RenderTarget2D. I take the above Rendertarget2D, draw it to that new RenderTarget2D and add a translationMatrix which positions the viewport centered on the red X and the boundary of the viewport is the red square, it only shows what is in the red square. Draws as expected, all good yet.

Now I will take that first RenderTarget2D. Draw it again, it got culled somehow? And yes I am drawing at the 0,0, so i know it is onscreen. I can see it with output debugging.
result

Pseudocode example:


GraphicsDevice.SetRenderTarget(OriginalRenderTarget);
GraphicsDevice.Clear(Color.Black);
SBatch.Start();
SBatch.Draw(); // draw images
SBatch.End();

GraphicsDevice.SetRenderTarget(ViewPortRenderTarget)
GraphicsDevice.Clear(Color.Black);
SBatch.Start(translationMatrix: ViewportMatrix);
SBatch.Draw(OriginalRenderTarget);
SBatch.End();

GraphicsDevice.SetRenderTarget(null)
GraphicsDevice.Clear(Color.Black);
SBatch.Start();
SBatch.Draw(OriginalRenderTarget);
SBatch.End();

I can’t figure out why? I’ve tried setting different RasterizeStates. Was a new setting introduced somewhere? Any thoughts?

Thanks,
David

Have you checked the size of the 2nd render target? maybe it is smaller than the screen.

Both are larger than the screen. When I dynamically move and zoom out of the originalrendertarget it shows it as culled on the left and top.

What confuses me is it worked in 3.7 and 3.6

David

have you tried to render the render targets in another position and check if it is culled? maybe you have a scissor rectangle?