GS: Add option to disable Interlace Offset

This commit is contained in:
refractionpcsx2 2022-05-20 18:17:35 +01:00
parent 0c855cdd6d
commit 4a12ec6fc0
9 changed files with 36 additions and 16 deletions

View File

@ -99,6 +99,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.bilinearFiltering, "EmuCore/GS", "linear_present", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.integerScaling, "EmuCore/GS", "IntegerScaling", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOffsets, "EmuCore/GS", "pcrtc_offsets", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.DisableInterlaceOffset, "EmuCore/GS", "disable_interlace_offset", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.internalResolutionScreenshots, "EmuCore/GS", "InternalResolutionScreenshots", false);
SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.zoom, "EmuCore/GS", "Zoom", 100.0f);
SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.stretchY, "EmuCore/GS", "StretchY", 100.0f);

View File

@ -271,10 +271,17 @@
</item>
<item row="7" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QCheckBox" name="bilinearFiltering">
<item row="1" column="1">
<widget class="QCheckBox" name="internalResolutionScreenshots">
<property name="text">
<string>Bilinear Filtering</string>
<string>Internal Resolution Screenshots</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="PCRTCOffsets">
<property name="text">
<string>Screen Offsets</string>
</property>
</widget>
</item>
@ -285,13 +292,6 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="internalResolutionScreenshots">
<property name="text">
<string>Internal Resolution Screenshots</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="integerScaling">
<property name="text">
@ -299,10 +299,20 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="PCRTCOffsets">
<item row="0" column="0">
<widget class="QCheckBox" name="bilinearFiltering">
<property name="text">
<string>Screen Offsets</string>
<string>Bilinear Filtering</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="DisableInterlaceOffset">
<property name="toolTip">
<string>Disables interlacing offset which may reduce blurring in some situations.</string>
</property>
<property name="text">
<string>Disable Interlace Offset</string>
</property>
</widget>
</item>
@ -1197,7 +1207,7 @@
<string>LZMA (xz)</string>
</property>
</item>
<item>
<item>
<property name="text">
<string>Zstandard (zst)</string>
</property>

View File

@ -431,6 +431,7 @@ struct Pcsx2Config
struct
{
bool
DisableInterlaceOffset: 1,
PCRTCOffsets : 1,
IntegerScaling : 1,
LinearPresent : 1,

View File

@ -1325,6 +1325,7 @@ void GSApp::Init()
m_default_configuration["fxaa"] = "0";
m_default_configuration["GSDumpCompression"] = "0";
m_default_configuration["HWDisableReadbacks"] = "0";
m_default_configuration["disable_interlace_offset"] = "0";
m_default_configuration["pcrtc_offsets"] = "0";
m_default_configuration["IntegerScaling"] = "0";
m_default_configuration["deinterlace"] = "7";

View File

@ -360,7 +360,7 @@ void GSDevice::Interlace(const GSVector2i& ds, int field, int mode, float yoffse
// weave first
const int offset = static_cast<int>(yoffset) * (1 - field);
DoInterlace(m_merge, m_weavebob, field, false, offset);
DoInterlace(m_merge, m_weavebob, field, false, GSConfig.DisableInterlaceOffset ? 0 : offset);
if (mode == 2)
{

View File

@ -93,6 +93,10 @@ const char* dialog_message(int ID, bool* updateText)
return cvtString("Enable: Takes in to account offsets in the analogue circuits.\n"
"This will use the intended aspect ratios and screen offsets, may cause odd black borders.\n"
"Used for screen positioning and screen shake in Wipeout Fusion.");
case IDC_DISABLE_INTERLACE_OFFSETS:
return cvtString("Enable: Removes the offset for interlacing when upscaling.\n"
"Can reduce blurring in some games, where the opposite is true most of the time.\n"
"Used for ICO to reduce blur.");
case IDC_ACCURATE_DATE:
return cvtString("Implement a more accurate algorithm to compute GS destination alpha testing.\n"
"It improves shadow and transparency rendering.\n\n"

View File

@ -43,6 +43,7 @@ enum
// Renderer
IDC_FILTER,
IDC_PCRTC_OFFSETS,
IDC_DISABLE_INTERLACE_OFFSETS,
// Hardware Renderer
IDC_PRELOAD_TEXTURES,
IDC_ACCURATE_DATE,

View File

@ -322,6 +322,7 @@ RendererTab::RendererTab(wxWindow* parent)
auto* pcrtc_checks_box = new wxWrapSizer(wxHORIZONTAL);
m_ui.addCheckBox(pcrtc_checks_box, "Screen Offsets", "pcrtc_offsets", IDC_PCRTC_OFFSETS);
m_ui.addCheckBox(pcrtc_checks_box, "Disable Interlace Offset", "disable_interlace_offset", IDC_DISABLE_INTERLACE_OFFSETS);
general_box->Add(pcrtc_checks_box, wxSizerFlags().Center());

View File

@ -296,6 +296,7 @@ Pcsx2Config::GSOptions::GSOptions()
{
bitset = 0;
DisableInterlaceOffset = false;
PCRTCOffsets = false;
IntegerScaling = false;
LinearPresent = true;
@ -509,7 +510,7 @@ void Pcsx2Config::GSOptions::ReloadIniSettings()
// Unfortunately, because code in the GS still reads the setting by key instead of
// using these variables, we need to use the old names. Maybe post 2.0 we can change this.
GSSettingBoolEx(DisableInterlaceOffset, "disable_interlace_offset");
GSSettingBoolEx(PCRTCOffsets, "pcrtc_offsets");
GSSettingBool(IntegerScaling);
GSSettingBoolEx(LinearPresent, "linear_present");