Frontends: Add PGXP Depth Buffer options

This commit is contained in:
Connor McLaughlin
2020-12-23 01:17:10 +10:00
parent d320d5c830
commit 744cfbd924
9 changed files with 140 additions and 52 deletions

View File

@ -29,6 +29,7 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(QtHostInterface* host_inter
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpCulling, "GPU", "PGXPCulling", true);
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpTextureCorrection, "GPU",
"PGXPTextureCorrection", true);
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpDepthBuffer, "GPU", "PGXPDepthBuffer", true);
connect(m_ui.resolutionScale, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
&EnhancementSettingsWidget::updateScaledDitheringEnabled);
@ -101,6 +102,10 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(QtHostInterface* host_inter
dialog->registerWidgetHelp(m_ui.pgxpTextureCorrection, tr("Texture Correction"), tr("Checked"),
tr("Uses perspective-correct interpolation for texture coordinates and colors, "
"straightening out warped textures. Requires geometry correction enabled."));
dialog->registerWidgetHelp(
m_ui.pgxpTextureCorrection, tr("Depth Buffer"), tr("Unchecked"),
tr("Attempts to reduce polygon Z-fighting by testing pixels against the depth values from PGXP. Low compatibility, "
"but can work well in some games. Other games may need a threshold adjustment."));
}
EnhancementSettingsWidget::~EnhancementSettingsWidget() = default;
@ -137,6 +142,7 @@ void EnhancementSettingsWidget::updatePGXPSettingsEnabled()
const bool enabled = m_ui.pgxpEnable->isChecked();
m_ui.pgxpCulling->setEnabled(enabled);
m_ui.pgxpTextureCorrection->setEnabled(enabled);
m_ui.pgxpDepthBuffer->setEnabled(enabled);
}
void EnhancementSettingsWidget::msaaModeChanged(int index)