From d2a8c5fac5803ab3612dac0cdc89f93a3c676b70 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 18 Jan 2020 18:54:50 -0300 Subject: [PATCH] Fix shader output color buffer index when non-sequential render targets are used --- Ryujinx.Graphics.Shader/Translation/EmitterContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs index fbe197651e..7111196b79 100644 --- a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs +++ b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs @@ -82,7 +82,7 @@ namespace Ryujinx.Graphics.Shader.Translation { if (target.ComponentEnabled(component)) { - Operand dest = Attribute(AttributeConsts.FragmentOutputColorBase + regIndex * 4); + Operand dest = Attribute(AttributeConsts.FragmentOutputColorBase + attachment * 16 + component * 4); Operand src = Register(regIndex, RegisterType.Gpr);