2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

video_core: fix off by one in anisotropic filtering amount

This commit is contained in:
Liam 2022-12-10 20:54:45 -05:00
parent a5bc86a9ac
commit 456322dde6

View file

@ -64,10 +64,11 @@ float TSCEntry::MaxAnisotropy() const noexcept {
return 1.0f; return 1.0f;
} }
const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue(); const auto anisotropic_settings = Settings::values.max_anisotropy.GetValue();
u32 added_anisotropic{}; s32 added_anisotropic{};
if (anisotropic_settings == 0) { if (anisotropic_settings == 0) {
added_anisotropic = Settings::values.resolution_info.up_scale >> added_anisotropic = Settings::values.resolution_info.up_scale >>
Settings::values.resolution_info.down_shift; Settings::values.resolution_info.down_shift;
added_anisotropic = std::max(added_anisotropic - 1, 0);
} else { } else {
added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U; added_anisotropic = Settings::values.max_anisotropy.GetValue() - 1U;
} }