[GPU] Fix frame buffer being upside down in some cases

This commit is contained in:
gdkchan 2018-04-14 00:39:24 -03:00
parent 47100ec8c1
commit 42ebfdff7f
9 changed files with 96 additions and 5 deletions

View file

@ -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;");
}
}