My current application often has to convert from float to integers, but glsl seems to lack convertion functions with defined rounding behavoirs:
In fact, I’m asking for this ones:
genIType ifloor (genType)
genIType iround (genType)
genIType iceil (genType)
Of course, they could all be implemented by eg
#define iround(x) (ivec(round(x)))
but I guess there is a better way for the gpu to do so.