UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 2.4 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{freeze as r,create as e,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as t}from"../../../../symbols/support/materialUtils.js";import{isColorOrColorEmission as i}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as o}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{NormalsDoubleSidedMode as l}from"../core/shaderLibrary/shading/Normals.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as a,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as c}from"../lib/OITPass.js";import{OITPolygonOffset as p,oitDepthTest as h,blending as u,getDrawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as T,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{VertexAttribute as O}from"../lib/VertexAttribute.js";import{advancedMRRFactors as b}from"./pbrUtils.js";import{P as E}from"../../../../chunks/Path.glsl.js";import{makePipelineState as P,defaultColorWrite as R,defaultDepthWrite as j,frontFaceCullingParams as I}from"../../../webgl/renderState.js";class A extends o{constructor(){super(...arguments),this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.opacity=1,this.origin=e(),this.modelTransformation=null,this.mrrFactors=b,this.emissiveStrength=0,this.emissiveSource=t.Color,this.emissiveBaseColor=s}}class g extends a{constructor(r,e){super(r,e,new n(E,(()=>import("../shaders/Path.glsl.js"))),L)}initializePipeline(r){const{output:e,transparent:s,hasSlicePlane:t,doubleSidedMode:o,hasOccludees:n,oitPass:a}=r,O=a===c.NONE,b=a===c.FrontFace;return P({blending:i(e)&&s?u(a):null,culling:t&&!s&&o!==l.None?I:null,depthTest:{func:h(a)},depthWrite:O||b?j:null,drawBuffers:m(e,d(a,e)),colorWrite:R,stencilWrite:n?f:null,stencilTest:n?T:null,polygonOffset:O||b?null:p})}}const L=new Map([[O.POSITION,0],[O.PROFILEVERTEXANDNORMAL,1],[O.PROFILERIGHT,2],[O.PROFILEUP,3],[O.SIZEFEATUREATTRIBUTE,4],[O.COLORFEATUREATTRIBUTE,5],[O.OPACITYFEATUREATTRIBUTE,6],[O.OLIDCOLOR,7],[O.PROFILEAUXDATA,8]]);export{A as PathPassParameters,g as PathTechnique,L as vertexAttributeLocations};