From 3e0d81f04dc0550e5a72def465232e2b4c5191cf Mon Sep 17 00:00:00 2001 From: tfarley Date: Fri, 15 May 2015 18:00:05 -0700 Subject: [PATCH] Alpha test cmp logic fix (shovel knight) --- src/video_core/renderer_opengl/gl_shaders.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shaders.h b/src/video_core/renderer_opengl/gl_shaders.h index e58c8fdc2..72bafc2a9 100644 --- a/src/video_core/renderer_opengl/gl_shaders.h +++ b/src/video_core/renderer_opengl/gl_shaders.h @@ -330,19 +330,19 @@ void main(void) { discard; } } else if (alphatest_func == COMPAREFUNC_LESSTHAN) { - if (g_last_tex_env_out.a > alphatest_ref) { - discard; - } - } else if (alphatest_func == COMPAREFUNC_LESSTHANOREQUAL) { if (g_last_tex_env_out.a >= alphatest_ref) { discard; } + } else if (alphatest_func == COMPAREFUNC_LESSTHANOREQUAL) { + if (g_last_tex_env_out.a > alphatest_ref) { + discard; + } } else if (alphatest_func == COMPAREFUNC_GREATERTHAN) { - if (g_last_tex_env_out.a < alphatest_ref) { + if (g_last_tex_env_out.a <= alphatest_ref) { discard; } } else if (alphatest_func == COMPAREFUNC_GREATERTHANOREQUAL) { - if (g_last_tex_env_out.a <= alphatest_ref) { + if (g_last_tex_env_out.a < alphatest_ref) { discard; } }