/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{OutputDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{Float2PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{NoParameters as m}from"../views/webgl/NoParameters.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";class c extends m{constructor(){super(...arguments),this.origin=t,this.cutFillCamera={projectionMatrix:r(),viewMatrix:r(),nearFar:i()}}}function p(r){const i=new d,{vertex:t,fragment:m,varyings:c,attributes:p}=i;return i.include(o),i.include(a,r),p.add("position","vec3"),c.add("depth","float",{invariant:!0}),t.uniforms.add(new l("proj",e=>e.cutFillCamera.projectionMatrix),new l("view",r=>e(f,r.cutFillCamera.viewMatrix,r.origin)),new s("nearFar",e=>e.cutFillCamera.nearFar)),t.main.add(n`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, depth);`),m.main.add(n`fragColor = vec4(1.0);
outputDepth(depth);`),i}const f=r(),g=Object.freeze(Object.defineProperty({__proto__:null,CutFillTargetDepthParameters:c,build:p},Symbol.toStringTag,{value:"Module"}));export{c as C,g as a,p as b};
