mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 08:25:47 -04:00
Frontends: Add PGXP Depth Buffer options
This commit is contained in:
@ -151,6 +151,8 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
|
||||
"PGXPPreserveProjFP", false);
|
||||
addFloatRangeTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP Geometry Tolerance"), "GPU",
|
||||
"PGXPTolerance", -1.0f, 10.0f, 0.5f, -1.0f);
|
||||
addFloatRangeTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP Depth Clear Threshold"), "GPU",
|
||||
"PGXPDepthClearThreshold", 0.0f, 4096.0f, 1.0f, Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD);
|
||||
|
||||
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Enable Recompiler Memory Exceptions"), "CPU",
|
||||
"RecompilerMemoryExceptions", false);
|
||||
@ -189,17 +191,18 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 1, false);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 2, false);
|
||||
setFloatRangeTweakOption(m_ui.tweakOptionTable, 3, -1.0f);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 4, false);
|
||||
setChoiceTweakOption(m_ui.tweakOptionTable, 5, Settings::DEFAULT_CPU_FASTMEM_MODE);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 6, false);
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 7, static_cast<int>(Settings::DEFAULT_DMA_MAX_SLICE_TICKS));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 8, static_cast<int>(Settings::DEFAULT_DMA_HALT_TICKS));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 9, static_cast<int>(Settings::DEFAULT_GPU_FIFO_SIZE));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 10, static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD));
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 11, false);
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 12, 0);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 13, true);
|
||||
setFloatRangeTweakOption(m_ui.tweakOptionTable, 4, Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 5, false);
|
||||
setChoiceTweakOption(m_ui.tweakOptionTable, 6, Settings::DEFAULT_CPU_FASTMEM_MODE);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 7, false);
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 8, static_cast<int>(Settings::DEFAULT_DMA_MAX_SLICE_TICKS));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 9, static_cast<int>(Settings::DEFAULT_DMA_HALT_TICKS));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 10, static_cast<int>(Settings::DEFAULT_GPU_FIFO_SIZE));
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 11, static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD));
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 12, false);
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, 13, 0);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 14, true);
|
||||
#ifdef WIN32
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 14, false);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 15, false);
|
||||
#endif
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -128,28 +128,35 @@
|
||||
<property name="title">
|
||||
<string>PGXP (Precision Geometry Transform Pipeline)</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="pgxpEnable">
|
||||
<property name="text">
|
||||
<string>Geometry Correction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="pgxpCulling">
|
||||
<property name="text">
|
||||
<string>Culling Correction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="pgxpTextureCorrection">
|
||||
<property name="text">
|
||||
<string>Texture Correction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="pgxpDepthBuffer">
|
||||
<property name="text">
|
||||
<string>Depth Buffer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -325,6 +325,11 @@ void GamePropertiesDialog::populateGameSettings()
|
||||
QSignalBlocker sb(m_ui.gpuPGXPTolerance);
|
||||
m_ui.gpuPGXPTolerance->setValue(static_cast<double>(gs.gpu_pgxp_tolerance.value()));
|
||||
}
|
||||
if (gs.gpu_pgxp_depth_threshold.has_value())
|
||||
{
|
||||
QSignalBlocker sb(m_ui.gpuPGXPDepthThreshold);
|
||||
m_ui.gpuPGXPDepthThreshold->setValue(static_cast<double>(gs.gpu_pgxp_depth_threshold.value()));
|
||||
}
|
||||
|
||||
if (gs.display_crop_mode.has_value())
|
||||
{
|
||||
@ -383,6 +388,7 @@ void GamePropertiesDialog::populateGameSettings()
|
||||
populateBooleanUserSetting(m_ui.userWidescreenHack, gs.gpu_widescreen_hack);
|
||||
populateBooleanUserSetting(m_ui.userForce43For24Bit, gs.display_force_4_3_for_24bit);
|
||||
populateBooleanUserSetting(m_ui.userPGXP, gs.gpu_pgxp);
|
||||
populateBooleanUserSetting(m_ui.userPGXPDepthBuffer, gs.gpu_pgxp_depth_buffer);
|
||||
|
||||
if (gs.controller_1_type.has_value())
|
||||
{
|
||||
@ -561,6 +567,7 @@ void GamePropertiesDialog::connectUi()
|
||||
connectBooleanUserSetting(m_ui.userWidescreenHack, &m_game_settings.gpu_widescreen_hack);
|
||||
connectBooleanUserSetting(m_ui.userForce43For24Bit, &m_game_settings.display_force_4_3_for_24bit);
|
||||
connectBooleanUserSetting(m_ui.userPGXP, &m_game_settings.gpu_pgxp);
|
||||
connectBooleanUserSetting(m_ui.userPGXPDepthBuffer, &m_game_settings.gpu_pgxp_depth_buffer);
|
||||
|
||||
connect(m_ui.userControllerType1, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||
if (index <= 0)
|
||||
@ -704,6 +711,13 @@ void GamePropertiesDialog::connectUi()
|
||||
m_game_settings.gpu_pgxp_tolerance = static_cast<float>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
connect(m_ui.gpuPGXPDepthThreshold, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this](double value) {
|
||||
if (value <= 0.0)
|
||||
m_game_settings.gpu_pgxp_depth_threshold.reset();
|
||||
else
|
||||
m_game_settings.gpu_pgxp_depth_threshold = static_cast<float>(value);
|
||||
saveGameSettings();
|
||||
});
|
||||
}
|
||||
|
||||
void GamePropertiesDialog::updateCPUClockSpeedLabel()
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>750</width>
|
||||
<height>548</height>
|
||||
<height>567</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -346,16 +346,6 @@
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="userTrueColor">
|
||||
<property name="text">
|
||||
<string>True Color Rendering (24-bit, disables dithering)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="userScaledDithering">
|
||||
<property name="text">
|
||||
@ -366,26 +356,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="userWidescreenHack">
|
||||
<property name="text">
|
||||
<string>Widescreen Hack</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="userForceNTSCTimings">
|
||||
<property name="text">
|
||||
<string>Force NTSC Timings (60hz-on-PAL)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="userForce43For24Bit">
|
||||
<property name="text">
|
||||
@ -396,6 +366,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="userForceNTSCTimings">
|
||||
<property name="text">
|
||||
<string>Force NTSC Timings (60hz-on-PAL)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="userTrueColor">
|
||||
<property name="text">
|
||||
<string>True Color Rendering (24-bit, disables dithering)</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="userPGXP">
|
||||
<property name="text">
|
||||
@ -406,6 +396,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="userWidescreenHack">
|
||||
<property name="text">
|
||||
<string>Widescreen Hack</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="userPGXPDepthBuffer">
|
||||
<property name="text">
|
||||
<string>PGXP Depth Buffer</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -798,16 +808,30 @@
|
||||
<item row="6" column="1">
|
||||
<widget class="QDoubleSpinBox" name="gpuPGXPTolerance">
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>0.5</number>
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_30">
|
||||
<property name="text">
|
||||
<string>PGXP Depth Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QDoubleSpinBox" name="gpuPGXPDepthThreshold">
|
||||
<property name="maximum">
|
||||
<double>4096.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user