@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.98 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{IntegratedMeshMode as e}from"./ComponentTechniqueConfiguration.js";import{C as r}from"../../../../../../chunks/ComponentShader.glsl.js";import{isColorOrColorEmission as t,ShaderOutput as o}from"../../../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as n}from"../../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../../../core/shaderTechnique/ShaderTechnique.js";import{StencilBits as i}from"../../../lib/basicInterfaces.js";import{OITPass as l}from"../../../lib/OITPass.js";import{blending as a,oitDepthTest as c,getDrawBuffers as m,OITPolygonOffset as u}from"../../../lib/OrderIndependentTransparency.js";import{stencilWriteMaskOn as d,replaceBitWhenDepthTestPasses as p,stencilBaseAllZerosParams as f}from"../../../lib/StencilUtils.js";import{VertexAttribute as h}from"../../../lib/VertexAttribute.js";import{SpecialDrawBuffers as O}from"../../../../../webgl/enums.js";import{makePipelineState as b,cullingParams as j,defaultDepthWrite as g,defaultColorWrite as N}from"../../../../../webgl/renderState.js";class M extends s{constructor(e,t){super(e,t,new n(r,(()=>import("./shader/ComponentShader.glsl.js"))),S)}initializePipeline(r){const{integratedMeshMode:n,output:s,blendingEnabled:h,cullFace:M,hasOccludees:S,hasPolygonOffset:T,oitPass:E}=r,C=n!==e.None,I=E===l.NONE,P=E===l.FrontFace;return b({blending:t(s)&&h?a(E):null,culling:j(M),depthTest:{func:c(E)},depthWrite:I||P?g:null,drawBuffers:s===o.Depth?{buffers:[O.NONE]}:m(E,s),colorWrite:N,stencilWrite:C||S?d:null,stencilTest:C?p(i.IntegratedMeshMaskExcluded):S?f:null,polygonOffset:I||P?T?{factor:2,units:2}:null:u})}}const S=new Map([[h.POSITION,0],[h.NORMAL,1],[h.NORMALCOMPRESSED,1],[h.COLOR,2],[h.UV0,3],[h.UVREGION,4],[h.COMPONENTINDEX,5]]);export{M as ComponentTechnique,S as vertexAttributeLocations};