From 79a1e480ca75046ef932f26a4c72022422bcd485 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 30 Jul 2021 12:14:54 -0700 Subject: Enable anisotropic filtering when the game requests it --- Source/Core/VideoCommon/RenderState.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/RenderState.cpp') diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 89f36f2b18..d9551b4da9 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -309,10 +309,15 @@ void SamplerState::Generate(const BPMemory& bp, u32 index) }; tm0.wrap_u = filter_invalid_wrap(bp_tm0.wrap_s); tm0.wrap_v = filter_invalid_wrap(bp_tm0.wrap_t); + if (bp_tm0.max_aniso == MaxAniso::Two) + tm0.anisotropic_filtering = 1; + else if (bp_tm0.max_aniso == MaxAniso::Four) + tm0.anisotropic_filtering = 2; + else + tm0.anisotropic_filtering = 0; tm0.diag_lod = bp_tm0.diag_lod; - tm0.anisotropic_filtering = false; // TODO: Respect BP anisotropic filtering mode - tm0.lod_clamp = bp_tm0.lod_clamp; // TODO: What does this do? + tm0.lod_clamp = bp_tm0.lod_clamp; // TODO: What does this do? } namespace RenderState -- cgit v1.2.3