/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{colorGamma as o}from"../../../../../../colorUtils.js";import{glsl as r}from"../../shaderModules/glsl.js";function e(e){e.code.add(r`
    const float GAMMA = ${r.float(o)};
    const float INV_GAMMA = ${r.float(1/o)};

    vec4 delinearizeGamma(vec4 color) {
      return vec4(pow(color.rgb, vec3(INV_GAMMA)), color.a);
    }

    vec3 linearizeGamma(vec3 color) {
      return pow(color, vec3(GAMMA));
    }
  `)}export{e as Gamma};
