|
So, if you ever see somebody proposing this
float a = mix( b, c, step( y, x ) );
The author seems unaware of float a = mix( b, c, y > x );
which encodes the desired behavior and also works for vectors: The variants of mix where a is genBType select which vector each returned component comes from. For a component of a that is false, the corresponding component of x is returned. For a component of a that is true, the corresponding component of y is returned.
|