Skip to content

Commit

Permalink
Merge pull request godotengine#44206 from Calinou/physical-sky-increa…
Browse files Browse the repository at this point in the history
…se-dithering

Increase dithering in the PhysicalSkyMaterial shader to combat banding
  • Loading branch information
akien-mga authored Dec 9, 2020
2 parents 719d698 + 88f70b0 commit f9e3750
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/resources/sky_material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f9e3750

Please sign in to comment.