notEqual
Performs a 'not equal to' (!=) comparison on two inputs, serving as a fundamental node for conditional filtering, logical exclusion, and control flow.
Core Advantages
By providing the core 'not equal to' check, it enables easy filtering and exclusion of specific data, and expresses inverse conditions more intuitively and concisely than combining other logical operators.
Common Uses
Excluding specific objects by their ID to apply special effects or highlighting to everything else.
Creating geometric patterns by comparing procedural values like grid coordinates, such as masking everything except a diagonal line.
Detecting if a value has changed between frames to trigger a one-shot animation or effect.
Used in safe comparisons with floating-point numbers, such as checking if a value is not zero to prevent division-by-zero errors.
How to adjust
Adjusting this node means changing its inputs, A or B. For example, changing `notEqual(value, 0)` to `notEqual(value, 1)` alters the logical baseline, which in turn changes which areas are 'excluded' or selected by the condition.
Code Examples
1// Map UV coordinates to a 10x10 integer grid
2const gridCoords = ivec2( floor( uv().mul( 10 ) ) );
3
4// Condition is true if the grid's X and Y coordinates are not equal
5const isNotOnDiagonal = notEqual( gridCoords.x, gridCoords.y );