summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-06-28 15:52:27 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2025-06-28 15:52:27 -0500
commit60156f4f94f46a4a708a5fd5d37d4789a777b7b9 (patch)
tree17840acb1ea086d274098c54ea33829bd4927391 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent43aa7e9b9658d3c1508512b6b0caef7737ed6683 (diff)
VideoCommon: Fix "Force Nearest" texture filter setting.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index f58460e9ad..ad8583ae46 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1030,6 +1030,11 @@ SamplerState TextureCacheBase::GetSamplerState(u32 index, float custom_tex_scale
if (g_ActiveConfig.iMaxAnisotropy != AnisotropicFilteringMode::Default &&
IsAnisostropicEnhancementSafe(tm0))
{
+ state.tm0.anisotropic_filtering = Common::ToUnderlying(g_ActiveConfig.iMaxAnisotropy);
+ }
+
+ if (state.tm0.anisotropic_filtering != 0)
+ {
// https://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt
// For predictable results on all hardware/drivers, only use one of:
// GL_LINEAR + GL_LINEAR (No Mipmaps [Bilinear])
@@ -1041,7 +1046,6 @@ SamplerState TextureCacheBase::GetSamplerState(u32 index, float custom_tex_scale
state.tm0.mag_filter = FilterMode::Linear;
if (tm0.mipmap_filter != MipMode::None)
state.tm0.mipmap_filter = FilterMode::Linear;
- state.tm0.anisotropic_filtering = Common::ToUnderlying(g_ActiveConfig.iMaxAnisotropy);
}
if (has_arbitrary_mips && tm0.mipmap_filter != MipMode::None)