What’s the logic for determining a min/max vector in GLSL?

Quoting from the first source that I could find (PDF), at the top of ยง8.3 Common Functions, page 132:

These all operate component-wise. The description is per component.

Nearly all the functions that operator on vectors but really only make sense for a scalar operate component-wise. (This includes abs, sign, floor, trunc, round, roundEven, ceil, fract, mod, modf, min, max, clamp, mix, step, smoothstep, and a whole lot more.)

So, for example, the min of (1, 3) and (4, -2) is (1, -2).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)