/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/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{drawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as l,stencilBaseAllZerosParams as n,stencilWriteMaskOn as a,depthCompareLess as p}from"../lib/StencilUtils.js";import{PositionColorGLLayout as u,PositionGLLayout as c}from"../materials/DefaultLayouts.js";import{N as m}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as f,defaultDepthWrite as j,unpremultipliedAlphaToPremultipliedAlpha as b}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?u:c),this.shader=new t(m,()=>import("./NativeLine.glsl.js")),this.primitiveType=d.LINES}initializePipeline(e){const{hasOccludees:r,output:t,hasEmission:s,transparent:u,oitPass:c}=e,m=(e,i=null,t=null)=>h({blending:i,depthTest:p,depthWrite:t,colorWrite:f,stencilWrite:r?a:null,stencilTest:r?e?l:n:null,drawBuffers:o(c,s)});return i(t)?(this._occludeePipeline=m(!0,u?b:null,j),m(!1,u?b:null,j)):m(!1)}getPipeline(e,r){return r?this._occludeePipeline:super.getPipeline(e)}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
