"If" node won't output a boolean

The “If” node in the material editor refuses to output booleans:

Is there any function accessible from the material editor that accepts two floats and returns a boolean? Or even one that just casts a float to a boolean? I’m trying to drive the Invert Fresnel input of the Fresnel node, which only accepts booleans, but my input data (TwoSidedSign) is a float.

You could make your own bool logic with a Lerp node by using a float for Alpha; 1 means true(A), 0 means false(B).

Thanks, but Lerp is just floats → more floats, and I really need to convert my float into an actual Boolean.The Fresnel node’s “Invert Fresnel” input requires a real bool - it refuses to cast a float as a bool.

You can invert it with OneMinus node as well. If you open up that Fresnel function you’ll see that it also uses a OneMinus. Also keep in mind that static bools cannot be set in runtime.

Ah, thank you!