/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","./DiscardOrAdjustAlphaBlend.glsl","../../shaderModules/FloatDrawUniform","../../shaderModules/FloatPassUniform","../../shaderModules/interfaces","../../../lib/basicInterfaces"],(function(a,e,d,r,s,l){"use strict";function o(a,e){c(a,e,new r.FloatPassUniform("textureAlphaCutoff",(a=>a.textureAlphaCutoff)))}function t(a,e){c(a,e,new d.FloatDrawUniform("textureAlphaCutoff",(a=>a.textureAlphaCutoff)))}function c(a,d,r){const o=a.fragment;switch(d.alphaDiscardMode!==l.AlphaDiscardMode.Mask&&d.alphaDiscardMode!==l.AlphaDiscardMode.MaskBlend||o.uniforms.add(r),d.alphaDiscardMode){case l.AlphaDiscardMode.Blend:return a.include(e.DiscardOrAdjustAlphaBlend);case l.AlphaDiscardMode.Opaque:o.code.add(s.glsl`void discardOrAdjustAlpha(inout vec4 color) {
color.a = 1.0;
}`);break;case l.AlphaDiscardMode.Mask:o.code.add(s.glsl`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } else { color.a = 1.0; } }`);break;case l.AlphaDiscardMode.MaskBlend:a.fragment.code.add(s.glsl`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } }`)}}a.DiscardOrAdjustAlphaDraw=t,a.DiscardOrAdjustAlphaPass=o,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
