Hi all,
Given the current context below, my playerTarget rt will not draw to screen, however my background rt will draw just fine.
how can i rectify this/have more than 1 rendertarget active?
If i wanted to add all and any sprites with a render target, how can i achieve that?
Is this the wrong mindset, if so what is the correct way to upscale 32x32 textures in monogame?
My overall goal is to have all textures scaled to at least 2F and be able to dictate scale size across the board for any and all textures I want to bring into game
Any help would be appreciated
Here’s the code:
GraphicsDevice.SetRenderTarget(renderTarget);
GraphicsDevice.Clear(Color.CornflowerBlue);
_spriteBatch.Begin(this.camera, SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone);
_spriteBatch.Draw(background, new Vector2(-500, -500), Color.White);
_spriteBatch.End();
GraphicsDevice.SetRenderTarget(null);
_spriteBatch.Begin(samplerState: SamplerState.PointClamp);
_spriteBatch.Draw(renderTarget, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, scale: 3.5f, SpriteEffects.None, 0f);
_spriteBatch.End();
GraphicsDevice.SetRenderTarget(playerTarget);
_spriteBatch.Begin(this.camera, SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone);
_spriteBatch.Draw(playerSprite, player.position, Color.White);
_spriteBatch.End();
_spriteBatch.Begin(samplerState: SamplerState.PointClamp);
_spriteBatch.Draw(playerTarget, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, scale: 2f, SpriteEffects.None, 0f);
_spriteBatch.End();
GraphicsDevice.SetRenderTarget(null);
base.Draw(gameTime);