diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2019-04-13 18:58:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 18:58:01 +0300 |
commit | 89efaf5e78ca3938f08263b012903a19ea57e988 (patch) | |
tree | 327b418665e322dde19659cd5dfbe6be28f46e1f /scene/resources/visual_shader.cpp | |
parent | b7cf4c2050dfd51521522c874676e96d2e5c4762 (diff) | |
parent | 87f87839a63091d373ab7b8d066c89e4c4583109 (diff) |
Merge pull request #27980 from Chaosus/vs_conditional
Added conditional nodes to visual shaders
Diffstat (limited to 'scene/resources/visual_shader.cpp')
-rw-r--r-- | scene/resources/visual_shader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |