1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add dithering (#9014)

This commit is contained in:
HybridDog 2023-12-19 20:18:11 +01:00 committed by GitHub
parent 5d3e830176
commit b1aec1b5c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 0 deletions

View file

@ -767,6 +767,9 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
shaders_header << "#define SSAA_SCALE " << ssaa_scale << ".\n";
}
if (g_settings->getBool("debanding"))
shaders_header << "#define ENABLE_DITHERING 1\n";
shaders_header << "#line 0\n"; // reset the line counter for meaningful diagnostics
std::string common_header = shaders_header.str();