From 95ab195207fb59427bec651921173ff7bc685ba4 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 5 May 2024 17:04:14 -0300 Subject: [PATCH] Flip viewport based on screen scissor when Y negate is enabled --- src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs index 7286db52f..45b91c012 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs @@ -777,6 +777,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed float width = scaleX * 2; float height = scaleY * 2; + if (yNegate) + { + y += _state.State.ScreenScissorState.Height - MathF.Abs(height); + } + float scale = _channel.TextureManager.RenderTargetScale; if (scale != 1f) {