Add Texture lod bias to UI (#12905)

This commit is contained in:
Darkhost1999 2022-10-30 15:06:53 -05:00 committed by GitHub
parent 06dc6909c4
commit 8d5a9dc722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View File

@ -78,6 +78,7 @@ enum class emu_settings_type
ShaderPrecisionQuality, ShaderPrecisionQuality,
Enable3D, Enable3D,
AnisotropicFilterOverride, AnisotropicFilterOverride,
TextureLodBias,
ResolutionScale, ResolutionScale,
MinimumScalableDimension, MinimumScalableDimension,
FsrUpscalingEnable, FsrUpscalingEnable,
@ -259,6 +260,7 @@ inline static const QMap<emu_settings_type, cfg_location> settings_location =
{ emu_settings_type::RelaxedZCULL, { "Video", "Relaxed ZCULL Sync"}}, { emu_settings_type::RelaxedZCULL, { "Video", "Relaxed ZCULL Sync"}},
{ emu_settings_type::PreciseZCULL, { "Video", "Accurate ZCULL stats"}}, { emu_settings_type::PreciseZCULL, { "Video", "Accurate ZCULL stats"}},
{ emu_settings_type::AnisotropicFilterOverride, { "Video", "Anisotropic Filter Override"}}, { emu_settings_type::AnisotropicFilterOverride, { "Video", "Anisotropic Filter Override"}},
{ emu_settings_type::TextureLodBias, { "Video", "Texture LOD Bias Addend"}},
{ emu_settings_type::ResolutionScale, { "Video", "Resolution Scale"}}, { emu_settings_type::ResolutionScale, { "Video", "Resolution Scale"}},
{ emu_settings_type::MinimumScalableDimension, { "Video", "Minimum Scalable Dimension"}}, { emu_settings_type::MinimumScalableDimension, { "Video", "Minimum Scalable Dimension"}},
{ emu_settings_type::VulkanAdapter, { "Video", "Vulkan", "Adapter"}}, { emu_settings_type::VulkanAdapter, { "Video", "Vulkan", "Adapter"}},

View File

@ -730,6 +730,14 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
ui->fsrSharpeningStrength->setValue(fsr_sharpening_strength_def); ui->fsrSharpeningStrength->setValue(fsr_sharpening_strength_def);
}); });
// DoubleSpinBoxes
m_emu_settings->EnhanceDoubleSpinBox(ui->TextureLODBias, emu_settings_type::TextureLodBias);
SubscribeTooltip(ui->gb_Level_of_Detail, tooltips.settings.texture_lod_bias);
connect(ui->TextureLODBiasReset, &QAbstractButton::clicked, [this]()
{
ui->TextureLODBias->setValue(stod(m_emu_settings->GetSettingDefault(emu_settings_type::TextureLodBias)));
});
// Remove renderers from the renderer Combobox if not supported // Remove renderers from the renderer Combobox if not supported
for (const auto& renderer : r_creator->renderers) for (const auto& renderer : r_creator->renderers)
{ {

View File

@ -849,6 +849,29 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="gb_Level_of_Detail">
<property name="title">
<string>Level of Detail</string>
</property>
<layout class="QVBoxLayout" name="gb_Level_of_Detail_Layout">
<item>
<layout class="QHBoxLayout" name="TextureLODBiasLayout">
<item>
<widget class="QDoubleSpinBox" name="TextureLODBias"/>
</item>
<item>
<widget class="QPushButton" name="TextureLODBiasReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer name="gpu_tab_layout_middle_spacer"> <spacer name="gpu_tab_layout_middle_spacer">
<property name="orientation"> <property name="orientation">

View File

@ -184,6 +184,8 @@ public:
const QString fsr_upscaling = tr("Enable FidelityFX Super Resolution upscaling filter to improve the look of upscaled images.\nIf the game is rendering at an internal resolution lower than your window resolution, FidelityFX will handle the upscale.\nCan cause visual artifacts.\nDoes not work with stereo 3D output for now."); const QString fsr_upscaling = tr("Enable FidelityFX Super Resolution upscaling filter to improve the look of upscaled images.\nIf the game is rendering at an internal resolution lower than your window resolution, FidelityFX will handle the upscale.\nCan cause visual artifacts.\nDoes not work with stereo 3D output for now.");
const QString fsr_rcas_strength = tr("Control the sharpening strength applied by FidelityFX Super Resolution. Higher values will give sharper output but may introduce artifacts."); const QString fsr_rcas_strength = tr("Control the sharpening strength applied by FidelityFX Super Resolution. Higher values will give sharper output but may introduce artifacts.");
const QString texture_lod_bias = tr("Changes Texture sampling accuracy. (Small changes have a big effect.)\nAvoid using values outside the range of -12 to +12 if you're unsure.\n-3 to +3 is plenty for most usecases");
// gui // gui
const QString log_limit = tr("Sets the maximum amount of blocks that the log can display.\nThis usually equals the number of lines.\nSet 0 in order to remove the limit."); const QString log_limit = tr("Sets the maximum amount of blocks that the log can display.\nThis usually equals the number of lines.\nSet 0 in order to remove the limit.");