From c4165a235c61212c57c38f5831f49495db6a7de3 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Tue, 3 Nov 2015 21:30:48 -0600 Subject: [PATCH 1/2] Fix rectangle list fragment shader for right-aligned vertices. --- src/xenia/gpu/gl4/command_processor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenia/gpu/gl4/command_processor.cc b/src/xenia/gpu/gl4/command_processor.cc index 7bc8b752d..60359f92c 100644 --- a/src/xenia/gpu/gl4/command_processor.cc +++ b/src/xenia/gpu/gl4/command_processor.cc @@ -335,7 +335,7 @@ bool CommandProcessor::SetupGL() { " }\n" " EmitVertex();\n" " EndPrimitive();\n" - " } else {\n" + " } else if (gl_in[0].gl_Position.y == gl_in[1].gl_Position.y) {\n" // 0 ------ 1 // | - | // | \\ | @@ -362,11 +362,11 @@ bool CommandProcessor::SetupGL() { " gl_PointSize = gl_in[2].gl_PointSize;\n" " out_vtx = in_vtx[2];\n" " EmitVertex();\n" - " gl_Position = gl_in[0].gl_Position + (gl_in[2].gl_Position - \n" - " gl_in[1].gl_Position);\n" + " gl_Position = (gl_in[0].gl_Position + gl_in[2].gl_Position) - \n" + " gl_in[1].gl_Position;\n" " gl_PointSize = gl_in[2].gl_PointSize;\n" " for (int i = 0; i < 16; ++i) {\n" - " out_vtx.o[i] = -in_vtx[0].o[i] + in_vtx[1].o[i] + \n" + " out_vtx.o[i] = in_vtx[0].o[i] + -in_vtx[1].o[i] + \n" " in_vtx[2].o[i];\n" " }\n" " EmitVertex();\n" From 9baeef02e0edc98721526892da1b2765045c8dc9 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 4 Nov 2015 05:51:34 -0600 Subject: [PATCH 2/2] Allow rect lists to fall through if they don't match the expected format --- src/xenia/gpu/gl4/command_processor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/gpu/gl4/command_processor.cc b/src/xenia/gpu/gl4/command_processor.cc index 60359f92c..fe7deff34 100644 --- a/src/xenia/gpu/gl4/command_processor.cc +++ b/src/xenia/gpu/gl4/command_processor.cc @@ -335,7 +335,7 @@ bool CommandProcessor::SetupGL() { " }\n" " EmitVertex();\n" " EndPrimitive();\n" - " } else if (gl_in[0].gl_Position.y == gl_in[1].gl_Position.y) {\n" + " } else {\n" // 0 ------ 1 // | - | // | \\ |