Browse Source

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.
```
Windy Darian 6 years ago
parent
commit
52538b200f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/resources/visual_shader_nodes.cpp

+ 1 - 1
scene/resources/visual_shader_nodes.cpp

@@ -1136,7 +1136,7 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad
 		"round($)",
 		"round($)",
 		"ceil($)",
 		"ceil($)",
 		"fract($)",
 		"fract($)",
-		"min(max($,0),1)",
+		"min(max($,0.0),1.0)",
 		"-($)",
 		"-($)",
 	};
 	};