Inverting 1 to 0 and back with nodes

In order to make an inversion of the boolean value: invert 1 to 0 and 0 back to 1, we only need to use two Math nodes in the Blender node editor.

To invert the boolean value, let’s add two Math nodes to the node tree (shift + a – Utilities – Math).

Switch the first node to the “Subtract” mode. Its upper Value input, we will link with the value that needs to be inverted. Set the value in the second Value input to 1.0.

Switch the second node to the “Absolute” mode.

Link nodes:

By feeding a value of 0 or 1 to the top input of the Subtract node, the output of the Absolute node will give us the opposite value.

This combination of nodes works both in the Geometry Nodes and in the Shader node editor.

0 0 votes
Article Rating
Notify of

0 Comment
Inline Feedbacks
View all comments