[SOLVED] Shader Graph - How to convert a Vector1 into a bool ?

Hello there,

I know it may seem like a stupid question, but I can’t figure out why the Shader Graph won’t let me plug a Vector1 node into a predicate (bool), whereas it can easily combine other type of variables.
3790003--317926--1.png

Here I have a Step node which has a float (NoiseStrength) in parameter from 0 to 1. I would like to detect if NoiseStrength == 1, and if that’s the case, set the boolean of the Branch Node to true. But for some reason it cannot convert it implicitely for me, and I couldn’t find any Node able to do the conversion for me. Did I miss it, or is there another solution ?

Thank you for your answer.

2 Likes

You need to use a comparison node.

2 Likes

Thank you for your answer, it was exactly what I was looking for :slight_smile:

1 Like

Hi I’ve been trying to find the solution to this. How did the comparison node look, in regards to converting the bool from a float to int?

I don’t really understand the question. You just type “comparison” in the research bar, and the node will contain two float inputs ; the first one is the value you want to compare. It will return true if the first value is greater than the second.