/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","./ShaderOutputOptions","./attributes/VertexPosition.glsl","../shaderModules/Float2PassUniform","../shaderModules/interfaces"],(function(e,r,a,t,o){"use strict";function d(e,d){d.output===r.ShaderOutput.Color&&d.receiveShadows?(e.varyings.add("linearDepth","float"),e.vertex.code.add(o.glsl`void forwardLinearDepth() { linearDepth = gl_Position.w; }`)):d.output===r.ShaderOutput.Depth||d.output===r.ShaderOutput.Shadow?(e.include(a.VertexPosition,d),e.varyings.add("linearDepth","float"),e.vertex.uniforms.add(new t.Float2PassUniform("nearFar",((e,r)=>r.camera.nearFar))),e.vertex.code.add(o.glsl`void forwardLinearDepth() {
linearDepth = (-vPosition_view.z - nearFar[0]) / (nearFar[1] - nearFar[0]);
}`)):e.vertex.code.add(o.glsl`void forwardLinearDepth() {}`)}e.ForwardLinearDepth=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
