/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["require","exports","../../../../chunks/_rollupPluginBabelHelpers","../core/shaderTechnique/ReloadableShaderModule","../core/shaderTechnique/ShaderTechnique","../lib/DefaultVertexAttributeLocations","../lib/Program","../../../../chunks/Compositing.glsl","./CompositingTechniqueConfiguration","../../../webgl/enums","../../../webgl/renderState"],(function(e,i,t,r,n,o,a,l,u,s,c){"use strict";let d=function(e){function i(){return e.apply(this,arguments)||this}t._inheritsLoose(i,e);var r=i.prototype;return r.initializeProgram=function(e){const t=i.shader.get().build(this.configuration);return new a.Program(e.rctx,t,o.Default3D)},r.initializePipeline=function(){if(this.configuration.function===u.CompositingFunction.TransparentToHUDVisibility)return c.makePipelineState({colorWrite:{r:!1,g:!0,b:!1,a:!1}});switch(this.configuration.alphaMode){case u.AlphaMode.None:return c.makePipelineState({colorWrite:c.defaultColorWriteParams});case u.AlphaMode.Alpha:return c.makePipelineState({blending:c.separateBlendingParams(s.BlendFactor.SRC_ALPHA,s.BlendFactor.ONE,s.BlendFactor.ONE_MINUS_SRC_ALPHA,s.BlendFactor.ONE_MINUS_SRC_ALPHA),colorWrite:c.defaultColorWriteParams});default:return c.makePipelineState({blending:c.simpleBlendingParams(s.BlendFactor.ONE,s.BlendFactor.ONE_MINUS_SRC_ALPHA),colorWrite:c.defaultColorWriteParams})}},i}(n.ShaderTechnique);d.shader=new r.ReloadableShaderModule(l.Compositing,(()=>new Promise(((i,t)=>e(["./Compositing.glsl"],i,t))))),i.CompositingTechnique=d,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
