diff options
| author | Mai <mai.iam2048@gmail.com> | 2022-12-12 03:34:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-12 03:34:09 +0000 |
| commit | 7fac14c0ca90154fb1789fbd8aefa387459c262e (patch) | |
| tree | 7f2519d9253b8715cca6734387c47eeef24ad8ae /src/video_core/textures/texture.cpp | |
| parent | d5c14324095f6ed9119f52ec31aa7b23b163453f (diff) | |
| parent | c5a82ada2b9398030278bb6d45a75abda17b33a1 (diff) | |
Merge pull request #9420 from liamwhite/aniso
video_core: fix off by one in anisotropic filtering amount
Diffstat (limited to 'src/video_core/textures/texture.cpp')
| -rw-r--r-- | src/video_core/textures/texture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index b8327c88a9..26649aebf0 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp @@ -64,10 +64,11 @@ float TSCEntry::MaxAnisotropy() const noexcept { return 1.0f; } const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue(); - u32 added_anisotropic{}; + s32 added_anisotropic{}; if (anisotropic_settings == 0) { added_anisotropic = Settings::values.resolution_info.up_scale >> Settings::values.resolution_info.down_shift; + added_anisotropic = std::max(added_anisotropic - 1, 0); } else { added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U; } |
