/*
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/shaderLibrary/ShaderOutputOptions","../core/shaderTechnique/ReloadableShaderModule","../core/shaderTechnique/ShaderTechnique","../lib/basicInterfaces","../lib/DefaultVertexAttributeLocations","../lib/OrderIndependentTransparency","../lib/Program","../lib/StencilUtils","../../../../chunks/ColorMaterial.glsl","../../../webgl/renderState"],(function(e,t,i,n,r,a,l,s,o,u,c,p,h){"use strict";let d=function(e){function t(){return e.apply(this,arguments)||this}i._inheritsLoose(t,e);var r=t.prototype;return r.initializeProgram=function(e){const i=t.shader.get().build(this.configuration);return new u.Program(e.rctx,i,s.Default3D)},r._createPipeline=function(e,t){const i=this.configuration,r=e===l.TransparencyPassType.NONE,a=e===l.TransparencyPassType.FrontFace;return h.makePipelineState({blending:i.output!==n.ShaderOutput.Color&&i.output!==n.ShaderOutput.Alpha||!i.transparent?null:r?o.blendingDefault:o.oitBlending(e),culling:h.cullingParams(i.cullFace),depthTest:{func:o.oitDepthTest(e)},depthWrite:r||a?i.writeDepth&&h.defaultDepthWriteParams:null,colorWrite:h.defaultColorWriteParams,stencilWrite:i.hasOccludees?c.stencilWriteMaskOn:null,stencilTest:i.hasOccludees?t?c.stencilToolMaskBaseParams:c.stencilBaseAllZerosParams:null,polygonOffset:r||a?i.polygonOffset&&f:o.getOITPolygonOffset(i.enableOffset)})},r.initializePipeline=function(){return this._occludeePipelineState=this._createPipeline(this.configuration.transparencyPassType,!0),this._createPipeline(this.configuration.transparencyPassType,!1)},r.getPipelineState=function(t,i){return i?this._occludeePipelineState:e.prototype.getPipelineState.call(this,t,i)},t}(a.ShaderTechnique);d.shader=new r.ReloadableShaderModule(p.ColorMaterial,(()=>new Promise(((t,i)=>e(["./ColorMaterial.glsl"],t,i)))));const f={factor:1,units:1};t.ColorMaterialTechnique=d,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
