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