Linear to hybrid linear-gamma transfer function. The function and parameters are detailed in the example below.
// sRGB parameters enum a = 1.055; enum b = 0.0031308; enum s = 12.92; enum e = 1/2.4; double v = 0.5; // the gamma function if (v <= b) v = v*s; else v = a*v^^e - (a - 1); assert(abs(v - linearToHybridGamma!(a, b, s, e)(0.5)) < double.epsilon);
See Implementation
Linear to hybrid linear-gamma transfer function. The function and parameters are detailed in the example below.