diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-20 19:44:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-20 19:44:58 +0100 |
commit | b0ba9468ee40dad636dc9c5cd7b53c24041390d8 (patch) | |
tree | 6b5203b1860ba482065803f3f54dfa7542984311 /scene/resources | |
parent | 91a57b5b6a567ff10e30f4c0f1385c78e39ca284 (diff) | |
parent | 79a75cd68337820a3ae7e5f1f556bbebab138dd8 (diff) |
Merge pull request #58363 from Sauermann/fix-3max
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index f2479199ee..a6aa6d8c49 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -2843,8 +2843,7 @@ String VisualShaderNodeColorFunc::generate_code(Shader::Mode p_mode, VisualShade code += " vec3 c = " + p_input_vars[0] + ";\n"; code += " float max1 = max(c.r, c.g);\n"; code += " float max2 = max(max1, c.b);\n"; - code += " float max3 = max(max1, max2);\n"; - code += " " + p_output_vars[0] + " = vec3(max3, max3, max3);\n"; + code += " " + p_output_vars[0] + " = vec3(max2, max2, max2);\n"; code += " }\n"; break; case FUNC_SEPIA: |