|
|
|
|
@ -1281,10 +1281,23 @@ bool PostProcessing::ReShadeFXShader::Apply(GPUTexture* input, GPUFramebuffer* f
|
|
|
|
|
for (const Pass& pass : m_passes)
|
|
|
|
|
{
|
|
|
|
|
GL_SCOPE_FMT("Draw pass {}", pass.name.c_str());
|
|
|
|
|
|
|
|
|
|
GL_INS_FMT("Render Target: ID {} [{}]", pass.render_target, GetTextureNameForID(pass.render_target));
|
|
|
|
|
GPUFramebuffer* output_fb = GetFramebufferByID(pass.render_target, input, final_target);
|
|
|
|
|
|
|
|
|
|
if (!output_fb)
|
|
|
|
|
{
|
|
|
|
|
// Drawing to final buffer.
|
|
|
|
|
if (!g_gpu_device->BeginPresent(false))
|
|
|
|
|
{
|
|
|
|
|
GL_POP();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
g_gpu_device->SetFramebuffer(output_fb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_gpu_device->SetPipeline(pass.pipeline.get());
|
|
|
|
|
|
|
|
|
|
// Set all inputs first, before the render pass starts.
|
|
|
|
|
@ -1306,16 +1319,6 @@ bool PostProcessing::ReShadeFXShader::Apply(GPUTexture* input, GPUFramebuffer* f
|
|
|
|
|
g_gpu_device->SetTextureSampler(i, nullptr, nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!output_fb)
|
|
|
|
|
{
|
|
|
|
|
// Drawing to final buffer.
|
|
|
|
|
if (!g_gpu_device->BeginPresent(false))
|
|
|
|
|
{
|
|
|
|
|
GL_POP();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_gpu_device->Draw(pass.num_vertices, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|