mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add antialiasing filters (FXAA, SSAA) (#13253)
This commit is contained in:
parent
442d5fc75c
commit
c09a3a52ac
10 changed files with 230 additions and 17 deletions
|
@ -780,6 +780,12 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
|
|||
if (g_settings->getBool("enable_auto_exposure"))
|
||||
shaders_header << "#define ENABLE_AUTO_EXPOSURE 1\n";
|
||||
|
||||
if (g_settings->get("antialiasing") == "ssaa") {
|
||||
shaders_header << "#define ENABLE_SSAA 1\n";
|
||||
u16 ssaa_scale = MYMAX(2, g_settings->getU16("fsaa"));
|
||||
shaders_header << "#define SSAA_SCALE " << ssaa_scale << ".\n";
|
||||
}
|
||||
|
||||
shaders_header << "#line 0\n"; // reset the line counter for meaningful diagnostics
|
||||
|
||||
std::string common_header = shaders_header.str();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue