summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_gen.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-10-30 04:23:09 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-07 05:52:18 +0100
commitf019817f8f6452dec784d8217ef102231319d26c (patch)
treed49542f0b9b4c26c651d1a3263b3a165c6a8b24b /src/video_core/renderer_opengl/gl_shader_gen.cpp
parentMerge pull request #3078 from bunnei/azure-rename-partial (diff)
downloadyuzu-f019817f8f6452dec784d8217ef102231319d26c.tar
yuzu-f019817f8f6452dec784d8217ef102231319d26c.tar.gz
yuzu-f019817f8f6452dec784d8217ef102231319d26c.tar.bz2
yuzu-f019817f8f6452dec784d8217ef102231319d26c.tar.lz
yuzu-f019817f8f6452dec784d8217ef102231319d26c.tar.xz
yuzu-f019817f8f6452dec784d8217ef102231319d26c.tar.zst
yuzu-f019817f8f6452dec784d8217ef102231319d26c.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index 0e22eede9..af17216bd 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -20,8 +20,7 @@ std::string GenerateVertexShader(const Device& device, const ShaderIR& ir, const
std::string out = GetCommonDeclarations();
out += R"(
layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config {
- vec4 viewport_flip;
- uvec4 config_pack; // instance_id, flip_stage, y_direction, padding
+ float y_direction;
};
)";
@@ -35,23 +34,10 @@ layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config {
void main() {
execute_vertex();
)";
-
if (ir_b) {
out += " execute_vertex_b();";
}
-
- out += R"(
-
- // Set Position Y direction
- gl_Position.y *= utof(config_pack[2]);
- // Check if the flip stage is VertexB
- // Config pack's second value is flip_stage
- if (config_pack[1] == 1) {
- // Viewport can be flipped, which is unsupported by glViewport
- gl_Position.xy *= viewport_flip.xy;
- }
-}
-)";
+ out += "}\n";
return out;
}
@@ -59,8 +45,7 @@ std::string GenerateGeometryShader(const Device& device, const ShaderIR& ir) {
std::string out = GetCommonDeclarations();
out += R"(
layout (std140, binding = EMULATION_UBO_BINDING) uniform gs_config {
- vec4 viewport_flip;
- uvec4 config_pack; // instance_id, flip_stage, y_direction, padding
+ float y_direction;
};
)";
@@ -87,8 +72,7 @@ layout (location = 6) out vec4 FragColor6;
layout (location = 7) out vec4 FragColor7;
layout (std140, binding = EMULATION_UBO_BINDING) uniform fs_config {
- vec4 viewport_flip;
- uvec4 config_pack; // instance_id, flip_stage, y_direction, padding
+ float y_direction;
};
)";