- // error at beta = 0.000094
- // error at 1.0 = 0.000094
- set_uniform_float(glsl_program_num, prefix, "linear_scale", 1.0 / 12.92);
- set_uniform_float(glsl_program_num, prefix, "c0", 0.001324469581);
- set_uniform_float(glsl_program_num, prefix, "c1", 0.02227416690);
- set_uniform_float(glsl_program_num, prefix, "c2", 0.5917615253);
- set_uniform_float(glsl_program_num, prefix, "c3", 0.4733532353);
- set_uniform_float(glsl_program_num, prefix, "c4", -0.08880738120);
- set_uniform_float(glsl_program_num, prefix, "beta", 0.04045);
+ // error at beta = 0.000012
+ // error at 1.0 = 0.000012
+ //
+ // Note that the worst _relative_ error by far is just at the beginning
+ // of the exponential curve, ie., just around β.
+ uniform_linear_scale = 1.0 / 12.92;
+ uniform_c0 = 0.001324469581;
+ uniform_c1 = 0.02227416690;
+ uniform_c2 = 0.5917615253;
+ uniform_c3 = 0.4733532353;
+ uniform_c4 = -0.08880738120;
+ uniform_beta = 0.04045;