aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
index fb58f84a..b1291906 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
@@ -365,11 +365,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
foreach (int attr in info.IAttributes.OrderBy(x => x))
{
- string iq = info.InterpolationQualifiers[attr].ToGlslQualifier();
+ string iq = string.Empty;
- if (iq != string.Empty)
+ if (context.Config.Stage == ShaderStage.Fragment)
{
- iq += " ";
+ iq = context.Config.ImapTypes[attr].GetFirstUsedType() switch
+ {
+ PixelImap.Constant => "flat ",
+ PixelImap.ScreenLinear => "noperspective ",
+ _ => string.Empty
+ };
}
context.AppendLine($"layout (location = {attr}) {iq}in vec4 {DefaultNames.IAttributePrefix}{attr}{suffix};");