Add support for rendering percentage scale with upscaling to backbuffer

This commit is contained in:
Wojtek Figat
2021-07-20 11:06:25 +02:00
parent 5cbf091a7a
commit 929bd2a8c8
11 changed files with 129 additions and 54 deletions

View File

@@ -326,12 +326,12 @@ void RenderList::RunCustomPostFxPass(GPUContext* context, RenderContext& renderC
}
}
bool RenderList::HasAnyPostAA(RenderContext& renderContext) const
bool RenderList::HasAnyPostFx(RenderContext& renderContext, PostProcessEffectLocation postProcess, MaterialPostFxLocation materialPostFx) const
{
for (int32 i = 0; i < Settings.PostFxMaterials.Materials.Count(); i++)
{
auto material = Settings.PostFxMaterials.Materials[i].Get();
if (material && material->IsReady() && material->IsPostFx() && material->GetInfo().PostFxLocation == MaterialPostFxLocation::AfterAntiAliasingPass)
if (material && material->IsReady() && material->IsPostFx() && material->GetInfo().PostFxLocation == materialPostFx)
{
return true;
}
@@ -341,7 +341,7 @@ bool RenderList::HasAnyPostAA(RenderContext& renderContext) const
for (int32 i = 0; i < renderContext.List->PostFx.Count(); i++)
{
auto fx = renderContext.List->PostFx[i];
if (fx->IsReady() && fx->GetLocation() == PostProcessEffectLocation::AfterAntiAliasingPass)
if (fx->IsReady() && fx->GetLocation() == postProcess)
{
return true;
}