Changed default setting for anti-alias alpha test to true.

Added checkbox in advanced page for anti-alias alpha test, connected to AA combobox in the graphics page.
pull/3224/head
Thomas Lowe 3 years ago
parent 4fbbb67e98
commit 5f355a14cd

@ -118,6 +118,11 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
loadSettingBool(radialFogCheckBox, "radial fog", "Shaders");
loadSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
loadSettingBool(antialiasAlphaTestCheckBox, "antialias alpha test", "Shaders");
if (Settings::Manager::getInt("antialiasing", "Video") == 0) {
antialiasAlphaTestCheckBox->setCheckState(Qt::Unchecked);
antialiasAlphaTestCheckBox->setEnabled(false);
}
loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool)));
loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
@ -268,6 +273,7 @@ void Launcher::AdvancedPage::saveSettings()
saveSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
saveSettingBool(radialFogCheckBox, "radial fog", "Shaders");
saveSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
saveSettingBool(antialiasAlphaTestCheckBox, "antialias alpha test", "Shaders");
saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
@ -439,6 +445,12 @@ void Launcher::AdvancedPage::slotLoadedCellsChanged(QStringList cellNames)
loadCellsForAutocomplete(cellNames);
}
void Launcher::AdvancedPage::slotAASettingChanged(int aaLevel) {
antialiasAlphaTestCheckBox->setEnabled(aaLevel > 0);
if (aaLevel == 0)
antialiasAlphaTestCheckBox->setCheckState(Qt::Unchecked);
}
void Launcher::AdvancedPage::slotAnimSourcesToggled(bool checked)
{
weaponSheathingCheckBox->setEnabled(checked);

@ -24,6 +24,7 @@ namespace Launcher
public slots:
void slotLoadedCellsChanged(QStringList cellNames);
void slotAASettingChanged(int aaLevel);
private slots:
void on_skipMenuCheckBox_stateChanged(int state);

@ -47,7 +47,10 @@ Launcher::GraphicsPage::GraphicsPage(QWidget *parent)
connect(screenComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(screenChanged(int)));
connect(framerateLimitCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotFramerateLimitToggled(bool)));
connect(shadowDistanceCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotShadowDistLimitToggled(bool)));
}
void Launcher::GraphicsPage::connectAntiAliasingChanged(const QObject* receiver, const char* slot) {
connect(antiAliasingComboBox, SIGNAL(currentIndexChanged(int)), receiver, slot);
}
bool Launcher::GraphicsPage::setupSDL()

@ -20,12 +20,16 @@ namespace Launcher
public:
explicit GraphicsPage(QWidget *parent = nullptr);
void connectAntiAliasingChanged(const QObject *receiver, const char *slot);
void saveSettings();
bool loadSettings();
public slots:
void screenChanged(int screen);
signals:
void signalAntiAliasingChanged(int aaValue);
private slots:
void slotFullScreenChanged(int state);
void slotStandardToggled(bool checked);

@ -146,7 +146,7 @@ void Launcher::MainDialog::createPages()
connect(mDataFilesPage, SIGNAL(signalProfileChanged(int)), mPlayPage, SLOT(setProfilesIndex(int)));
// Using Qt::QueuedConnection because signal is emitted in a subthread and slot is in the main thread
connect(mDataFilesPage, SIGNAL(signalLoadedCellsChanged(QStringList)), mAdvancedPage, SLOT(slotLoadedCellsChanged(QStringList)), Qt::QueuedConnection);
mGraphicsPage->connectAntiAliasingChanged(mAdvancedPage, SLOT(slotAASettingChanged(int)));
}
Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()

@ -492,7 +492,7 @@ minimum interior brightness = 0.08
# Convert the alpha test (cutout/punchthrough alpha) to alpha-to-coverage.
# This allows MSAA to work with alpha-tested meshes, producing better-looking edges without pixelation.
# When MSAA is off, this setting will have no visible effect, but might have a performance cost.
antialias alpha test = false
antialias alpha test = true
# Soften intersection of blended particle systems with opaque geometry
soft particles = false

@ -454,6 +454,16 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="antialiasAlphaTestCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enables alpha testing for smoother anti-aliasing (Requires anti-aliasing to be enabled)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use anti-alias alpha testing.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

Loading…
Cancel
Save