From 22f4b290b6f0894d29302102f539dd8753961f04 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 18 Jul 2021 18:40:14 +0200 Subject: VideoCore: Initial Setup for the Resolution Scaler. --- src/common/settings.cpp | 1 + src/common/settings.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 9dd5e3efb..8c6be2c84 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -47,6 +47,7 @@ void LogSettings() { log_setting("System_TimeZoneIndex", values.time_zone_index.GetValue()); log_setting("Core_UseMultiCore", values.use_multi_core.GetValue()); log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue()); + log_setting("Renderer_UseResolutionScaling", values.resolution_setup.GetValue()); log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); log_setting("Renderer_UseSpeedLimit", values.use_speed_limit.GetValue()); log_setting("Renderer_SpeedLimit", values.speed_limit.GetValue()); diff --git a/src/common/settings.h b/src/common/settings.h index 9ff4cf85d..08f3da055 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -52,6 +52,22 @@ enum class NvdecEmulation : u32 { GPU = 2, }; +enum class ResolutionSetup : u32 { + Res1_2X = 0, + Res3_4X = 1, + Res1X = 2, + Res3_2K = 3, + Res2X = 4, + Res3X = 5, +}; + +struct ResolutionScalingInfo { + u32 up_scale{2}; + u32 down_shift{0}; + f32 up_factor{2.0f}; + f32 down_factor{0.5f}; +}; + /** The BasicSetting class is a simple resource manager. It defines a label and default value * alongside the actual value of the setting for simpler and less-error prone use with frontend * configurations. Setting a default value and label is required, though subclasses may deviate from @@ -451,6 +467,8 @@ struct Values { "disable_shader_loop_safety_checks"}; Setting vulkan_device{0, "vulkan_device"}; + ResolutionScalingInfo resolution_info{}; + Setting resolution_setup{ResolutionSetup::Res1X, "resolution_setup"}; Setting resolution_factor{1, "resolution_factor"}; // *nix platforms may have issues with the borderless windowed fullscreen mode. // Default to exclusive fullscreen on these platforms for now. -- cgit v1.2.3 From 37ef9c913028e234509bcf70bad049b0210e4592 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 18 Jul 2021 20:33:20 +0200 Subject: Settings: Add resolution scaling to settings. --- src/common/settings.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ src/common/settings.h | 13 +++++++++---- 2 files changed, 60 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 8c6be2c84..dd3a3d456 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -106,6 +106,57 @@ float Volume() { return values.volume.GetValue() / 100.0f; } +void UpdateRescalingInfo() { + auto setup = values.resolution_setup.GetValue(); + auto& info = values.resolution_info; + switch (setup) { + case ResolutionSetup::Res1_2X: { + info.up_scale = 1; + info.down_shift = 1; + break; + } + case ResolutionSetup::Res3_4X: { + info.up_scale = 3; + info.down_shift = 2; + break; + } + case ResolutionSetup::Res1X: { + info.up_scale = 1; + info.down_shift = 0; + break; + } + case ResolutionSetup::Res3_2X: { + info.up_scale = 3; + info.down_shift = 1; + break; + } + case ResolutionSetup::Res2X: { + info.up_scale = 2; + info.down_shift = 0; + break; + } + case ResolutionSetup::Res3X: { + info.up_scale = 3; + info.down_shift = 0; + break; + } + case ResolutionSetup::Res4X: { + info.up_scale = 4; + info.down_shift = 0; + break; + } + default: { + UNREACHABLE(); + info.up_scale = 1; + info.down_shift = 0; + } + } + info.up_factor = static_cast(info.up_scale) / (1U << info.down_shift); + info.down_factor = static_cast(1U << info.down_shift) / info.up_scale; + info.size_up = info.up_scale * info.up_scale; + info.size_shift = info.down_shift * 2; +} + void RestoreGlobalState(bool is_powered_on) { // If a game is running, DO NOT restore the global settings state if (is_powered_on) { diff --git a/src/common/settings.h b/src/common/settings.h index 08f3da055..f4df2fc95 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -56,16 +56,19 @@ enum class ResolutionSetup : u32 { Res1_2X = 0, Res3_4X = 1, Res1X = 2, - Res3_2K = 3, + Res3_2X = 3, Res2X = 4, Res3X = 5, + Res4X = 6, }; struct ResolutionScalingInfo { - u32 up_scale{2}; + u32 up_scale{1}; u32 down_shift{0}; - f32 up_factor{2.0f}; - f32 down_factor{0.5f}; + f32 up_factor{1.0f}; + f32 down_factor{1.0f}; + u32 size_up{1}; + u32 size_shift{0}; }; /** The BasicSetting class is a simple resource manager. It defines a label and default value @@ -613,6 +616,8 @@ std::string GetTimeZoneString(); void LogSettings(); +void UpdateRescalingInfo(); + // Restore the global state of all applicable settings in the Values struct void RestoreGlobalState(bool is_powered_on); -- cgit v1.2.3 From 71ca84d8299f7eb6779e95e808b3ec7f8505354b Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 20 Jul 2021 18:29:52 +0200 Subject: Settings: eliminate rescaling_factor. --- src/common/settings.cpp | 2 +- src/common/settings.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index dd3a3d456..6f3acee79 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -48,7 +48,6 @@ void LogSettings() { log_setting("Core_UseMultiCore", values.use_multi_core.GetValue()); log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue()); log_setting("Renderer_UseResolutionScaling", values.resolution_setup.GetValue()); - log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); log_setting("Renderer_UseSpeedLimit", values.use_speed_limit.GetValue()); log_setting("Renderer_SpeedLimit", values.speed_limit.GetValue()); log_setting("Renderer_UseDiskShaderCache", values.use_disk_shader_cache.GetValue()); @@ -155,6 +154,7 @@ void UpdateRescalingInfo() { info.down_factor = static_cast(1U << info.down_shift) / info.up_scale; info.size_up = info.up_scale * info.up_scale; info.size_shift = info.down_shift * 2; + info.active = info.up_scale != 1 || info.down_shift != 0; } void RestoreGlobalState(bool is_powered_on) { diff --git a/src/common/settings.h b/src/common/settings.h index f4df2fc95..2b11984b4 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -69,6 +69,7 @@ struct ResolutionScalingInfo { f32 down_factor{1.0f}; u32 size_up{1}; u32 size_shift{0}; + bool active{}; }; /** The BasicSetting class is a simple resource manager. It defines a label and default value @@ -472,7 +473,6 @@ struct Values { ResolutionScalingInfo resolution_info{}; Setting resolution_setup{ResolutionSetup::Res1X, "resolution_setup"}; - Setting resolution_factor{1, "resolution_factor"}; // *nix platforms may have issues with the borderless windowed fullscreen mode. // Default to exclusive fullscreen on these platforms for now. RangedSetting fullscreen_mode{ -- cgit v1.2.3 From 43aa695a0415821e42fabf78a8a624edaadebab7 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 25 Jul 2021 21:20:12 -0300 Subject: common/settings: Remove unused scaling options --- src/common/settings.cpp | 23 +++++++---------------- src/common/settings.h | 2 -- 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 6f3acee79..4b7fa4b82 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -109,51 +109,42 @@ void UpdateRescalingInfo() { auto setup = values.resolution_setup.GetValue(); auto& info = values.resolution_info; switch (setup) { - case ResolutionSetup::Res1_2X: { + case ResolutionSetup::Res1_2X: info.up_scale = 1; info.down_shift = 1; break; - } - case ResolutionSetup::Res3_4X: { + case ResolutionSetup::Res3_4X: info.up_scale = 3; info.down_shift = 2; break; - } - case ResolutionSetup::Res1X: { + case ResolutionSetup::Res1X: info.up_scale = 1; info.down_shift = 0; break; - } case ResolutionSetup::Res3_2X: { info.up_scale = 3; info.down_shift = 1; break; } - case ResolutionSetup::Res2X: { + case ResolutionSetup::Res2X: info.up_scale = 2; info.down_shift = 0; break; - } - case ResolutionSetup::Res3X: { + case ResolutionSetup::Res3X: info.up_scale = 3; info.down_shift = 0; break; - } - case ResolutionSetup::Res4X: { + case ResolutionSetup::Res4X: info.up_scale = 4; info.down_shift = 0; break; - } - default: { + default: UNREACHABLE(); info.up_scale = 1; info.down_shift = 0; } - } info.up_factor = static_cast(info.up_scale) / (1U << info.down_shift); info.down_factor = static_cast(1U << info.down_shift) / info.up_scale; - info.size_up = info.up_scale * info.up_scale; - info.size_shift = info.down_shift * 2; info.active = info.up_scale != 1 || info.down_shift != 0; } diff --git a/src/common/settings.h b/src/common/settings.h index 2b11984b4..ca88c086b 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -67,8 +67,6 @@ struct ResolutionScalingInfo { u32 down_shift{0}; f32 up_factor{1.0f}; f32 down_factor{1.0f}; - u32 size_up{1}; - u32 size_shift{0}; bool active{}; }; -- cgit v1.2.3 From a6b88e85bfb14c45345f6443b54d15a61e3975d5 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 17 Aug 2021 00:12:52 +0200 Subject: Renderer: Implement Bicubic and ScaleForce filters. --- src/common/settings.cpp | 10 +--------- src/common/settings.h | 17 +++++++++++------ 2 files changed, 12 insertions(+), 15 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 4b7fa4b82..f0686a7c5 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -48,6 +48,7 @@ void LogSettings() { log_setting("Core_UseMultiCore", values.use_multi_core.GetValue()); log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue()); log_setting("Renderer_UseResolutionScaling", values.resolution_setup.GetValue()); + log_setting("Renderer_ScalingFilter", values.scaling_filter.GetValue()); log_setting("Renderer_UseSpeedLimit", values.use_speed_limit.GetValue()); log_setting("Renderer_SpeedLimit", values.speed_limit.GetValue()); log_setting("Renderer_UseDiskShaderCache", values.use_disk_shader_cache.GetValue()); @@ -113,19 +114,10 @@ void UpdateRescalingInfo() { info.up_scale = 1; info.down_shift = 1; break; - case ResolutionSetup::Res3_4X: - info.up_scale = 3; - info.down_shift = 2; - break; case ResolutionSetup::Res1X: info.up_scale = 1; info.down_shift = 0; break; - case ResolutionSetup::Res3_2X: { - info.up_scale = 3; - info.down_shift = 1; - break; - } case ResolutionSetup::Res2X: info.up_scale = 2; info.down_shift = 0; diff --git a/src/common/settings.h b/src/common/settings.h index ca88c086b..f629c7c56 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -54,12 +54,16 @@ enum class NvdecEmulation : u32 { enum class ResolutionSetup : u32 { Res1_2X = 0, - Res3_4X = 1, - Res1X = 2, - Res3_2X = 3, - Res2X = 4, - Res3X = 5, - Res4X = 6, + Res1X = 1, + Res2X = 2, + Res3X = 3, + Res4X = 4, +}; + +enum class ScalingFilter : u32 { + Bilinear = 0, + Bicubic = 1, + ScaleForce = 2, }; struct ResolutionScalingInfo { @@ -471,6 +475,7 @@ struct Values { ResolutionScalingInfo resolution_info{}; Setting resolution_setup{ResolutionSetup::Res1X, "resolution_setup"}; + Setting scaling_filter{ScalingFilter::Bilinear, "scaling_filter"}; // *nix platforms may have issues with the borderless windowed fullscreen mode. // Default to exclusive fullscreen on these platforms for now. RangedSetting fullscreen_mode{ -- cgit v1.2.3 From 31478c6c1b841b9a820742830b136775fafe270f Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Wed, 6 Oct 2021 01:18:00 -0400 Subject: video_core: Misc resolution scaling related refactoring --- src/common/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index f0686a7c5..12fdb0f9b 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -107,7 +107,7 @@ float Volume() { } void UpdateRescalingInfo() { - auto setup = values.resolution_setup.GetValue(); + const auto setup = values.resolution_setup.GetValue(); auto& info = values.resolution_info; switch (setup) { case ResolutionSetup::Res1_2X: -- cgit v1.2.3 From abd07e41582b6d8f7efdedb936cdd7a7fddf9912 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Tue, 12 Oct 2021 00:35:01 -0400 Subject: video_core: Refactor resolution scale function --- src/common/settings.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index f629c7c56..09f7cdd84 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -72,6 +72,20 @@ struct ResolutionScalingInfo { f32 up_factor{1.0f}; f32 down_factor{1.0f}; bool active{}; + + s32 ScaleUp(s32 value) const { + if (value == 0) { + return 0; + } + return std::max((value * static_cast(up_scale)) >> static_cast(down_shift), 1); + } + + u32 ScaleUp(u32 value) const { + if (value == 0U) { + return 0U; + } + return std::max((value * up_scale) >> down_shift, 1U); + } }; /** The BasicSetting class is a simple resource manager. It defines a label and default value -- cgit v1.2.3 From b7ccc58f235d9e442677eb10259b7196a387c6bc Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 15 Oct 2021 22:59:16 +0200 Subject: Texture Cahe: Fix downscaling on SMO. --- src/common/settings.cpp | 2 ++ src/common/settings.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 12fdb0f9b..bc2c8c7d7 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -109,10 +109,12 @@ float Volume() { void UpdateRescalingInfo() { const auto setup = values.resolution_setup.GetValue(); auto& info = values.resolution_info; + info.downscale = false; switch (setup) { case ResolutionSetup::Res1_2X: info.up_scale = 1; info.down_shift = 1; + info.downscale = true; break; case ResolutionSetup::Res1X: info.up_scale = 1; diff --git a/src/common/settings.h b/src/common/settings.h index 09f7cdd84..a09db0822 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -72,6 +72,7 @@ struct ResolutionScalingInfo { f32 up_factor{1.0f}; f32 down_factor{1.0f}; bool active{}; + bool downscale{}; s32 ScaleUp(s32 value) const { if (value == 0) { -- cgit v1.2.3 From 37cb0377ae30e2139f6fa381d04124e51fcccded Mon Sep 17 00:00:00 2001 From: Marshall Mohror Date: Sat, 16 Oct 2021 20:33:58 -0500 Subject: vulkan: Implement FidelityFX Super Resolution --- src/common/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index a09db0822..9da447ce0 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -64,6 +64,7 @@ enum class ScalingFilter : u32 { Bilinear = 0, Bicubic = 1, ScaleForce = 2, + Fsr = 3, }; struct ResolutionScalingInfo { -- cgit v1.2.3 From b60966041c5b1dccd9c5c5ca00fb02353c2151bb Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 17 Oct 2021 17:22:16 +0200 Subject: Presentation: add Nearest Neighbor filter. --- src/common/settings.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index 9da447ce0..84dab5217 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -61,10 +61,11 @@ enum class ResolutionSetup : u32 { }; enum class ScalingFilter : u32 { - Bilinear = 0, - Bicubic = 1, - ScaleForce = 2, - Fsr = 3, + NearestNeighbor = 0, + Bilinear = 1, + Bicubic = 2, + ScaleForce = 3, + Fsr = 4, }; struct ResolutionScalingInfo { -- cgit v1.2.3 From 4ad22c7d2b9d8fdfffc380f0b52f4ba943599bef Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Wed, 20 Oct 2021 00:33:03 +0200 Subject: Video Core: fix building for GCC. --- src/common/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/math_util.h b/src/common/math_util.h index 4c38d8040..510c4e56d 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -48,8 +48,8 @@ struct Rectangle { } [[nodiscard]] Rectangle Scale(const float s) const { - return Rectangle{left, top, static_cast(left + GetWidth() * s), - static_cast(top + GetHeight() * s)}; + return Rectangle{left, top, static_cast(static_cast(left + GetWidth()) * s), + static_cast(static_cast(top + GetHeight()) * s)}; } }; -- cgit v1.2.3 From e7fc60406ef5309268d77edb5e5266febe147e53 Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Wed, 20 Oct 2021 18:56:34 +0200 Subject: VideoCore: Add more rescaling option. --- src/common/settings.cpp | 13 +++++++++++++ src/common/settings.h | 11 +++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index bc2c8c7d7..84ac937e5 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -116,6 +116,11 @@ void UpdateRescalingInfo() { info.down_shift = 1; info.downscale = true; break; + case ResolutionSetup::Res3_4X: + info.up_scale = 3; + info.down_shift = 2; + info.downscale = true; + break; case ResolutionSetup::Res1X: info.up_scale = 1; info.down_shift = 0; @@ -132,6 +137,14 @@ void UpdateRescalingInfo() { info.up_scale = 4; info.down_shift = 0; break; + case ResolutionSetup::Res5X: + info.up_scale = 5; + info.down_shift = 0; + break; + case ResolutionSetup::Res6X: + info.up_scale = 6; + info.down_shift = 0; + break; default: UNREACHABLE(); info.up_scale = 1; diff --git a/src/common/settings.h b/src/common/settings.h index 84dab5217..f6acf5bdf 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -54,10 +54,13 @@ enum class NvdecEmulation : u32 { enum class ResolutionSetup : u32 { Res1_2X = 0, - Res1X = 1, - Res2X = 2, - Res3X = 3, - Res4X = 4, + Res3_4X = 1, + Res1X = 2, + Res2X = 3, + Res3X = 4, + Res4X = 5, + Res5X = 6, + Res6X = 7, }; enum class ScalingFilter : u32 { -- cgit v1.2.3 From 9e065b9c7d3b25ddfe20afa4a945cca6e9767fa9 Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Thu, 21 Oct 2021 01:27:54 +0200 Subject: VideoCore: Add gaussian filtering. --- src/common/settings.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index f6acf5bdf..830030efd 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -67,8 +67,9 @@ enum class ScalingFilter : u32 { NearestNeighbor = 0, Bilinear = 1, Bicubic = 2, - ScaleForce = 3, - Fsr = 4, + Gaussian = 3, + ScaleForce = 4, + Fsr = 5, }; struct ResolutionScalingInfo { -- cgit v1.2.3 From 2eff80b47f578b346bb80c5afa2271859cd7943b Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Thu, 21 Oct 2021 02:05:16 +0200 Subject: QtGUI: Add buttton to toggle the filter. --- src/common/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index 830030efd..e926a3268 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -70,6 +70,7 @@ enum class ScalingFilter : u32 { Gaussian = 3, ScaleForce = 4, Fsr = 5, + LastFilter = Fsr, }; struct ResolutionScalingInfo { -- cgit v1.2.3 From 510caeefb3e3bf4b365f08a97cdfeffaaf8a80ce Mon Sep 17 00:00:00 2001 From: Marshall Mohror Date: Wed, 20 Oct 2021 18:32:11 -0500 Subject: Settings: Add anti-aliasing method setting --- src/common/settings.cpp | 1 + src/common/settings.h | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 84ac937e5..3bcaa072f 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -49,6 +49,7 @@ void LogSettings() { log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue()); log_setting("Renderer_UseResolutionScaling", values.resolution_setup.GetValue()); log_setting("Renderer_ScalingFilter", values.scaling_filter.GetValue()); + log_setting("Renderer_AntiAliasing", values.anti_aliasing.GetValue()); log_setting("Renderer_UseSpeedLimit", values.use_speed_limit.GetValue()); log_setting("Renderer_SpeedLimit", values.speed_limit.GetValue()); log_setting("Renderer_UseDiskShaderCache", values.use_disk_shader_cache.GetValue()); diff --git a/src/common/settings.h b/src/common/settings.h index e926a3268..ca1c3c1aa 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -73,6 +73,11 @@ enum class ScalingFilter : u32 { LastFilter = Fsr, }; +enum class AntiAliasing : u32 { + None = 0, + Fxaa = 1, +}; + struct ResolutionScalingInfo { u32 up_scale{1}; u32 down_shift{0}; @@ -498,6 +503,7 @@ struct Values { ResolutionScalingInfo resolution_info{}; Setting resolution_setup{ResolutionSetup::Res1X, "resolution_setup"}; Setting scaling_filter{ScalingFilter::Bilinear, "scaling_filter"}; + Setting anti_aliasing{AntiAliasing::None, "anti_aliasing"}; // *nix platforms may have issues with the borderless windowed fullscreen mode. // Default to exclusive fullscreen on these platforms for now. RangedSetting fullscreen_mode{ -- cgit v1.2.3 From a96c9c803be9aca0b9775c37c1e77e13cca56c80 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 22 Oct 2021 22:56:08 +0200 Subject: Yuzu UI: Add button for Anti Alias --- src/common/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index ca1c3c1aa..c7610ef1c 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -76,6 +76,7 @@ enum class ScalingFilter : u32 { enum class AntiAliasing : u32 { None = 0, Fxaa = 1, + LastAA = Fxaa, }; struct ResolutionScalingInfo { -- cgit v1.2.3 From 282e04bffb4962dcc1d8aee2cb0fd2a1a45c86e6 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 16 Nov 2021 23:07:17 +0100 Subject: TextureCache: Add automatic anisotropic filtering and refactor code. --- src/common/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index c7610ef1c..42f8b4a7d 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -515,7 +515,7 @@ struct Values { #endif FullscreenMode::Borderless, FullscreenMode::Exclusive, "fullscreen_mode"}; RangedSetting aspect_ratio{0, 0, 3, "aspect_ratio"}; - RangedSetting max_anisotropy{0, 0, 4, "max_anisotropy"}; + RangedSetting max_anisotropy{0, 0, 5, "max_anisotropy"}; Setting use_speed_limit{true, "use_speed_limit"}; RangedSetting speed_limit{100, 0, 9999, "speed_limit"}; Setting use_disk_shader_cache{true, "use_disk_shader_cache"}; -- cgit v1.2.3