Does GLSL have any pre-defined constants for +/-infinity or NaN? I\'m doing this as a workaround but I wonder if there is a cleaner way:
// GLSL FRAGMENT SHA
This might work?
const float pos_infinity = uintBitsToFloat(0x7F800000);
const float neg_infinity = uintBitsToFloat(0xFF800000);
"If the encoding of a floating point infinity is passed in parameter x, the resulting floating-point value is the corresponding (positive or negative) floating point infinity"