Operators & Expressions

Precedence (high → low) [] index, () function call/constructor, . member/swizzle, ++ -- postfix ++ -- prefix, unary + - ~ ! ^^ (logical XOR)

%, bitwise operators and shifts work on int/uint (and vectors) only.

== on vectors returns a single bool (all equal); use equal(), lessThan(), etc. for component-wise comparisons returning bvec.

Division by zero yields undefined results (often Inf/NaN for floats).

No implicit bool conversion in conditions: if (x) requires x to be bool.

bvec3 gt = greaterThan(a, b);
if (any(gt)) { ... }
if (all(equal(a, b))) { ... }
bvec3 nb = not(gt);