/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
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{addProjViewLocalOrigin as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as n}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function d(d){const g=new a,{vertex:c,fragment:m,varyings:b}=g;return g.fragment.include(e,d),g.include(r),g.include(i,d),g.include(o,d),g.include(n,d),s(c,d),g.attributes.add("position","vec3"),b.add("vpos","vec3",{invariant:!0}),c.main.add(t`vpos = position;
forwardVertexColor();
gl_Position = transformPosition(proj, view, vpos);`),d.hasVertexColors||m.uniforms.add(new l("constantColor",e=>e.color)),m.main.add(t`
    discardBySlice(vpos);
    vec4 color = ${d.hasVertexColors?"vColor":"constantColor"};
    outputColorHighlightOLID(applySlice(color, vpos), color.rgb);
  `),g}const g=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));export{g as N,d as b};
