/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as t,isHittest as s,getFeatureTextures as r,getFeatureUniforms as a,resolveDynamicUniforms as i,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{TextShader as o}from"./TextShader.js";class u extends e{constructor(){super(...arguments),this.type=32,this.shaders={geometry:new o},this.symbologyPlane=3}render(e,o){const{painter:u}=e,d=t(e),m=o.instance.getInput(),p={shader:this.shaders.geometry,uniforms:{...i(e,o.target,m.uniforms),...a(e,o.target),mosaicInfo:u.textureManager.getMosaicInfo(e,o.textureKey)},textures:{...r(e),mosaicTexture:u.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...d,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:m.optionalAttributes,useComputeBuffer:s(e)};u.setShader(p),u.setPipelineState(n(e)),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),u.submitDraw(e,o)}}export{u as TextTechnique};
