Docs

Compare

Compares A against B and hands back 1 or 0. A mask you multiply with, not a branch.

Compare node

The Compare node

When to use it

Compares A against B and hands back 1 or 0. A mask you multiply with, not a branch.

When the answer is going to be multiplied anyway, this beats Branch and If. The graph stays flat and you avoid the hard edge a branch puts into the field.

The 0/1 edge is still an edge. Anywhere the transition will be visible as geometry, SmoothStep or a Select with a falloff looks better.

Pins

Pin Type Description
A Number The left side of the comparison.
B Number The right side of the comparison.
Tolerance Number Only matters for Equal and Not Equal. Two values closer together than this count as the same.
Comparison Choice Which test to run. Wire a Compare Op node in here to switch it from the graph.
Pin Type Description
Mask Number 1 when the comparison holds, 0 when it does not.