diff --git a/gfx/shader_hlsl.c b/gfx/shader_hlsl.c index edde6a01c5..875a41c0ce 100644 --- a/gfx/shader_hlsl.c +++ b/gfx/shader_hlsl.c @@ -264,8 +264,21 @@ static bool load_plain(const char *path) prg[1] = prg[0]; } - prg[2] = prg[0]; - hlsl_shader_num = 1; + if (*g_settings.video.second_pass_shader && g_settings.video.render_to_texture) + { + if (!load_program(2, g_settings.video.second_pass_shader, true)) + { + RARCH_ERR("Failed to load HLSL shader %s into secondpass.\n", path); + prg[2] = prg[0]; + } + + hlsl_shader_num = 2; + } + else + { + prg[2] = prg[0]; + hlsl_shader_num = 1; + } return true; } @@ -354,4 +367,4 @@ void hlsl_deinit(void) return; hlsl_deinit_state(); -} +} \ No newline at end of file