From 88f70b0c05bd9d09a2954c6e4d02c95ebb9bac0c Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 9 Dec 2020 01:40:08 +0100 Subject: [PATCH] Increase dithering in the PhysicalSkyMaterial shader to combat banding Banding should now be much less visible when using the default PhysicalSkyMaterial settings. --- scene/resources/sky_material.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index 69e8e0b5bd9..05bb13a1e09 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -568,7 +568,7 @@ PhysicalSkyMaterial::PhysicalSkyMaterial() { code += "\tCOLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));\n"; code += "\tCOLOR *= exposure;\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"; shader = RS::get_singleton()->shader_create();