
float colormap_blue(float x) {
    if (x < (1.03175883256528E+03 + 4.87540173259576E+02) / (3.86517065024528E+00 + 4.04377880184332E+00)) {
        return 3.86517065024528E+00 * x - 4.87540173259576E+02;
    } else {
        return -4.04377880184332E+00 * x + 1.03175883256528E+03;
    }
}

vec4 colormap(float x) {
    float t = x * 255.0;
    float r = clamp(colormap_red(t) / 255.0, 0.0, 1.0);
    float g = clamp(colormap_green(t) / 255.0, 0.0, 1.0);
    float b = clamp(colormap_blue(t) / 255.0, 0.0, 1.0);