(00783cc63) Don't premultiply submarine preview image alpha, fixed background texture not covering the whole preview image when using an image resolution larger than the size of the texture

This commit is contained in:
Joonas Rikkonen
2019-04-06 17:50:13 +03:00
parent 4359de7b7e
commit 8d8478432f
4 changed files with 164 additions and 15 deletions
@@ -2230,11 +2230,13 @@ namespace Barotrauma
using (SpriteBatch spriteBatch = new SpriteBatch(GameMain.Instance.GraphicsDevice))
{
GameMain.Instance.GraphicsDevice.SetRenderTarget(rt);
GameMain.Instance.GraphicsDevice.Clear(Color.Black);
if (backgroundSprite != null)
{
spriteBatch.Begin();
backgroundSprite.Draw(spriteBatch, Vector2.Zero, new Color(0.025f, 0.075f, 0.131f, 1.0f));
backgroundSprite.DrawTiled(spriteBatch, Vector2.Zero, new Vector2(width, height), color: new Color(0.025f, 0.075f, 0.131f, 1.0f));
spriteBatch.End();
}
@@ -2260,5 +2262,7 @@ namespace Barotrauma
CreateImage(width, height, stream);
stream.Dispose();
}
}
}