@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
15 lines (13 loc) • 2.39 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{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as g}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as v}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";function c(c){const m=new b,{vertex:u,fragment:w,attributes:p,varyings:f}=m,{vvColor:h,hasVertexColors:C}=c;return d(u,c),m.include(r,c),m.include(i,c),m.include(s,c),m.include(o,c),w.include(e,c),m.include(v,c),m.include(l,c),p.add(g.POSITION,"vec3"),h&&p.add(g.COLORFEATUREATTRIBUTE,"float"),C||f.add("vColor","vec4"),f.add("vpos","vec3"),u.uniforms.add(new n("uColor",(e=>e.color))),u.main.add(a`
vpos = position;
forwardNormalizedVertexColor();
forwardObjectAndLayerIdColor();
${C?"vColor *= uColor;":h?"vColor = uColor * interpolateVVColor(colorFeatureAttribute);":"vColor = uColor;"}
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
gl_Position = transformPosition(proj, view, vpos);`),w.include(t),w.main.add(a`discardBySlice(vpos);
discardByTerrainDepth();
outputColorHighlightOID(vColor, vpos);`),m}const m=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{m as C,c as b};