aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-04-14 00:39:24 -0300
committergdkchan <gab.dark.100@gmail.com>2018-04-14 00:39:24 -0300
commit42ebfdff7f2889be38a3415bf33aeb41df90bd98 (patch)
tree556639adf9f0ef20e0fc64f9293ccc8c6e11b5e3 /Ryujinx.Graphics/Gal/Shader
parent47100ec8c1b3cabc7d53654163c1dd30b58d483d (diff)
[GPU] Fix frame buffer being upside down in some cases
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader')
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
index 7d97ec33..457192dc 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
@@ -115,6 +115,11 @@ namespace Ryujinx.Graphics.Gal.Shader
private void PrintDeclUniforms()
{
+ if (Decl.ShaderType == GalShaderType.Vertex)
+ {
+ SB.AppendLine("uniform vec2 " + GalConsts.FlipUniformName + ";");
+ }
+
foreach (ShaderDeclInfo DeclInfo in Decl.Uniforms.Values.OrderBy(DeclKeySelector))
{
SB.AppendLine($"uniform {GetDecl(DeclInfo)};");
@@ -270,6 +275,8 @@ namespace Ryujinx.Graphics.Gal.Shader
//the shader ends here.
if (Decl.ShaderType == GalShaderType.Vertex)
{
+ SB.AppendLine(Identation + "gl_Position.xy *= flip;");
+
SB.AppendLine(Identation + GlslDecl.PositionOutAttrName + " = gl_Position;");
}
}