From 5b61d82d47e1fa2276d85a9bc1cd38756eede1c6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 16 May 2020 09:05:53 -0700 Subject: [PATCH] GPU: Force nearest only for the upscaling filter. So, if we upscale and then apply an effect, we won't use nearest on that effect. --- GPU/Common/PresentationCommon.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index fcd6969e82..8782b5fdff 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -593,7 +593,7 @@ void PresentationCommon::CopyToOutput(OutputFlags flags, int uvRotation, float u draw_->BindPipeline(postShaderPipeline); draw_->UpdateDynamicUniformBuffer(&uniforms, sizeof(uniforms)); - Draw::SamplerState *sampler = useNearest ? samplerNearest_ : samplerLinear_; + Draw::SamplerState *sampler = useNearest || shaderInfo->isUpscalingFilter ? samplerNearest_ : samplerLinear_; draw_->BindSamplerStates(0, 1, &sampler); draw_->BindVertexBuffers(0, 1, &vdata_, &postVertsOffset); @@ -604,9 +604,10 @@ void PresentationCommon::CopyToOutput(OutputFlags flags, int uvRotation, float u usePostShaderOutput = true; lastWidth = nextWidth; lastHeight = nextHeight; - if (shaderInfo->isUpscalingFilter) - useNearest = true; } + + if (isFinalAtOutputResolution && postShaderInfo_.back().isUpscalingFilter) + useNearest = true; } else { draw_->UpdateBuffer(vdata_, (const uint8_t *)verts, 0, postVertsOffset, Draw::UPDATE_DISCARD); }