diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-16 09:25:28 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-30 05:55:24 +0200 |
commit | 01667d9a35dcab22df7144427b9be0019c2e9a81 (patch) | |
tree | f8a9a0ec07221758b50b952ba58ab0ea28b459a2 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #2100 from wwylele/fix-load-assert (diff) | |
download | yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar.gz yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar.bz2 yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar.lz yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar.xz yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.tar.zst yuzu-01667d9a35dcab22df7144427b9be0019c2e9a81.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 | 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"; |