Increase dithering in the PhysicalSkyMaterial shader to combat banding

Banding should now be much less visible when using the default
PhysicalSkyMaterial settings.
This commit is contained in:
Hugo Locurcio 2020-12-09 01:40:08 +01:00
parent 90bdba576a
commit 88f70b0c05
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 1 additions and 1 deletions

View File

@ -568,7 +568,7 @@ PhysicalSkyMaterial::PhysicalSkyMaterial() {
code += "\tCOLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));\n"; code += "\tCOLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));\n";
code += "\tCOLOR *= exposure;\n"; code += "\tCOLOR *= exposure;\n";
code += "\t// Make optional, eliminates banding\n"; code += "\t// Make optional, eliminates banding\n";
code += "\tCOLOR += (hash(EYEDIR * 1741.9782) * 0.08 - 0.04) * 0.008 * dither_strength;\n"; code += "\tCOLOR += (hash(EYEDIR * 1741.9782) * 0.08 - 0.04) * 0.016 * dither_strength;\n";
code += "}\n"; code += "}\n";
shader = RS::get_singleton()->shader_create(); shader = RS::get_singleton()->shader_create();