Skip to content

Added conditional nodes to visual shaders#27980

Merged
Chaosus merged 1 commit into
godotengine:masterfrom
Chaosus:vs_conditional
Apr 13, 2019
Merged

Added conditional nodes to visual shaders#27980
Chaosus merged 1 commit into
godotengine:masterfrom
Chaosus:vs_conditional

Conversation

@Chaosus

@Chaosus Chaosus commented Apr 13, 2019

Copy link
Copy Markdown
Member

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.

image

@Darkinggq

Copy link
Copy Markdown

glad to see added If and Switch :)

@Chaosus
Chaosus force-pushed the vs_conditional branch 4 times, most recently from 36e85b0 to c7583c9 Compare April 13, 2019 15:15
@Chaosus

Chaosus commented Apr 13, 2019

Copy link
Copy Markdown
Member Author

Well, I think it fine and @reduz said it's nice at IRC, so let's merge...

@Chaosus
Chaosus merged commit 89efaf5 into godotengine:master Apr 13, 2019
@Chaosus
Chaosus deleted the vs_conditional branch April 13, 2019 16:00
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 + "))";

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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

@hpvb

hpvb commented Apr 20, 2019

Copy link
Copy Markdown
Member

Consider for 3.1.2

@Chaosus

Chaosus commented Apr 21, 2019

Copy link
Copy Markdown
Member Author

@hpvb Ah, This PR contains boolean nodes - they were introduced in #26164

@hpvb

hpvb commented Apr 22, 2019

Copy link
Copy Markdown
Member

@Chaosus we will look into taking just those from that PR then maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment