/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../../chunks/mat4","../../../../../../chunks/mat4f32","../../../../../../chunks/vec3","../../../../../../chunks/vec3f64","../../shaderModules/Float3DrawUniform","../../shaderModules/Float3PassUniform","../../shaderModules/Matrix4DrawUniform","../../shaderModules/Matrix4PassUniform"],(function(e,r,a,i,n,s,o,t,c){"use strict";function d(e,r){r.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",n.ZEROS):e.uniforms.add(new s.Float3DrawUniform("cameraPosition",((e,r)=>i.set(v,r.camera.viewInverseTransposeMatrix[3]-e.origin[0],r.camera.viewInverseTransposeMatrix[7]-e.origin[1],r.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function m(e,a){if(e.vertex.uniforms.add(new c.Matrix4PassUniform("proj",((e,r)=>r.camera.projectionMatrix))),a.instancedDoublePrecision){const a=(e,r)=>i.set(v,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]);e.vertex.uniforms.add(new c.Matrix4PassUniform("view",((e,i)=>r.translate(u,i.camera.viewMatrix,a(e,i)))));const n=new o.Float3PassUniform("localOrigin",a);return e.vertex.uniforms.add(n),n}e.vertex.uniforms.add(new t.Matrix4DrawUniform("view",((e,a)=>r.translate(u,a.camera.viewMatrix,e.origin))));const n=new s.Float3DrawUniform("localOrigin",(e=>e.origin));return e.vertex.uniforms.add(n),n}const u=a.create(),v=n.create();e.addCameraPosition=d,e.addProjViewLocalOrigin=m,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
