Merge pull request #58363 from Sauermann/fix-3max

This commit is contained in:
Rémi Verschelde 2022-02-20 19:44:58 +01:00 committed by GitHub
commit b0ba9468ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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: