From 87f87839a63091d373ab7b8d066c89e4c4583109 Mon Sep 17 00:00:00 2001 From: Chaosus Date: Sat, 13 Apr 2019 15:24:04 +0300 Subject: Added conditional nodes to visual shaders --- scene/resources/visual_shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/resources/visual_shader.cpp') diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index fdb6f2ce09..4229147ba2 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -782,7 +782,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR) { inputs[i] = "vec3(" + src_var + ")"; } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_VECTOR) { - inputs[i] = "all(" + src_var + ")"; + inputs[i] = "all(bvec3(" + src_var + "))"; } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR) { inputs[i] = src_var + ">0.0?true:false"; } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) { -- cgit v1.2.3