From e2728aa11fb791e11c7ef2fee87f9223dbda21be Mon Sep 17 00:00:00 2001 From: topnik-code <67379672+topnik-code@users.noreply.github.com> Date: Sat, 24 Oct 2020 20:22:20 +0200 Subject: [PATCH] Fix: FadeTransition glitch The FadeTransition had visual glitches when combined with a BoxingViewportAdapter. This happened because the viewport's offset was applied twice. --- .../MonoGame.Extended/Screens/Transitions/FadeTransition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/MonoGame.Extended/Screens/Transitions/FadeTransition.cs b/Source/MonoGame.Extended/Screens/Transitions/FadeTransition.cs index 7e23def4..49fab4a8 100644 --- a/Source/MonoGame.Extended/Screens/Transitions/FadeTransition.cs +++ b/Source/MonoGame.Extended/Screens/Transitions/FadeTransition.cs @@ -27,8 +27,8 @@ namespace MonoGame.Extended.Screens.Transitions public override void Draw(GameTime gameTime) { _spriteBatch.Begin(samplerState: SamplerState.PointClamp); - _spriteBatch.FillRectangle(_graphicsDevice.Viewport.Bounds, Color * Value); + _spriteBatch.FillRectangle(0, 0, _graphicsDevice.Viewport.Width, _graphicsDevice.Viewport.Height, Color * Value); _spriteBatch.End(); } } -} \ No newline at end of file +}