From f5c70a4b2706a153580ffe2f7d6b6a4a03c67b99 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Wed, 7 Sep 2016 11:17:32 +1200 Subject: EFB2RAM: Downsample higher resolutions with linear filtering. --- Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp') diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp index aaefb10e9c..e3eb0fd7d3 100644 --- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp @@ -126,8 +126,11 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p D3D::context->UpdateSubresource(m_encodeParams, 0, nullptr, ¶ms, 0, 0); D3D::stateman->SetPixelConstants(m_encodeParams); - // Use linear filtering if (bScaleByHalf), use point filtering otherwise - if (scaleByHalf) + // We also linear filtering for both box filtering and downsampling higher resolutions to 1x + // TODO: This only produces perfect downsampling for 1.5x and 2x IR, other resolution will + // need more complex down filtering to average all pixels and produce the correct result. + // Also, box filtering won't be correct for anything other than 1x IR + if (scaleByHalf || g_ActiveConfig.iEFBScale != SCALE_1X) D3D::SetLinearCopySampler(); else D3D::SetPointCopySampler(); -- cgit v1.2.3