Conditional statement in material

Hi,
how can I use conditional statement (if) in material?

I didn’t find any info in official documentation about that. I don’t understand how it works. Why A >= B and A < B are on input?. Why A == B and B aren’t highlighted? And what is on output?

Regards,

http://s30.postimg.org/z9sfhkdrl/condition.png

1 Like

The IF expression will compare whatever you put into A and B. Then based on that, will output what is plugged into one of the bottom 3 inputs. Here’s a super simple example. In this case, the expression outputs blue because A (0) < B (100).

6 Likes

But if I have more than three colors, how can I do?