added some error checking for avoiding passing NaN and values over the maximum to uniform4f