summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJonathan Hamilton <jtrhamilton@gmail.com>2018-05-16 17:45:10 -0700
committerJonathan Hamilton <jtrhamilton@gmail.com>2018-05-16 17:49:19 -0700
commit8be5cdfcad046f084441e71ee8204dfb40a18d2d (patch)
treee91129dcb983830ab8610a0522c5ee13f9f44314 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent29b7e33c1466a07db07e796ce9492ee384d4da2c (diff)
Make the arbitrary mipmap detection threshold configureable
This is likely a "superuser" option at best, but I want to be able to play with it without rebuilding if I want to tweak the heuristics
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 00d65c953d..370bdd836b 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -507,7 +507,7 @@ public:
// expect a normal blurred mipmap to look like and what we actually received
// 4.5% was chosen because it's just below the lowest clearly-arbitrary texture
// I found in my tests, the background clouds in Mario Galaxy's Observatory lobby.
- constexpr auto THRESHOLD_PERCENT = 4.5f;
+ const auto threshold = g_ActiveConfig.fArbitraryMipmapDetectionThreshold;
auto* src = downsample_buffer;
auto* dst = downsample_buffer + levels[1].shape.row_length * levels[1].shape.height * 4;
@@ -533,7 +533,7 @@ public:
}
auto all_levels = total_diff / (levels.size() - 1);
- return all_levels > THRESHOLD_PERCENT;
+ return all_levels > threshold;
}
private: