/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../core/shaderLibrary/ShaderOutputOptions","../lib/basicInterfaces","../lib/GLMaterial","../lib/Material","../lib/RenderSlot","./internal/DefaultBufferWriter","./internal/MaterialUtil","../shaders/CheckerBoardTechnique","../shaders/CheckerBoardTechniqueConfiguration"],(function(e,t,r,n,i,a,o,s,u,l,h){"use strict";let c=function(e){function i(t){var r;return(r=e.call(this,t,new f)||this).techniqueConfig=new h.CheckerBoardTechniqueConfiguration,r}t._inheritsLoose(i,e);var a=i.prototype;return a.dispose=function(){},a.getConfiguration=function(e,t){return this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.transparencyPassType=t?t.transparencyPassType:n.TransparencyPassType.NONE,this.techniqueConfig.hasMultipassTerrain=!!t&&t.multipassTerrain.enabled,this.techniqueConfig.cullAboveGround=!!t&&t.multipassTerrain.cullAboveGround,this.techniqueConfig},a.intersect=function(e,t,r,n,i,a,o){return u.intersectTriangleGeometry(e,t,n,i,a,void 0,o)},a.requiresSlot=function(e){let t=o.RenderSlot.OPAQUE_MATERIAL;return this.parameters.transparent&&(t=this.parameters.writeDepth?o.RenderSlot.TRANSPARENT_MATERIAL:o.RenderSlot.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),e===t||e===o.RenderSlot.DRAPED_MATERIAL},a.createGLMaterial=function(e){return e.output===r.ShaderOutput.Color||e.output===r.ShaderOutput.Alpha?new p(e):null},a.createBufferWriter=function(){return new s.DefaultBufferWriter(s.PositionUVLayout)},i}(a.Material),p=function(e){function r(){return e.apply(this,arguments)||this}return t._inheritsLoose(r,e),r.prototype.beginSlot=function(e){return this.ensureTechnique(l.CheckerBoardTechnique,e)},r}(i),f=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).size=[1,1],t.color1=[.75,.75,.75,1],t.color2=[.5,.5,.5,1],t.transparent=!1,t.writeDepth=!0,t.polygonOffset=!1,t}return t._inheritsLoose(r,e),r}(a.MaterialParameters);e.CheckerBoardMaterial=c,e.Parameters=f,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
