From d9336ce6ce4c043a20862e567711c7b0bc1e11b6 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 24 Aug 2026 00:06:11 +0200 Subject: [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 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4295 Reviewed-by: Maufeat Reviewed-by: CamilleLaVey --- src/video_core/textures/texture.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/video_core/textures/texture.cpp') 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(resolution_scale - 1U); + } break; - case Settings::AnisotropyMode::None: - return 1.0f; //No use of anisotropy + } } return float(1U << (max_anisotropy + added_anisotropic)); } -- cgit v1.2.3