/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as l,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as d}from"./PatternLayouts.js";import{makePipelineState as h,defaultColorWrite as f,cullingParams as P}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,t){super(e,t,r(d(t))),this.shader=new i(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:i,draped:s,hasOccludees:m}=e;return h({blending:n(r),culling:P(i),depthTest:s?null:l(r),depthWrite:o(e),colorWrite:f,stencilWrite:m?c:null,stencilTest:m?t?p:a:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};g=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],g);export{g as PatternTechnique};
