Skip to content

Commit

Permalink
GS/HW: Add all levels/unclamped mipmap modes (stenzek)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbird88 committed Sep 24, 2024
1 parent cd3e11b commit ebd2be7
Show file tree
Hide file tree
Showing 12 changed files with 1,233 additions and 260 deletions.
8 changes: 5 additions & 3 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.anisotropicFiltering, "EmuCore/GS", "MaxAnisotropy",
s_anisotropic_filtering_entries, s_anisotropic_filtering_values, "0");
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.dithering, "EmuCore/GS", "dithering_ps2", 2);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.mipmapping, "EmuCore/GS", "hw_mipmap", true);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.hwMipmapMode, "EmuCore/GS", "hw_mipmap_mode",
static_cast<int>(GSHWMipmapMode::Enabled));
SettingWidgetBinder::BindWidgetToIntSetting(
sif, m_ui.blending, "EmuCore/GS", "accurate_blending_unit", static_cast<int>(AccBlendLevel::Basic));
SettingWidgetBinder::BindWidgetToIntSetting(
Expand Down Expand Up @@ -494,8 +495,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
"FMV resolution will remain unchanged, as the video files are pre-rendered."));

dialog->registerWidgetHelp(
m_ui.mipmapping, tr("Mipmapping"), tr("Checked"), tr("Enables mipmapping, which some games require to render correctly."));

m_ui.hwMipmapMode, tr("Mipmapping"), tr("Enabled"), tr("Enables mipmapping, which many games require to render correctly. "
"Unclamped allows higher texture detail levels to be used, but may break certain graphical effects."));

dialog->registerWidgetHelp(
m_ui.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"), tr("Control the texture filtering of the emulation."));

Expand Down
42 changes: 33 additions & 9 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -643,29 +643,53 @@
<string>Spin GPU During Readbacks</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mipmapping">
<property name="text">
<string>Mipmapping</string>
</property>
</widget>
</item>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="spinCPUDuringReadbacks">
<property name="text">
<string>Spin CPU During Readbacks</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="0">
<widget class="QCheckBox" name="enableHWFixes">
<property name="text">
<string>Manual Hardware Renderer Fixes</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="hwMipmappingLabel">
<property name="text">
<string>Mipmapping:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="hwMipmapMode">
<item>
<property name="text">
<string>Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>Enabled</string>
</property>
</item>
<item>
<property name="text">
<string>All Levels</string>
</property>
</item>
<item>
<property name="text">
<string>Unclamped</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
Expand Down
11 changes: 10 additions & 1 deletion pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,15 @@ enum class BiFiltering : u8
Forced_But_Sprite,
};

enum class GSHWMipmapMode : u8
{
Disabled,
Enabled,
AllLevels,
Unclamped,
MaxCount
};

enum class TriFiltering : s8
{
Automatic = -1,
Expand Down Expand Up @@ -627,7 +636,6 @@ struct Pcsx2Config
AutoFlushSW : 1,
PreloadFrameWithGSData : 1,
Mipmap : 1,
HWMipmap : 1,
ManualUserHacks : 1,
UserHacks_AlignSpriteX : 1,
UserHacks_CPUFBConversion : 1,
Expand Down Expand Up @@ -682,6 +690,7 @@ struct Pcsx2Config
float UpscaleMultiplier = 1.0f;

AccBlendLevel AccurateBlendingUnit = AccBlendLevel::Basic;
GSHWMipmapMode HWMipmapMode = GSHWMipmapMode::Disabled;
BiFiltering TextureFiltering = BiFiltering::PS2;
TexturePreloadingLevel TexturePreloading = TexturePreloadingLevel::Full;
GSDumpCompressionMethod GSDumpCompression = GSDumpCompressionMethod::Zstandard;
Expand Down
Loading

0 comments on commit ebd2be7

Please sign in to comment.