diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-08-24 00:06:11 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-08-24 00:06:11 +0200 |
| commit | d9336ce6ce4c043a20862e567711c7b0bc1e11b6 (patch) | |
| tree | 529b742f4dd60d0b6e334a66ce52a609d6ee20f9 /src/video_core/textures/texture.cpp | |
| parent | 4eb8dd1458fbd8a421f508f9df4794994665ea81 (diff) | |
[common, settings] Fixes misaligned Aniso levels (#4295)
PR/Commit Owner: CamilleLaVey
Just quick fixes to ANISO bugged level selector, removes x32 and x64 from choices, also fixes the none value to actully use default.
Co-authored-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4295
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src/video_core/textures/texture.cpp')
| -rw-r--r-- | src/video_core/textures/texture.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index d32872e35d..db8a4e69af 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project @@ -80,16 +80,16 @@ float TSCEntry::MaxAnisotropy() const noexcept { case Settings::AnisotropyMode::X4: case Settings::AnisotropyMode::X8: case Settings::AnisotropyMode::X16: - case Settings::AnisotropyMode::X32: - case Settings::AnisotropyMode::X64: - added_anisotropic = u32(anisotropic_settings) - 1U; + added_anisotropic = s32(anisotropic_settings) - 1; break; - case Settings::AnisotropyMode::Automatic: - added_anisotropic = Settings::values.resolution_info.up_scale >> Settings::values.resolution_info.down_shift; - added_anisotropic = (std::max)(added_anisotropic - 1U, 0U); + case Settings::AnisotropyMode::Automatic: { + const u32 resolution_scale = Settings::values.resolution_info.up_scale >> + Settings::values.resolution_info.down_shift; + if (resolution_scale > 1U) { + added_anisotropic = static_cast<s32>(resolution_scale - 1U); + } break; - case Settings::AnisotropyMode::None: - return 1.0f; //No use of anisotropy + } } return float(1U << (max_anisotropy + added_anisotropic)); } |
