GPU: Add option to disable PGXP on 2D polygons

This commit is contained in:
Stenzek
2024-07-09 20:30:30 +10:00
parent f0e2d1a9fa
commit de27e5de92
8 changed files with 89 additions and 26 deletions

View File

@ -133,6 +133,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpPreserveProjPrecision, "GPU", "PGXPPreserveProjFP", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpCPU, "GPU", "PGXPCPU", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpVertexCache, "GPU", "PGXPVertexCache", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpDisableOn2DPolygons, "GPU", "PGXPDisableOn2DPolygons",
false);
connect(m_ui.pgxpTextureCorrection, &QCheckBox::checkStateChanged, this,
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
@ -388,6 +390,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
m_ui.pgxpVertexCache, tr("Vertex Cache"), tr("Unchecked"),
tr("Uses screen-space vertex positions to obtain precise positions, instead of tracking memory accesses. Can "
"provide PGXP compatibility for some games, but <strong>generally provides no benefit.</strong>"));
dialog->registerWidgetHelp(m_ui.pgxpDisableOn2DPolygons, tr("Disable on 2D Polygons"), tr("Unchecked"),
tr("Uses native resolution coordinates for 2D polygons, instead of precise coordinates. "
"Can fix misaligned UI in some games, but otherwise should be left disabled. The game "
"database will enable this automatically when needed."));
// OSD Tab

View File

@ -525,13 +525,6 @@
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="pgxpTextureCorrection">
<property name="text">
<string>Perspective Correct Textures</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="pgxpColorCorrection">
<property name="text">
@ -539,17 +532,17 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="pgxpCulling">
<item row="2" column="1">
<widget class="QCheckBox" name="pgxpVertexCache">
<property name="text">
<string>Culling Correction</string>
<string>Vertex Cache</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="pgxpPreserveProjPrecision">
<item row="0" column="0">
<widget class="QCheckBox" name="pgxpTextureCorrection">
<property name="text">
<string>Preserve Projection Precision</string>
<string>Perspective Correct Textures</string>
</property>
</widget>
</item>
@ -560,10 +553,24 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="pgxpVertexCache">
<item row="1" column="1">
<widget class="QCheckBox" name="pgxpPreserveProjPrecision">
<property name="text">
<string>Vertex Cache</string>
<string>Preserve Projection Precision</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="pgxpCulling">
<property name="text">
<string>Culling Correction</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="pgxpDisableOn2DPolygons">
<property name="text">
<string>Disable on 2D Polygons</string>
</property>
</widget>
</item>