/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{MaskedColorDefinition as o,CreateMaskedFromUInt8NaNColor as r,MultiplyMaskedColors as e}from"./MaskedColor.glsl.js";import{glsl as l}from"../../shaderModules/glsl.js";import{IntegerPassUniform as d}from"../../shaderModules/IntegerPassUniform.js";import{colorMixModes as a}from"../../../materials/internal/MaterialUtil.js";function i(i,s){i.varyings.add("colorMixMode","int"),i.varyings.add("opacityMixMode","int"),i.vertex.uniforms.add(new d("symbolColorMixMode",o=>a[o.colorMixMode])),s.hasSymbolColors?(i.vertex.include(o),i.vertex.include(r),i.vertex.include(e),i.attributes.add("symbolColor","vec4"),i.vertex.code.add(l`
    MaskedColor applySymbolColor(MaskedColor color) {
      return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
    }
  `)):i.vertex.code.add(l`MaskedColor applySymbolColor(MaskedColor color) {
return color;
}`),i.vertex.code.add(l`
    void forwardColorMixMode(bvec4 mask) {
      colorMixMode = mask.r ? ${l.int(a.ignore)} : symbolColorMixMode;
      opacityMixMode = mask.a ? ${l.int(a.ignore)} : symbolColorMixMode;
    }
  `)}export{i as SymbolColor};
