diff --git a/gfx/shader/shader_gl_cg.c b/gfx/shader/shader_gl_cg.c index f8047fadc8..fba41ac68b 100644 --- a/gfx/shader/shader_gl_cg.c +++ b/gfx/shader/shader_gl_cg.c @@ -952,11 +952,11 @@ static unsigned gl_cg_num(void) static bool gl_cg_filter_type(unsigned index, bool *smooth) { - if (cg_active && index) + if (cg_active && index && + (cg_shader->pass[index - 1].filter != RARCH_FILTER_UNSPEC) + ) { - if (cg_shader->pass[index - 1].filter == RARCH_FILTER_UNSPEC) - return false; - *smooth = cg_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR; + *smooth = (cg_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR); return true; } diff --git a/gfx/shader/shader_glsl.c b/gfx/shader/shader_glsl.c index 63b71a0225..80a2ec4e6b 100644 --- a/gfx/shader/shader_glsl.c +++ b/gfx/shader/shader_glsl.c @@ -1190,11 +1190,11 @@ static unsigned gl_glsl_num(void) static bool gl_glsl_filter_type(unsigned index, bool *smooth) { - if (glsl_enable && index) + if (glsl_enable && index + && (glsl_shader->pass[index - 1].filter != RARCH_FILTER_UNSPEC) + ) { - if (glsl_shader->pass[index - 1].filter == RARCH_FILTER_UNSPEC) - return false; - *smooth = glsl_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR; + *smooth = (glsl_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR); return true; } return false;