glsl: Simplify built-in generator functions for min3/max3/mid3.