/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilToolMaskBase as l,stencilBaseAllZeros as o,stencilWriteMaskOn as n,depthCompareLess as a}from"../lib/StencilUtils.js";import{PositionColorGLLayout as p,PositionGLLayout as u}from"../materials/DefaultLayouts.js";import{N as c}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as d,defaultDepthWrite as f,unpremultipliedAlphaToPremultipliedAlpha as j}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?p:u),this.shader=new t(c,()=>import("./NativeLine.glsl.js")),this.primitiveType=m.LINES}initializePipeline(e){const{hasOccludees:r,output:t,transparent:s}=e,p=(e,i=null,t=null)=>h({blending:i,depthTest:a,depthWrite:t,colorWrite:d,stencilWrite:r?n:null,stencilTest:r?e?l:o:null});return i(t)?(this._occludeePipeline=p(!0,s?j:null,f),p(!1,s?j:null,f)):p(!1)}getPipeline(e,r,i){return i?this._occludeePipeline:super.getPipeline(e,r,i)}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
