From 52538b200f8e62b959741693745a167ee04b7670 Mon Sep 17 00:00:00 2001 From: Windy Darian Date: Mon, 25 Feb 2019 23:30:03 -0500 Subject: 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(-) (limited to 'scene/resources') diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index d95e0e2da1..e47069d723 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)", "-($)", }; -- cgit v1.2.3