-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added conditional nodes to visual shaders #27980
Conversation
glad to see added If and Switch :) |
36e85b0
to
c7583c9
Compare
Well, I think it fine and @reduz said it's nice at IRC, so let's merge... |
@@ -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 + "))"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an unrelated bugfix? I want to pull this into 3.1.x but I'm not sure about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed conversion between vector and boolean.
It's safe to merge because it's not used anywhere before this PR
Consider for 3.1.2 |
@Chaosus we will look into taking just those from that PR then maybe. |
Added If and Switch nodes similar to UE4, however, I've changed the order of parameters a bit. Also renamed "Boolean" category to "Conditional", and fixed conversion between vector and boolean.