Fix second pass D3D9.

This commit is contained in:
Themaister 2012-10-31 16:07:38 +01:00
parent 0fe3ab8f2d
commit f3831a5558

View File

@ -540,25 +540,23 @@ void D3DVideo::init_chain_singlepass(const video_info_t &video_info)
if ((shader_type == RARCH_SHADER_CG || shader_type == RARCH_SHADER_AUTO) && *g_settings.video.cg_shader_path)
cg_shader = info.shader_path = g_settings.video.cg_shader_path;
bool second_pass = !cg_shader.empty() && *g_settings.video.second_pass_shader;
bool second_pass = g_settings.video.render_to_texture;
if (g_settings.video.render_to_texture)
if (second_pass)
{
info.scale_x = g_settings.video.fbo.scale_x;
info.scale_y = g_settings.video.fbo.scale_y;
info.filter_linear = video_info.smooth;
info.tex_w = info.tex_h = RARCH_SCALE_BASE * video_info.input_scale;
info.scale_type_x = info.scale_type_y = LinkInfo::Relative;
info.scale_x = g_settings.video.fbo.scale_x;
info.scale_y = g_settings.video.fbo.scale_y;
info.filter_linear = video_info.smooth;
info.tex_w = next_pow2(RARCH_SCALE_BASE * video_info.input_scale);
info.tex_h = next_pow2(RARCH_SCALE_BASE * video_info.input_scale);
info.scale_type_x = info.scale_type_y = LinkInfo::Relative;
if (second_pass)
{
info_second.scale_x = info_second.scale_y = 1.0f;
info_second.scale_type_x = info_second.scale_type_y = LinkInfo::Viewport;
info_second.filter_linear = g_settings.video.second_pass_smooth;
info_second.tex_w = next_pow2(screen_width);
info_second.tex_h = next_pow2(screen_height);
info_second.shader_path = g_settings.video.second_pass_shader;
}
info_second.scale_x = info_second.scale_y = 1.0f;
info_second.scale_type_x = info_second.scale_type_y = LinkInfo::Viewport;
info_second.filter_linear = g_settings.video.second_pass_smooth;
info_second.tex_w = next_pow2(info.tex_w * info.scale_x);
info_second.tex_h = next_pow2(info.tex_h * info.scale_y);
info_second.shader_path = g_settings.video.second_pass_shader;
}
else
{