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, only one of which is ultimately used.



How to Use

The pixel values of the two textures to be compared are taken as reference and the result depends on your chosen logic operator. 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.