1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-18 10:45:27 +02:00

Allow FXAA to be used together with FSAA or SSAA (#16555)

This allows FXAA post-processing to be used together with FSAA or SSAA
This commit is contained in:
lhofhansl
2025-10-11 20:50:23 -07:00
committed by GitHub
parent 0b13fd0b01
commit 7ca5f3baa0
4 changed files with 18 additions and 8 deletions

View File

@@ -132,11 +132,11 @@ RenderStep *addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep
<< "combination with post-processing by the current video driver." << std::endl;
const bool enable_ssaa = antialiasing == "ssaa";
const bool enable_fxaa = antialiasing == "fxaa";
const bool enable_fxaa = g_settings->getBool("fxaa");
verbosestream << "addPostProcessing(): AA = "
<< (enable_msaa ? "msaa" : enable_ssaa ? "ssaa" : enable_fxaa ? "fxaa" : "none")
<< " " << antialiasing_scale << "x" << std::endl;
<< (enable_msaa ? "msaa" : enable_ssaa ? "ssaa" : "none")
<< " " << antialiasing_scale << "x" << (enable_fxaa ? " + fxaa" : "") << std::endl;
// Super-sampling is simply rendering into a larger texture.
// Downscaling is done by the final step when rendering to the screen.

View File

@@ -336,6 +336,7 @@ void set_default_settings()
settings->setDefault("enable_auto_exposure", "false");
settings->setDefault("debanding", "true");
settings->setDefault("antialiasing", "none");
settings->setDefault("fxaa", "false");
settings->setDefault("enable_bloom", "false");
settings->setDefault("enable_bloom_debug", "false");
settings->setDefault("enable_volumetric_lighting", "false");

View File

@@ -35,4 +35,10 @@ void migrate_settings()
g_settings->set("touch_interaction_style", value ? "tap_crosshair" : "tap");
g_settings->remove("touch_use_crosshair");
}
// turn FXAA into its own setting
if (g_settings->get("antialiasing") == "fxaa") {
g_settings->setBool("fxaa", true);
g_settings->remove("antialiasing");
}
}