From 52538b200f8e62b959741693745a167ee04b7670 Mon Sep 17 00:00:00 2001 From: Windy Darian Date: Mon, 25 Feb 2019 23:30:03 -0500 Subject: [PATCH] Fix saturate ScalarFunc in Visual Shader Was getting this error when using a saturate node. This change fixes it. ``` :39 - Invalid arguments for built-in function: max(float,int) drivers\gles3\rasterizer_storage_gles3.cpp:2150 - Condition ' err != OK ' is true. ``` --- scene/resources/visual_shader_nodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index d95e0e2da13..e47069d7231 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -1136,7 +1136,7 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad "round($)", "ceil($)", "fract($)", - "min(max($,0),1)", + "min(max($,0.0),1.0)", "-($)", };