Add AfterGBufferPass for custom PostFx location

This commit is contained in:
Wojtek Figat
2023-01-31 09:28:19 +01:00
parent 9b3d15aa46
commit 5a30883082
5 changed files with 20 additions and 11 deletions

View File

@@ -268,7 +268,7 @@ void RenderList::RunPostFxPass(GPUContext* context, RenderContext& renderContext
{
if (fx->Location == locationB)
{
if (fx->UseSingleTarget)
if (fx->UseSingleTarget || output == nullptr)
{
fx->Render(context, renderContext, input, nullptr);
}
@@ -301,9 +301,9 @@ void RenderList::RunMaterialPostFxPass(GPUContext* context, RenderContext& rende
bindParams.Input = *input;
material->Bind(bindParams);
context->DrawFullscreenTriangle();
context->ResetRenderTarget();
Swap(output, input);
}
context->ResetRenderTarget();
}
}
@@ -315,7 +315,7 @@ void RenderList::RunCustomPostFxPass(GPUContext* context, RenderContext& renderC
{
if (fx->Location == location)
{
if (fx->UseSingleTarget)
if (fx->UseSingleTarget || output == nullptr)
{
fx->Render(context, renderContext, input, nullptr);
}