From 8152b99ea4d69c015f034010157643cf2d50d970 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 22 Sep 2022 14:23:31 +0200 Subject: [PATCH] Warn about the high performance cost of JINC2 and xBR filtering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These options (especially xBR) have a very high cost. In my experience, xBR has a greater impact on the framerate than enabling 4× SSAA or PGXP in CPU mode (whose quality increase is much more obvious). These options are also essentially unusable on mobile, regardless of how powerful your device is. As a result, this adds warnings both in the option names and the description. Bilinear filtering is not affected by this performance cost, as GPUs can perform this in hardware without having to emulate filtering through a shader. --- src/core/settings.cpp | 6 +++--- src/duckstation-qt/enhancementsettingswidget.cpp | 4 ++-- src/frontend-common/fullscreen_ui.cpp | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 0ec10d21c..7478dc6dd 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -886,9 +886,9 @@ static constexpr auto s_texture_filter_names = make_array("Nearest", "Bilinear", "BilinearBinAlpha", "JINC2", "JINC2BinAlpha", "xBR", "xBRBinAlpha"); static constexpr auto s_texture_filter_display_names = make_array(TRANSLATABLE("GPUTextureFilter", "Nearest-Neighbor"), TRANSLATABLE("GPUTextureFilter", "Bilinear"), - TRANSLATABLE("GPUTextureFilter", "Bilinear (No Edge Blending)"), TRANSLATABLE("GPUTextureFilter", "JINC2"), - TRANSLATABLE("GPUTextureFilter", "JINC2 (No Edge Blending)"), TRANSLATABLE("GPUTextureFilter", "xBR"), - TRANSLATABLE("GPUTextureFilter", "xBR (No Edge Blending)")); + TRANSLATABLE("GPUTextureFilter", "Bilinear (No Edge Blending)"), TRANSLATABLE("GPUTextureFilter", "JINC2 (Slow)"), + TRANSLATABLE("GPUTextureFilter", "JINC2 (Slow, No Edge Blending)"), TRANSLATABLE("GPUTextureFilter", "xBR (Very Slow)"), + TRANSLATABLE("GPUTextureFilter", "xBR (Very Slow, No Edge Blending)")); std::optional Settings::ParseTextureFilterName(const char* str) { diff --git a/src/duckstation-qt/enhancementsettingswidget.cpp b/src/duckstation-qt/enhancementsettingswidget.cpp index 093d7c5c2..a7563c874 100644 --- a/src/duckstation-qt/enhancementsettingswidget.cpp +++ b/src/duckstation-qt/enhancementsettingswidget.cpp @@ -85,8 +85,8 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsDialog* dialog, QWi dialog->registerWidgetHelp( m_ui.textureFiltering, tr("Texture Filtering"), qApp->translate("GPUTextureFilter", Settings::GetTextureFilterDisplayName(GPUTextureFilter::Nearest)), - tr("Smooths out the blockyness of magnified textures on 3D object by using filtering.
Will have a " - "greater effect on higher resolution scales. Only applies to the hardware renderers.")); + tr("Smooths out the blockiness of magnified textures on 3D object by using filtering.
Will have a " + "greater effect on higher resolution scales. Only applies to the hardware renderers.
The JINC2 and especially xBR filtering modes are very demanding, and may not be worth the speed penalty.")); dialog->registerWidgetHelp( m_ui.widescreenHack, tr("Widescreen Hack"), tr("Unchecked"), tr("Scales vertex positions in screen-space to a widescreen aspect ratio, essentially " diff --git a/src/frontend-common/fullscreen_ui.cpp b/src/frontend-common/fullscreen_ui.cpp index 1d871b904..5d9f2cb10 100644 --- a/src/frontend-common/fullscreen_ui.cpp +++ b/src/frontend-common/fullscreen_ui.cpp @@ -3362,8 +3362,9 @@ void FullscreenUI::DrawDisplaySettingsPage() "ResolutionScale", 1, resolution_scales.data(), resolution_scales.size(), 0, is_hardware); DrawEnumSetting(bsi, "Texture Filtering", - "Smooths out the blockyness of magnified textures on 3D objects. Will have a greater effect " - "on higher resolution scales.", + "Smooths out the blockiness of magnified textures on 3D objects. Will have a greater effect " + "on higher resolution scales. The JINC2 and especially xBR filtering modes are very demanding," + "and may not be worth the speed penalty.", "GPU", "TextureFilter", Settings::DEFAULT_GPU_TEXTURE_FILTER, &Settings::ParseTextureFilterName, &Settings::GetTextureFilterName, &Settings::GetTextureFilterDisplayName, GPUTextureFilter::Count, is_hardware);