diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-30 06:08:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-30 06:08:32 +0200 |
commit | 4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a (patch) | |
tree | f8a9a0ec07221758b50b952ba58ab0ea28b459a2 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #2100 from wwylele/fix-load-assert (diff) | |
parent | OpenGL: Take cached viewport sub-rect into account for scissor (diff) | |
download | yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar.gz yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar.bz2 yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar.lz yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar.xz yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.tar.zst yuzu-4b14e17b18e20f7f8077f0c7efc0e3a44ca8ca2a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 1808ee0a9..8f278722d 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -645,11 +645,10 @@ vec4 secondary_fragment_color = vec4(0.0); // Negate the condition if we have to keep only the pixels outside the scissor box if (state.scissor_test_mode == Regs::ScissorMode::Include) out += "!"; - // x2,y2 have +1 added to cover the entire pixel area - out += "(gl_FragCoord.x >= scissor_x1 * framebuffer_scale.x && " - "gl_FragCoord.y >= scissor_y1 * framebuffer_scale.y && " - "gl_FragCoord.x < (scissor_x2 + 1) * framebuffer_scale.x && " - "gl_FragCoord.y < (scissor_y2 + 1) * framebuffer_scale.y)) discard;\n"; + out += "(gl_FragCoord.x >= scissor_x1 && " + "gl_FragCoord.y >= scissor_y1 && " + "gl_FragCoord.x < scissor_x2 && " + "gl_FragCoord.y < scissor_y2)) discard;\n"; } out += "float z_over_w = 1.0 - gl_FragCoord.z * 2.0;\n"; |