diff options
| author | 2021-10-30 01:52:11 +0200 | |
|---|---|---|
| committer | 2021-11-16 22:11:33 +0100 | |
| commit | 5230378709470da56927e85c50d0524f9ce3f81b (patch) | |
| tree | 6f17ba41ea5a1f60ecea9fff4bf2b25b441c0392 /src/video_core/textures | |
| parent | Texture Cache: revert Image changes. (diff) | |
| download | yuzu-5230378709470da56927e85c50d0524f9ce3f81b.tar.gz yuzu-5230378709470da56927e85c50d0524f9ce3f81b.tar.xz yuzu-5230378709470da56927e85c50d0524f9ce3f81b.zip | |
TextureCache: Make a better Anisotropic setter.
Diffstat (limited to 'src/video_core/textures')
| -rw-r--r-- | src/video_core/textures/texture.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index a552543ed..b2d5bb03e 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #include <array> | 6 | #include <array> |
| 7 | 7 | ||
| 8 | #include "common/cityhash.h" | 8 | #include "common/cityhash.h" |
| 9 | #include "common/settings.h" | ||
| 10 | #include "video_core/textures/texture.h" | 9 | #include "video_core/textures/texture.h" |
| 11 | 10 | ||
| 12 | using Tegra::Texture::TICEntry; | 11 | using Tegra::Texture::TICEntry; |
| @@ -51,22 +50,6 @@ constexpr std::array<float, 256> SRGB_CONVERSION_LUT = { | |||
| 51 | 0.917104f, 0.929242f, 0.941493f, 0.953859f, 0.966338f, 1.000000f, 1.000000f, 1.000000f, | 50 | 0.917104f, 0.929242f, 0.941493f, 0.953859f, 0.966338f, 1.000000f, 1.000000f, 1.000000f, |
| 52 | }; | 51 | }; |
| 53 | 52 | ||
| 54 | unsigned SettingsMinimumAnisotropy() noexcept { | ||
| 55 | switch (static_cast<Anisotropy>(Settings::values.max_anisotropy.GetValue())) { | ||
| 56 | default: | ||
| 57 | case Anisotropy::Default: | ||
| 58 | return 1U; | ||
| 59 | case Anisotropy::Filter2x: | ||
| 60 | return 2U; | ||
| 61 | case Anisotropy::Filter4x: | ||
| 62 | return 4U; | ||
| 63 | case Anisotropy::Filter8x: | ||
| 64 | return 8U; | ||
| 65 | case Anisotropy::Filter16x: | ||
| 66 | return 16U; | ||
| 67 | } | ||
| 68 | } | ||
| 69 | |||
| 70 | } // Anonymous namespace | 53 | } // Anonymous namespace |
| 71 | 54 | ||
| 72 | std::array<float, 4> TSCEntry::BorderColor() const noexcept { | 55 | std::array<float, 4> TSCEntry::BorderColor() const noexcept { |
| @@ -78,7 +61,7 @@ std::array<float, 4> TSCEntry::BorderColor() const noexcept { | |||
| 78 | } | 61 | } |
| 79 | 62 | ||
| 80 | float TSCEntry::MaxAnisotropy() const noexcept { | 63 | float TSCEntry::MaxAnisotropy() const noexcept { |
| 81 | return static_cast<float>(std::max(1U << max_anisotropy, SettingsMinimumAnisotropy())); | 64 | return static_cast<float>(1U << max_anisotropy); |
| 82 | } | 65 | } |
| 83 | 66 | ||
| 84 | } // namespace Tegra::Texture | 67 | } // namespace Tegra::Texture |