The Compare node offers you the ability to use a logical comparison operator as a way to combine textures. The node takes four inputs. The first two inputs are the textures that will be compared. The second two inputs are the result of the comparison.

how to use

The use of this node is simple but it takes a while to understand at the beginning. The pixel values of the 2 texture to be compared are taken as reference and the result depends on your chosen logic operator. Now let's look at the simplest example below:

"IF A>=B" or "IF A<B"

As shown in the following example, if the input "A" is equal to or greater than the input "B", the orange color is active. The important thing here is the numeric pixel value of the data in the Input channel. In the example, each pixel value of the input "A" is 194. So if we assign an RGB spectrum node to "If A> = B", the result is orange. If you go through this logic and change the locations of 2 input nodes, the result will be blue. So you will have a better understanding of the logic operator's function. With this simple logic you can combine many textures or create different texture effects.