/*
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/basicInterfaces","../lib/DefaultVertexAttributeLocations","../lib/OrderIndependentTransparency","../lib/Program","../../../../chunks/CheckerBoard.glsl","../../../webgl/enums","../../../webgl/renderState"],(function(e,t,r,n,i,a,o,s,l,c,u,d){"use strict";let h=function(e){function t(){return e.apply(this,arguments)||this}r._inheritsLoose(t,e);var n=t.prototype;return n.initializeProgram=function(e){const r=t.shader.get().build(this.configuration);return new l.Program(e.rctx,r,o.Default3D)},n._setPipelineState=function(e){const t=this.configuration,r=e===a.TransparencyPassType.NONE,n=e===a.TransparencyPassType.FrontFace;return d.makePipelineState({blending:t.transparent?r?f:s.oitBlending(e):null,depthTest:{func:s.oitDepthTest(e)},depthWrite:r?t.writeDepth&&d.defaultDepthWriteParams:s.oitDepthWrite(e),colorWrite:d.defaultColorWriteParams,polygonOffset:r||n?t.polygonOffset&&p:{factor:-1,units:-25}})},n.initializePipeline=function(){return this._setPipelineState(this.configuration.transparencyPassType)},t}(i.ShaderTechnique);h.shader=new n.ReloadableShaderModule(c.CheckerBoard,(()=>new Promise(((t,r)=>e(["./CheckerBoard.glsl"],t,r)))));const p={factor:0,units:-25},f=d.separateBlendingParams(u.BlendFactor.SRC_ALPHA,u.BlendFactor.ONE,u.BlendFactor.ONE_MINUS_SRC_ALPHA,u.BlendFactor.ONE_MINUS_SRC_ALPHA);t.CheckerBoardTechnique=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
