summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2016-09-07 11:17:32 +1200
committerScott Mansell <phiren@gmail.com>2016-09-07 11:17:32 +1200
commitf5c70a4b2706a153580ffe2f7d6b6a4a03c67b99 (patch)
tree0c1d0b4298da709fecf18e8394d2bb370f049dca /Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
parent18030ebfb40eb4190663a501be93767453ca0950 (diff)
EFB2RAM: Downsample higher resolutions with linear filtering.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp7
1 files changed, 5 insertions, 2 deletions
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, &params, 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();