Merge pull request #2889 from Calinou/texture-filtering-warn-performance-cost

Warn about the high performance cost of JINC2 and xBR filtering
This commit is contained in:
Connor McLaughlin 2022-09-24 13:11:11 +10:00 committed by GitHub
commit 7ef600aaa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -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<GPUTextureFilter> Settings::ParseTextureFilterName(const char* str)
{

View file

@ -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. <br>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. <br>Will have a "
"greater effect on higher resolution scales. Only applies to the hardware renderers. <br>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 "

View file

@ -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);