only use shader if upscaling is enabled
This commit is contained in:
parent
6d44a0b122
commit
666a3ad0e3
1 changed files with 15 additions and 1 deletions
|
@ -150,7 +150,21 @@ static void ogl_build_programs()
|
||||||
_snprintf(shader_path, sizeof(shader_path) - 1, "%s%s", g_config.game_path, g_ddraw->shader);
|
_snprintf(shader_path, sizeof(shader_path) - 1, "%s%s", g_config.game_path, g_ddraw->shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_ogl.scale_program = oglu_build_program_from_file(shader_path, wglCreateContextAttribsARB != NULL);
|
BOOL is_upscaler =
|
||||||
|
strstr(g_ddraw->shader, "fsr.glsl") != NULL ||
|
||||||
|
strstr(g_ddraw->shader, "catmull-rom-bilinear.glsl") != NULL ||
|
||||||
|
strstr(g_ddraw->shader, "lanczos2-sharp.glsl") != NULL ||
|
||||||
|
strstr(g_ddraw->shader, "xbr-lv2-noblend.glsl") != NULL ||
|
||||||
|
strstr(g_ddraw->shader, "xbrz-freescale-multipass.glsl") != NULL ||
|
||||||
|
strstr(g_ddraw->shader, "xbrz-freescale.glsl") != NULL;
|
||||||
|
|
||||||
|
if (!is_upscaler ||
|
||||||
|
g_ddraw->render.viewport.width != g_ddraw->width ||
|
||||||
|
g_ddraw->render.viewport.height != g_ddraw->height ||
|
||||||
|
g_ddraw->vhack)
|
||||||
|
{
|
||||||
|
g_ogl.scale_program = oglu_build_program_from_file(shader_path, wglCreateContextAttribsARB != NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue