declare const _default: "// Uchimura 2017, \"HDR theory and practice\"\n// Math: https://www.desmos.com/calculator/gslcdxvipg\n// Source: https://www.slideshare.net/nikuque/hdr-theory-and-practicce-jp\nvec3 uchimura(vec3 x, float P, float a, float m, float l, float c, float b) {\n float l0 = ((P - m) * l) / a;\n float L0 = m - m / a;\n float L1 = m + (1.0 - m) / a;\n float S0 = m + l0;\n float S1 = m + a * l0;\n float C2 = (a * P) / (P - S1);\n float CP = -C2 / P;\n\n vec3 w0 = vec3(1.0 - smoothstep(0.0, m, x));\n vec3 w2 = vec3(step(m + l0, x));\n vec3 w1 = vec3(1.0 - w0 - w2);\n\n vec3 T = vec3(m * pow(x / m, vec3(c)) + b);\n vec3 S = vec3(P - (P - S1) * exp(CP * (x - S0)));\n vec3 L = vec3(m + a * (x - m));\n\n return T * w0 + L * w1 + S * w2;\n}\n\nvec3 uchimura(vec3 x) {\n const float P = 1.0; // max display brightness\n const float a = 1.0; // contrast\n const float m = 0.22; // linear section start\n const float l = 0.4; // linear section length\n const float c = 1.33; // black\n const float b = 0.0; // pedestal\n\n return uchimura(x, P, a, m, l, c, b);\n}\n\nfloat uchimura(float x, float P, float a, float m, float l, float c, float b) {\n float l0 = ((P - m) * l) / a;\n float L0 = m - m / a;\n float L1 = m + (1.0 - m) / a;\n float S0 = m + l0;\n float S1 = m + a * l0;\n float C2 = (a * P) / (P - S1);\n float CP = -C2 / P;\n\n float w0 = 1.0 - smoothstep(0.0, m, x);\n float w2 = step(m + l0, x);\n float w1 = 1.0 - w0 - w2;\n\n float T = m * pow(x / m, c) + b;\n float S = P - (P - S1) * exp(CP * (x - S0));\n float L = m + a * (x - m);\n\n return T * w0 + L * w1 + S * w2;\n}\n\nfloat uchimura(float x) {\n const float P = 1.0; // max display brightness\n const float a = 1.0; // contrast\n const float m = 0.22; // linear section start\n const float l = 0.4; // linear section length\n const float c = 1.33; // black\n const float b = 0.0; // pedestal\n\n return uchimura(x, P, a, m, l, c, b);\n}\n\n"; export default _default;