diff --git a/Ryujinx.Graphics.Shader/Translation/Translator.cs b/Ryujinx.Graphics.Shader/Translation/Translator.cs index e594c818a..5119dfb64 100644 --- a/Ryujinx.Graphics.Shader/Translation/Translator.cs +++ b/Ryujinx.Graphics.Shader/Translation/Translator.cs @@ -218,10 +218,17 @@ namespace Ryujinx.Graphics.Shader.Translation while (usedAttributes != UInt128.Zero) { int index = usedAttributes.TrailingZeroCount(); - - InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: false); + int vecIndex = index / 4; usedAttributes &= ~UInt128.Pow2(index); + + // We don't need to initialize passthrough attributes. + if ((context.Config.PassthroughAttributes & (1 << vecIndex)) != 0) + { + continue; + } + + InitializeOutputComponent(context, AttributeConsts.UserAttributeBase + index * 4, perPatch: false); } UInt128 usedAttributesPerPatch = context.Config.NextInputAttributesPerPatchComponents;