Hello everybody! I’m having a strange issue where my RenderTarget2D is completely black in the background, despite the code that should say otherwise (I’m using DirectX not OpenGL btw):
public SpriteRenderer(GraphicsDevice graphicsDevice) : base (graphicsDevice)
{
for (int i = 0; i < 3; i++)
{
layers[i] = new RenderTarget2D(graphicsDevice, graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height);
}
}
SpiteRenderer is just an extension of SpriteBatch I’m using for convenience sake.
I have an additional question about render targets:
If I wanted my game to have a virtual resolution of say 480x270, for a pixelated look, but run in 1080p, would I have to run Vector2s and Rectangles through some sort of transform method, if I’m using them for logic rather than drawing, or is there an easier way to do that?