summaryrefslogtreecommitdiff
path: root/src/video_core/textures
diff options
context:
space:
mode:
authorGravatar Morph2020-02-23 19:01:17 -0500
committerGravatar Morph2020-02-27 21:34:00 -0500
commit7ee606517875f0d12d4c75c5c807f4b6a8ffcf58 (patch)
treee0c23b4c540868b9c44b383dd5ea963fd3a748f3 /src/video_core/textures
parentMerge pull request #3430 from bunnei/split-presenter (diff)
downloadyuzu-7ee606517875f0d12d4c75c5c807f4b6a8ffcf58.tar.gz
yuzu-7ee606517875f0d12d4c75c5c807f4b6a8ffcf58.tar.xz
yuzu-7ee606517875f0d12d4c75c5c807f4b6a8ffcf58.zip
Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels.
Diffstat (limited to 'src/video_core/textures')
-rw-r--r--src/video_core/textures/texture.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index 8e82c6748..07098c70d 100644
--- a/src/video_core/textures/texture.h
+++ b/src/video_core/textures/texture.h
@@ -8,6 +8,7 @@
8#include "common/assert.h" 8#include "common/assert.h"
9#include "common/bit_field.h" 9#include "common/bit_field.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11#include "core/settings.h"
11 12
12namespace Tegra::Texture { 13namespace Tegra::Texture {
13 14
@@ -294,6 +295,14 @@ enum class TextureMipmapFilter : u32 {
294 Linear = 3, 295 Linear = 3,
295}; 296};
296 297
298enum class Anisotropy {
299 Default,
300 Filter2x,
301 Filter4x,
302 Filter8x,
303 Filter16x,
304};
305
297struct TSCEntry { 306struct TSCEntry {
298 union { 307 union {
299 struct { 308 struct {
@@ -328,7 +337,20 @@ struct TSCEntry {
328 }; 337 };
329 338
330 float GetMaxAnisotropy() const { 339 float GetMaxAnisotropy() const {
331 return static_cast<float>(1U << max_anisotropy); 340 switch (static_cast<Anisotropy>(Settings::values.max_anisotropy)) {
341 case Anisotropy::Default:
342 return static_cast<float>(1U << max_anisotropy);
343 case Anisotropy::Filter2x:
344 return static_cast<float>(2U << max_anisotropy);
345 case Anisotropy::Filter4x:
346 return static_cast<float>(4U << max_anisotropy);
347 case Anisotropy::Filter8x:
348 return static_cast<float>(8U << max_anisotropy);
349 case Anisotropy::Filter16x:
350 return static_cast<float>(16U << max_anisotropy);
351 default:
352 return static_cast<float>(1U << max_anisotropy);
353 }
332 } 354 }
333 355
334 float GetMinLod() const { 356 float GetMinLod() const {