diff options
author | bunnei <bunneidev@gmail.com> | 2019-06-06 00:07:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-06 00:07:23 +0200 |
commit | 55c50291711f320c64c852fb82706a66e161452e (patch) | |
tree | 77aa7363d17892fa4e304aba5b6a0a314d2cb1a0 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #2419 from DarkLordZach/srv-lr-iface (diff) | |
parent | gl_shader_decompiler: Remove guest "position" varying (diff) | |
download | yuzu-55c50291711f320c64c852fb82706a66e161452e.tar yuzu-55c50291711f320c64c852fb82706a66e161452e.tar.gz yuzu-55c50291711f320c64c852fb82706a66e161452e.tar.bz2 yuzu-55c50291711f320c64c852fb82706a66e161452e.tar.lz yuzu-55c50291711f320c64c852fb82706a66e161452e.tar.xz yuzu-55c50291711f320c64c852fb82706a66e161452e.tar.zst yuzu-55c50291711f320c64c852fb82706a66e161452e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index d2bb705a9..c845b29aa 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -23,8 +23,6 @@ ProgramResult GenerateVertexShader(const Device& device, const ShaderSetup& setu out += GetCommonDeclarations(); out += R"( -layout (location = 0) out vec4 position; - layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config { vec4 viewport_flip; uvec4 config_pack; // instance_id, flip_stage, y_direction, padding @@ -48,7 +46,6 @@ layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config { out += R"( void main() { - position = vec4(0.0, 0.0, 0.0, 0.0); execute_vertex(); )"; @@ -59,19 +56,12 @@ void main() { out += R"( // Set Position Y direction - position.y *= utof(config_pack[2]); + 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 - position.xy *= viewport_flip.xy; - } - gl_Position = position; - - // TODO(bunnei): This is likely a hack, position.w should be interpolated as 1.0 - // For now, this is here to bring order in lieu of proper emulation - if (config_pack[1] == 1) { - position.w = 1.0; + gl_Position.xy *= viewport_flip.xy; } })"; @@ -85,9 +75,6 @@ ProgramResult GenerateGeometryShader(const Device& device, const ShaderSetup& se out += GetCommonDeclarations(); out += R"( -layout (location = 0) in vec4 gs_position[]; -layout (location = 0) out vec4 position; - layout (std140, binding = EMULATION_UBO_BINDING) uniform gs_config { vec4 viewport_flip; uvec4 config_pack; // instance_id, flip_stage, y_direction, padding @@ -124,8 +111,6 @@ layout (location = 5) out vec4 FragColor5; layout (location = 6) out vec4 FragColor6; layout (location = 7) out vec4 FragColor7; -layout (location = 0) in noperspective vec4 position; - layout (std140, binding = EMULATION_UBO_BINDING) uniform fs_config { vec4 viewport_flip; uvec4 config_pack; // instance_id, flip_stage, y_direction, padding |