The addition and subtraction operators return the class of the nearest common ancestor when the right-side operands are of different signs. The following code provides examples of usage and miscellaneous exceptions.
Syntax Usage for Addition and Subtraction Operators
Return nearest common ancestor type, I16vec4.
The equality and inequality comparison operands can have mixed signedness, but they must be of the same size. The comparison operators for less-than and greater-than must be of the same sign and size.
Example of Syntax Usage for Comparison Operator
The nearest common ancestor is returned for compare for equal/not-equal operations.
For conditional select operands, the third and fourth operands determine the type returned. Third and fourth operands with same size, but different signedness, return the nearest common ancestor data type.
Conditional Select Syntax Usage
Return the nearest common ancestor data type if third and fourth operands are of the same size, but different signs.