@arcgis/core 6.0.0-next.27 → 6.0.0-next.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/Map.d.ts +6 -0
  2. package/analysis/AreaMeasurementAnalysis.d.ts +4 -2
  3. package/analysis/DirectLineMeasurementAnalysis.d.ts +8 -4
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{0bd04bcd4b2710838d48.js → 03f33cb78b5405ab7e23.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{7c75a8ee266c36baa902.js → 5eec1c1162779574f46e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{9dd1fc56eb1ea6eb705e.js → 76e27e36050a3dd9d249.js} +1 -1
  8. package/assets/esri/core/workers/chunks/76f877e2d2493d56afab.js +1 -0
  9. package/assets/esri/core/workers/chunks/{00580a68835aac653038.js → 9c4961213ac6ec283dd9.js} +5 -5
  10. package/assets/esri/core/workers/chunks/{13c64087be3b2985a21b.js → dbda982485d3fe26c729.js} +1 -1
  11. package/assets/esri/core/workers/chunks/dc7aa0a1eb6c6e361f9f.js +1 -0
  12. package/chunks/BlendLayers.glsl.js +1 -1
  13. package/chunks/Component.glsl.js +9 -12
  14. package/chunks/GaussianSplat.glsl.js +65 -21
  15. package/chunks/GaussianSplatDepth.glsl.js +45 -4
  16. package/chunks/GaussianSplatShadow.glsl.js +73 -19
  17. package/chunks/GlobalIllumination.glsl.js +2 -17
  18. package/chunks/LineMarker.glsl.js +32 -31
  19. package/chunks/OITAddEmission.glsl.js +1 -1
  20. package/chunks/RasterColorizer.glsl.js +1 -1
  21. package/chunks/RibbonLine.glsl.js +34 -34
  22. package/chunks/Terrain.glsl.js +3 -4
  23. package/chunks/Water.glsl.js +22 -23
  24. package/config.js +1 -1
  25. package/form/elements/inputs/DynamicChoiceInput.d.ts +2 -2
  26. package/geometry/operators/containsOperator.d.ts +1 -1
  27. package/geometry/operators/densifyOperator.d.ts +1 -1
  28. package/geometry/operators/differenceOperator.d.ts +6 -4
  29. package/geometry/operators/distanceOperator.d.ts +1 -1
  30. package/geometry/operators/geodesicProximityOperator.d.ts +8 -8
  31. package/geometry/operators/graphicBufferOperator.d.ts +6 -6
  32. package/geometry/operators/integrateOperator.d.ts +2 -2
  33. package/geometry/operators/intersectsOperator.d.ts +3 -3
  34. package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
  35. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  36. package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
  37. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  38. package/geometry/operators/polygonSlicerOperator.d.ts +2 -2
  39. package/geometry/operators/projectOperator.d.ts +2 -2
  40. package/geometry/operators/proximityOperator.d.ts +15 -15
  41. package/geometry/operators/shapePreservingProjectOperator.d.ts +2 -2
  42. package/geometry/operators/simplifyOperator.d.ts +2 -2
  43. package/geometry/operators/support/GeographicTransformationStep.d.ts +3 -3
  44. package/geometry/operators/support/Transformation.d.ts +8 -8
  45. package/geometry/operators/support/geographicTransformationUtils.d.ts +3 -3
  46. package/geometry/operators/symmetricDifferenceOperator.d.ts +2 -2
  47. package/geometry/operators/withinOperator.d.ts +3 -3
  48. package/kernel.js +1 -1
  49. package/layers/GeospatialPDFLayer.d.ts +2 -2
  50. package/layers/ParquetLayer.d.ts +1 -1
  51. package/package.json +2 -2
  52. package/popup/FeaturesModel.js +1 -1
  53. package/popup/support/featureUtils.js +1 -1
  54. package/rest/featureService/FeatureService.d.ts +0 -5
  55. package/rest/networks/support/TraceLocation.d.ts +2 -1
  56. package/rest/networks/support/TraceResult.d.ts +0 -4
  57. package/rest/support/OutDistance.d.ts +0 -1
  58. package/smartMapping/statistics/histogramForTimeSeries.js +1 -1
  59. package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +1 -1
  60. package/support/BasemapStyle.d.ts +2 -2
  61. package/symbols/cim/types.d.ts +7 -9
  62. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  63. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  64. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  65. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  66. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  67. package/views/3d/analysis/support/projectionUtils.js +1 -1
  68. package/views/3d/environment/SunLighting.d.ts +15 -2
  69. package/views/3d/environment/VirtualLighting.d.ts +15 -2
  70. package/views/3d/input/SceneInputManager.js +1 -1
  71. package/views/3d/input/handlers/ground/GroundMouseWheelMove.js +2 -0
  72. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  73. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  74. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  75. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  76. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  77. package/views/3d/navigation/Navigation3D.js +1 -1
  78. package/views/3d/state/controllers/GroundMouseWheelController.js +2 -0
  79. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  80. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  81. package/views/3d/terrain/BlendLayers.glsl.js +1 -1
  82. package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
  83. package/views/3d/terrain/TileCompositor.js +1 -1
  84. package/views/3d/terrain/TileRenderer.js +1 -1
  85. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +7 -8
  86. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -5
  87. package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +6 -0
  88. package/views/3d/webgl-engine/core/shaderLibrary/shading/getLocalUp.glsl.js +4 -0
  89. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
  90. package/views/3d/webgl-engine/core/shaderLibrary/terrain/{TileBackground.glsl.js → blendLayers.glsl.js} +10 -11
  91. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  92. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  93. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  94. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  95. package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +1 -1
  96. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +61 -108
  97. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  98. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  99. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  100. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  101. package/views/draw/DrawOperation.js +1 -1
  102. package/views/draw/DrawScreenTool.js +1 -1
  103. package/views/input/types.d.ts +2 -4
  104. package/views/interactive/options/LabelOptions.d.ts +5 -5
  105. package/views/interactive/options/SnappingOptions.d.ts +2 -2
  106. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +0 -1
  107. package/widgets/Editor/VisibleElements.d.ts +4 -0
  108. package/widgets/Editor.d.ts +2 -0
  109. package/widgets/FeatureTable.js +1 -1
  110. package/widgets/Features/FeaturesViewModel.js +1 -1
  111. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  112. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  113. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
  114. package/widgets/PanoramicViewer/utils.js +1 -1
  115. package/widgets/Search/LayerSearchSource.d.ts +1 -1
  116. package/widgets/Sketch/VisibleElements.d.ts +4 -0
  117. package/widgets/Sketch.d.ts +2 -0
  118. package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +0 -1
  119. package/assets/esri/core/workers/chunks/c8eae00b0ec87d8b2ff3.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3354,4426],{28491(e,t,r){r.d(t,{b:()=>R});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(72824),d=r(54154),h=r(9169),f=r(12696),m=r(77695),p=r(68785),v=r(28390),g=r(96777),x=r(62602),_=r(20598),b=r(22393),y=r(59469),w=r(56529),M=r(51406),T=r(89435),S=r(58614),C=r(20693),A=r(33079),E=r(31821),I=r(63761),O=r(24111),P=r(84368),D=r(14113);function R(e){let t=new D.N5,{attributes:r,vertex:R,fragment:F,varyings:B}=t,{output:N,normalType:z,offsetBackfaces:L,snowCover:H,pbrMode:V,textureAlphaPremultiplied:U,instancedDoublePrecision:j,hasVertexColors:k,hasVertexTangents:G,hasColorTexture:W,hasNormalTexture:$,hasNormalTextureTransform:Z,hasColorTextureTransform:q}=e;if((0,C.N)(R,e),r.add("position","vec3"),R.inputs.add("position",()=>"position"),B.add("vpos","vec3",{invariant:!0}),t.include(T.A,e),t.include(s.B,e),t.include(d.Ge,e),t.include(M.q2,e),!(0,n._o)(N))return t.include(h.E,e),t;t.include(M.Sx,e),t.include(M.MU,e),t.include(M.O1,e),t.include(M.QM,e),(0,C.y)(R,e),t.include(l.Y,e),t.include(a.d);let Y=0===z||1===z;return Y&&L&&t.include(i.M),t.include(m.J,e),t.include(u.Mh,e),B.add("vPositionLocal","vec3"),t.include(c.U,e),t.include(f.F,e),t.include(j?w.oD:w.rA,e),R.main.add(E.H`
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3354,4426],{28491(e,t,r){r.d(t,{b:()=>R});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(72824),d=r(54154),h=r(9169),f=r(12696),m=r(77695),p=r(68785),v=r(28390),g=r(96777),x=r(62602),_=r(59611),b=r(22393),y=r(59469),w=r(56529),M=r(51406),T=r(89435),S=r(58614),C=r(20693),A=r(33079),E=r(31821),I=r(63761),O=r(24111),P=r(84368),D=r(14113);function R(e){let t=new D.N5,{attributes:r,vertex:R,fragment:F,varyings:B}=t,{output:N,normalType:z,offsetBackfaces:L,snowCover:H,pbrMode:V,textureAlphaPremultiplied:U,instancedDoublePrecision:j,hasVertexColors:k,hasVertexTangents:G,hasColorTexture:W,hasNormalTexture:$,hasNormalTextureTransform:Z,hasColorTextureTransform:q}=e;if((0,C.N)(R,e),r.add("position","vec3"),R.inputs.add("position",()=>"position"),B.add("vpos","vec3",{invariant:!0}),t.include(T.A,e),t.include(s.B,e),t.include(d.Ge,e),t.include(M.q2,e),!(0,n._o)(N))return t.include(h.E,e),t;t.include(M.Sx,e),t.include(M.MU,e),t.include(M.O1,e),t.include(M.QM,e),(0,C.y)(R,e),t.include(l.Y,e),t.include(a.d);let Y=0===z||1===z;return Y&&L&&t.include(i.M),t.include(m.J,e),t.include(u.Mh,e),B.add("vPositionLocal","vec3"),t.include(c.U,e),t.include(f.F,e),t.include(j?w.oD:w.rA,e),R.main.add(E.H`
2
2
  forwardDefaultMaterialExternalColor();
3
3
 
4
4
  vpos = getVertexInLocalOriginSpace();
@@ -59,7 +59,7 @@
59
59
  vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal);
60
60
  vec4 finalColor = vec4(shadedColor, opacity_);
61
61
  outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,E.If)(H,", snow")});
62
- `),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));r.d(t,["D",0,F])},57323(e,t,r){r.d(t,{b:()=>O});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(54154),d=r(9169),h=r(12696),f=r(68785),m=r(28390),p=r(96777),v=r(20598),g=r(22393),x=r(59469),_=r(56529),b=r(51406),y=r(89435),w=r(58614),M=r(20693),T=r(33079),S=r(31821),C=r(63761),A=r(24111),E=r(84368),I=r(14113);function O(e){let t=new I.N5,{attributes:r,vertex:O,fragment:P,varyings:D}=t,{output:R,offsetBackfaces:F,pbrMode:B,snowCover:N}=e,z=1===B||2===B;if((0,M.N)(O,e),r.add("position","vec3"),O.inputs.add("position",()=>"position"),D.add("vpos","vec3",{invariant:!0}),t.include(y.A,e),t.include(s.B,e),t.include(u.Ge,e),t.include(b.q2,e),!(0,n._o)(R))return t.include(d.E,e),t;t.include(b.MU,e),(0,M.y)(t.vertex,e),t.include(l.Y,e),t.include(a.d),F&&t.include(i.M),D.add("vNormalWorld","vec3"),D.add("localvpos","vec3",{invariant:!0}),t.include(c.U,e),t.include(h.F,e),t.include(e.instancedDoublePrecision?_.oD:_.rA,e),O.main.add(S.H`
62
+ `),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));r.d(t,["D",0,F])},57323(e,t,r){r.d(t,{b:()=>O});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(54154),d=r(9169),h=r(12696),f=r(68785),m=r(28390),p=r(96777),v=r(59611),g=r(22393),x=r(59469),_=r(56529),b=r(51406),y=r(89435),w=r(58614),M=r(20693),T=r(33079),S=r(31821),C=r(63761),A=r(24111),E=r(84368),I=r(14113);function O(e){let t=new I.N5,{attributes:r,vertex:O,fragment:P,varyings:D}=t,{output:R,offsetBackfaces:F,pbrMode:B,snowCover:N}=e,z=1===B||2===B;if((0,M.N)(O,e),r.add("position","vec3"),O.inputs.add("position",()=>"position"),D.add("vpos","vec3",{invariant:!0}),t.include(y.A,e),t.include(s.B,e),t.include(u.Ge,e),t.include(b.q2,e),!(0,n._o)(R))return t.include(d.E,e),t;t.include(b.MU,e),(0,M.y)(t.vertex,e),t.include(l.Y,e),t.include(a.d),F&&t.include(i.M),D.add("vNormalWorld","vec3"),D.add("localvpos","vec3",{invariant:!0}),t.include(c.U,e),t.include(h.F,e),t.include(e.instancedDoublePrecision?_.oD:_.rA,e),O.main.add(S.H`
63
63
  forwardDefaultMaterialExternalColor();
64
64
 
65
65
  vpos = getVertexInLocalOriginSpace();
@@ -836,11 +836,11 @@ return vec4(delinearizeGamma(color.rgb), color.a);
836
836
  }
837
837
  vec3 linearizeGamma(vec3 color) {
838
838
  return pow(color, vec3(GAMMA));
839
- }`)}},20598(e,t,r){r.d(t,{n:()=>n});var i=r(31821);function n(e,{spherical:t}){e.code.add(t?"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return normalize(pos + origin); }\n vec3 getLocalUp(in vec3 pos) { return normalize(pos); }":"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return vec3(0.0, 0.0, 1.0); }\n vec3 getLocalUp(in vec3 pos) { return vec3(0.0, 0.0, 1.0); }"),t?e.code.add(i.H`mat3 getTBNMatrix(in vec3 n) {
839
+ }`)}},59611(e,t,r){function i(e,{spherical:t}){e.code.add(t?"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return normalize(pos + origin); }\n vec3 getLocalUp(in vec3 pos) { return normalize(pos); }":"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return vec3(0.0, 0.0, 1.0); }\n vec3 getLocalUp(in vec3 pos) { return vec3(0.0, 0.0, 1.0); }")}r.d(t,{n:()=>o});var n=r(31821);function o(e,t){e.include(i,t),t.spherical?e.code.add(n.H`mat3 getTBNMatrix(in vec3 n) {
840
840
  vec3 t = normalize(cross(vec3(0.0, 0.0, 1.0), n));
841
841
  vec3 b = normalize(cross(n, t));
842
842
  return mat3(t, b, n);
843
- }`):e.code.add(i.H`mat3 getTBNMatrix(in vec3 n) {
843
+ }`):e.code.add(n.H`mat3 getTBNMatrix(in vec3 n) {
844
844
  vec3 t = vec3(1.0, 0.0, 0.0);
845
845
  vec3 b = normalize(cross(n, t));
846
846
  return mat3(t, b, n);
@@ -1093,7 +1093,7 @@ return max(c.x, max(c.y, c.z));
1093
1093
  vec3 hiD = hiA + hiB;
1094
1094
  vec3 loD = loA + loB;
1095
1095
  return dpDummy * hiD + loD;
1096
- }`)}},20693(e,t,r){r.d(t,{y:()=>f,N:()=>m});var i=r(58083),n=r(9093),o=r(35522),a=r(51850),s=r(45324),l=r(23205),c=r(40710),u=r(58029),d=r(74333);class h extends d.n{constructor(e,t,r){super(e,"mat4",2,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",({origin:e},{camera:t})=>(0,o.hZ)(g,t.viewInverseTransposeMatrix[3]-e[0],t.viewInverseTransposeMatrix[7]-e[1],t.viewInverseTransposeMatrix[11]-e[2])))}function m(e,t){t.instancedDoublePrecision?e.uniforms.add(s.rS,new u.F("view",e=>(0,i.Tl)(v,e.camera.viewMatrix,p(e))),new l.d("localOrigin",e=>p(e))):e.uniforms.add(s.rS,new h("view",(e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin)),new c.W("localOrigin",e=>e.origin))}function p({camera:e}){return(0,o.hZ)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11])}const v=(0,n.vt)(),g=(0,a.vt)()},45324(e,t,r){var i=r(37585),n=r(48163),o=r(77108),a=r(23205),s=r(14314),l=r(33094),c=r(58029);new c.F("view",({camera:e})=>e.viewMatrix),new c.F("inverseViewMatrix",({camera:e})=>e.inverseViewMatrix);const u=new c.F("proj",({camera:e})=>e.projectionMatrix),d=(new c.F("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix),new a.d("cameraPosition",({camera:e})=>e.eye),new c.F("viewNormal",({camera:e})=>e.viewInverseTransposeMatrix)),h=new o.E("nearFar",({camera:e})=>e.nearFar),f=(new s.I("viewport",({camera:e})=>e.fullViewport),new l.U("pixelRatio",e=>e.camera.pixelRatio/e.overlayStretch),new l.U("screenPixelSizePerDistance",({camera:e})=>e.screenPixelSizePerDistance),new l.U("worldToScreenPerDistanceRatio",({camera:e})=>1/e.screenPixelSizePerDistance),new l.U("renderPixelSizePerDistance",({camera:e})=>e.renderPixelSizePerDistance),new l.U("metersPerRenderUnit",e=>e.metersPerRenderUnit),new o.E("inverseScreenSize",({camera:e})=>(0,i.hZ)(f,1/e.fullWidth,1/e.fullHeight)),new o.E("pixelToNDC",({camera:e})=>(0,i.hZ)(f,2/e.fullViewport[2],2/e.fullViewport[3])),(0,n.vt)());r.d(t,["HO",0,d,"Y$",0,h,"rS",0,u])},77108(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",0,(i,n)=>i.setUniform2fv(e,t(n),r))}}},68259(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},47286(e,t,r){r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},23205(e,t,r){r.d(t,{d:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",0,(i,n)=>i.setUniform3fv(e,t(n),r))}}},40710(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",2,(i,n,o,a)=>i.setUniform3fv(e,t(n,o,a),r))}}},33079(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",1,(i,n,o)=>i.setUniform3fv(e,t(n,o),r))}}},14314(e,t,r){r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},71988(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,n,o)=>i.setUniform4fv(e,t(n,o),r))}}},33094(e,t,r){r.d(t,{U:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",0,(i,n)=>i.setUniform1f(e,t(n),r))}}},28421(e,t,r){r.d(t,{J:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",2,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},20304(e,t,r){r.d(t,{m:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",1,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},35818(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"int",0,(r,i)=>r.setUniform1i(e,t(i)))}}},35644(e,t,r){r.d(t,{k:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat3",1,(i,n,o)=>i.setUniformMatrix3fv(e,t(n,o),r))}}},58029(e,t,r){r.d(t,{F:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat4",0,(i,n)=>i.setUniformMatrix4fv(e,t(n),r))}}},12791(e,t,r){r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},15976(e,t,r){r.d(t,{o:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"sampler2D",2,(i,n,o)=>i.bindTexture(e,t(n,o),r?.(n,o)))}}},63761(e,t,r){r.d(t,{N:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",1,(r,i,n)=>r.bindTexture(e,t(i,n)))}}},31821(e,t,r){r.d(t,{If:()=>n});const i=(e,...t)=>{let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r};function n(e,t,r=""){return e?t:r}i.int=e=>e.toFixed(),i.uint=e=>`${Math.max(0,e).toFixed()}u`,i.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,i.float=e=>e.toPrecision(8),r.d(t,["H",0,i])},13840(e,t,r){r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},42958(e,t,r){r.d(t,{w:()=>p});var i=r(32198),n=r(69622),o=r(53966),a=r(91429),s=r(63907),l=r(85079),c=r(74038);new c._("position",3,s.pe.FLOAT,0,12);const u=[new c._("position",2,s.pe.FLOAT,0,8)];(0,l.Xk)(u),new c._("position",2,s.pe.FLOAT,0,12),new c._("uv0",2,s.pe.HALF_FLOAT,8,12),r(44208);var d=r(26857),h=r(94656);class f{constructor(e,t,r){this._context=e,this.locations=r,this._textures=new Map,this.source=(0,h.en)()?t:null,t.attributeNames.forEach(e=>{r.has(e)||o.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${e} used in shader`)}),this._glProgram=e.programCache.get(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,+!!t)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,r){this._glProgram.setUniform1f(e,t,r)}setUniform2fv(e,t,r){this._glProgram.setUniform2fv(e,t,r)}setUniform3fv(e,t,r){this._glProgram.setUniform3fv(e,t,r)}setUniform4fv(e,t,r){this._glProgram.setUniform4fv(e,t,r)}setUniformMatrix3fv(e,t,r){this._glProgram.setUniformMatrix3fv(e,t,!1,r)}setUniformMatrix4fv(e,t,r){this._glProgram.setUniformMatrix4fv(e,t,!1,r)}setUniformMatrices4fv(e,t,r){this._glProgram.setUniformMatrices4fv(e,t,!1,r)}setUniform1fv(e,t,r){this._glProgram.setUniform1fv(e,t,r)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){if(d.b.ENABLE_OPTIMIZATIONS)return;let r=e.locations;if(t){let e=new Map(r);t.forEach((t,i)=>e.set(i,r.size+t)),r=e}r.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${Array.from(r.keys())} vs ${Array.from(this.locations.keys())}`),this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,t,r){if(!t?.glName){let r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${Error().stack}`;(0,h.en)()&&console.error(r),t=this._context.emptyTexture}let i=this._ensureTextureUnit(e,t);this._context.useProgram(this);let n=i.unit;this.setUniform1i(e,n),this._context.bindTexture(t,n,!1,r)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var m=r(90644);let p=class extends n.A{constructor(e,t,r){super({}),this._context=e,this._configuration=t,this.primitiveType=s.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=t.key,this.locations=(0,l.Xk)(r??u),this._pipeline=this.initializePipeline(t),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(t.key))return void o.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);let i=this.shader.get().build(t);i.debugName=this.declaredClass,this._program=new f(e.rctx,i,this.locations),this._pipeline=this.initializePipeline(t)}}initialize(){let e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new f(this._context.rctx,e,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t,r){return this._pipeline}initializePipeline(e){return(0,m.Ey)({blending:m.RC,colorWrite:m.kn})}};p=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],p)},51976(e,t,r){r.d(t,{K:()=>s,W:()=>l});var i=r(49186),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var a=r(65786);class s extends a.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){let t=this._parameterBits;this._parameterBits=[...e.bits];let r=this._parameterNames.map(e=>` ${e}: ${this[e]}`).join("\n");return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);let n=e.count||2,o=Math.ceil(Math.log2(n)),a=t._parameterBits,s=0;for(;a[s]+o>16;)s++,s>=a.length&&a.push(0);let l=a[s],c=(1<<o)-1<<l;a[s]+=o,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&c)>>l},set(t){let n=this._parameterBits[s];if((n&c)>>l!==t){if(this._key=null,this._parameterBits[s]=n&~c|+t<<l&c,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&c)>>l)},set(e){let t=this._parameterBits[s];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[s]=t&~c|+e<<l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},16943(e,t,r){r.d(t,{E:()=>n});var i=r(44208);function n(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},24111(e,t,r){r.d(t,{Y:()=>s});var i=r(65261),n=r(23292),o=r(33094),a=r(31821);function s(e,t){t.snowCover&&(e.include(i.C),e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(a.H`float applySnow(vec3 normal, vec3 groundNormal, inout vec3 albedo, inout float ssao) {
1096
+ }`)}},20693(e,t,r){r.d(t,{y:()=>f,N:()=>m});var i=r(58083),n=r(9093),o=r(35522),a=r(51850),s=r(45324),l=r(23205),c=r(40710),u=r(58029),d=r(74333);class h extends d.n{constructor(e,t,r){super(e,"mat4",2,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",({origin:e},{camera:t})=>(0,o.hZ)(g,t.viewInverseTransposeMatrix[3]-e[0],t.viewInverseTransposeMatrix[7]-e[1],t.viewInverseTransposeMatrix[11]-e[2])))}function m(e,t){t.instancedDoublePrecision?e.uniforms.add(s.rS,new u.F("view",e=>(0,i.Tl)(v,e.camera.viewMatrix,p(e))),new l.d("localOrigin",e=>p(e))):e.uniforms.add(s.rS,new h("view",(e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin)),new c.W("localOrigin",e=>e.origin))}function p({camera:e}){return(0,o.hZ)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11])}const v=(0,n.vt)(),g=(0,a.vt)()},45324(e,t,r){var i=r(37585),n=r(48163),o=r(35522),a=r(51850),s=r(77108),l=r(23205),c=r(14314),u=r(33094),d=r(58029);new d.F("view",({camera:e})=>e.viewMatrix),new d.F("inverseViewMatrix",({camera:e})=>e.inverseViewMatrix);const h=new d.F("proj",({camera:e})=>e.projectionMatrix),f=(new d.F("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix),new l.d("cameraPosition",({camera:e})=>e.eye),new d.F("viewNormal",({camera:e})=>e.viewInverseTransposeMatrix)),m=(new l.d("localUpView",({camera:e})=>{let t=e.viewInverseTransposeMatrix;return(0,o.S8)(v,(0,o.hZ)(v,t[8],t[9],t[10]))}),new s.E("nearFar",({camera:e})=>e.nearFar)),p=(new c.I("viewport",({camera:e})=>e.fullViewport),new u.U("pixelRatio",e=>e.camera.pixelRatio/e.overlayStretch),new u.U("screenPixelSizePerDistance",({camera:e})=>e.screenPixelSizePerDistance),new u.U("worldToScreenPerDistanceRatio",({camera:e})=>1/e.screenPixelSizePerDistance),new u.U("renderPixelSizePerDistance",({camera:e})=>e.renderPixelSizePerDistance),new u.U("metersPerRenderUnit",e=>e.metersPerRenderUnit),new s.E("inverseScreenSize",({camera:e})=>(0,i.hZ)(p,1/e.fullWidth,1/e.fullHeight)),new s.E("pixelToNDC",({camera:e})=>(0,i.hZ)(p,2/e.fullViewport[2],2/e.fullViewport[3])),(0,n.vt)()),v=(0,a.vt)();r.d(t,["HO",0,f,"Y$",0,m,"rS",0,h])},77108(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",0,(i,n)=>i.setUniform2fv(e,t(n),r))}}},68259(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},47286(e,t,r){r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},23205(e,t,r){r.d(t,{d:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",0,(i,n)=>i.setUniform3fv(e,t(n),r))}}},40710(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",2,(i,n,o,a)=>i.setUniform3fv(e,t(n,o,a),r))}}},33079(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",1,(i,n,o)=>i.setUniform3fv(e,t(n,o),r))}}},14314(e,t,r){r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},71988(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,n,o)=>i.setUniform4fv(e,t(n,o),r))}}},33094(e,t,r){r.d(t,{U:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",0,(i,n)=>i.setUniform1f(e,t(n),r))}}},28421(e,t,r){r.d(t,{J:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",2,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},20304(e,t,r){r.d(t,{m:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",1,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},35818(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"int",0,(r,i)=>r.setUniform1i(e,t(i)))}}},35644(e,t,r){r.d(t,{k:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat3",1,(i,n,o)=>i.setUniformMatrix3fv(e,t(n,o),r))}}},58029(e,t,r){r.d(t,{F:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat4",0,(i,n)=>i.setUniformMatrix4fv(e,t(n),r))}}},12791(e,t,r){r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},15976(e,t,r){r.d(t,{o:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"sampler2D",2,(i,n,o)=>i.bindTexture(e,t(n,o),r?.(n,o)))}}},63761(e,t,r){r.d(t,{N:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",1,(r,i,n)=>r.bindTexture(e,t(i,n)))}}},31821(e,t,r){r.d(t,{If:()=>n});const i=(e,...t)=>{let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r};function n(e,t,r=""){return e?t:r}i.int=e=>e.toFixed(),i.uint=e=>`${Math.max(0,e).toFixed()}u`,i.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,i.float=e=>e.toPrecision(8),r.d(t,["H",0,i])},13840(e,t,r){r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},42958(e,t,r){r.d(t,{w:()=>p});var i=r(32198),n=r(69622),o=r(53966),a=r(91429),s=r(63907),l=r(85079),c=r(74038);new c._("position",3,s.pe.FLOAT,0,12);const u=[new c._("position",2,s.pe.FLOAT,0,8)];(0,l.Xk)(u),new c._("position",2,s.pe.FLOAT,0,12),new c._("uv0",2,s.pe.HALF_FLOAT,8,12),r(44208);var d=r(26857),h=r(94656);class f{constructor(e,t,r){this._context=e,this.locations=r,this._textures=new Map,this.source=(0,h.en)()?t:null,t.attributeNames.forEach(e=>{r.has(e)||o.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${e} used in shader`)}),this._glProgram=e.programCache.get(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,+!!t)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,r){this._glProgram.setUniform1f(e,t,r)}setUniform2fv(e,t,r){this._glProgram.setUniform2fv(e,t,r)}setUniform3fv(e,t,r){this._glProgram.setUniform3fv(e,t,r)}setUniform4fv(e,t,r){this._glProgram.setUniform4fv(e,t,r)}setUniformMatrix3fv(e,t,r){this._glProgram.setUniformMatrix3fv(e,t,!1,r)}setUniformMatrix4fv(e,t,r){this._glProgram.setUniformMatrix4fv(e,t,!1,r)}setUniformMatrices4fv(e,t,r){this._glProgram.setUniformMatrices4fv(e,t,!1,r)}setUniform1fv(e,t,r){this._glProgram.setUniform1fv(e,t,r)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){if(d.b.ENABLE_OPTIMIZATIONS)return;let r=e.locations;if(t){let e=new Map(r);t.forEach((t,i)=>e.set(i,r.size+t)),r=e}r.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${Array.from(r.keys())} vs ${Array.from(this.locations.keys())}`),this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,t,r){if(!t?.glName){let r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${Error().stack}`;(0,h.en)()&&console.error(r),t=this._context.emptyTexture}let i=this._ensureTextureUnit(e,t);this._context.useProgram(this);let n=i.unit;this.setUniform1i(e,n),this._context.bindTexture(t,n,!1,r)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var m=r(90644);let p=class extends n.A{constructor(e,t,r){super({}),this._context=e,this._configuration=t,this.primitiveType=s.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=t.key,this.locations=(0,l.Xk)(r??u),this._pipeline=this.initializePipeline(t),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(t.key))return void o.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);let i=this.shader.get().build(t);i.debugName=this.declaredClass,this._program=new f(e.rctx,i,this.locations),this._pipeline=this.initializePipeline(t)}}initialize(){let e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new f(this._context.rctx,e,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t,r){return this._pipeline}initializePipeline(e){return(0,m.Ey)({blending:m.RC,colorWrite:m.kn})}};p=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],p)},51976(e,t,r){r.d(t,{K:()=>s,W:()=>l});var i=r(49186),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var a=r(65786);class s extends a.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){let t=this._parameterBits;this._parameterBits=[...e.bits];let r=this._parameterNames.map(e=>` ${e}: ${this[e]}`).join("\n");return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);let n=e.count||2,o=Math.ceil(Math.log2(n)),a=t._parameterBits,s=0;for(;a[s]+o>16;)s++,s>=a.length&&a.push(0);let l=a[s],c=(1<<o)-1<<l;a[s]+=o,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&c)>>l},set(t){let n=this._parameterBits[s];if((n&c)>>l!==t){if(this._key=null,this._parameterBits[s]=n&~c|+t<<l&c,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&c)>>l)},set(e){let t=this._parameterBits[s];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[s]=t&~c|+e<<l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},16943(e,t,r){r.d(t,{E:()=>n});var i=r(44208);function n(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},24111(e,t,r){r.d(t,{Y:()=>s});var i=r(65261),n=r(23292),o=r(33094),a=r(31821);function s(e,t){t.snowCover&&(e.include(i.C),e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(a.H`float applySnow(vec3 normal, vec3 groundNormal, inout vec3 albedo, inout float ssao) {
1097
1097
  float snow = smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
1098
1098
  albedo = delinearizeGamma(mix(linearizeGamma(albedo), vec3(1), snow));
1099
1099
  ssao = mix(ssao, 0.5 + 0.5 * ssao, snow);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933(e,t,l){l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(34711),l(71020),l(72722),l(96336),l(53466),l(54154),l(9169),l(12696),l(68785),l(28390),l(96777),l(20598),l(22393),l(59469),l(56529),l(51406),l(89435),l(58614),l(20693),l(33079),l(31821),l(63761),l(24111),l(84368),l(14113);var s=l(57323)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933(e,t,l){l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(34711),l(71020),l(72722),l(96336),l(53466),l(54154),l(9169),l(12696),l(68785),l(28390),l(96777),l(59611),l(22393),l(59469),l(56529),l(51406),l(89435),l(58614),l(20693),l(33079),l(31821),l(63761),l(24111),l(84368),l(14113);var s=l(57323)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9301],{99301(e,t,r){r.r(t),r.d(t,{applyTextFormattingHTML:()=>ne,createFieldInfoMap:()=>ee,findRelatedLayer:()=>ce,findUtilityNetwork:()=>me,fixTokens:()=>J,formatAttributes:()=>le,formatEditInfo:()=>X,formatValueToFieldInfo:()=>W,getAllFieldInfos:()=>te,getConfigurableFieldsContainer:()=>R,getFieldFormat:()=>j,getFieldInfo:()=>K,getFieldInfoLabel:()=>M,getFixedFieldName:()=>S,getFixedFieldNames:()=>D,getHighlightLayer:()=>k,getHighlightLayerView:()=>x,getPopupLayer:()=>q,getSourceLayer:()=>Z,graphicCallback:()=>A,htmlEntities:()=>re,isAssociatedFeatureSupportedLayer:()=>P,isExpressionField:()=>U,isFeatureSupportedLayer:()=>V,isGraphicForRelatableFeatureSupportedLayer:()=>_,isRelatableFeatureSupportedLayer:()=>Y,isRelatableLayer:()=>Q,isRelatedField:()=>ue,preLayerQueryCallback:()=>pe,preRequestCallback:()=>ye,querySourceLayer:()=>ae,queryUpdatedFeature:()=>oe,shouldOpenInNewTab:()=>E,substituteAttributes:()=>O,substituteFieldsInLinksAndAttributes:()=>H});var n=r(53966),i=r(799),l=r(77548);function a(e){let t=(r=e.origin)&&"layer"in r?r.layer:void 0;var r;return(0,l.F2)(t)?t=t.findSublayerForFeature(e):((0,l.Qz)(t)||(0,l.cM)(t))&&(0,l.UC)(e.sourceLayer)&&(t=e.sourceLayer),t??e.sourceLayer??e.layer}var o=r(97770),u=r(18047),f=r(15426),s=r(39663),d=r(30524),p=r(4560),y=r(43668),c=r(56400);const m=()=>n.A.getLogger("esri.popup.support.featureUtils"),g=/href=(""|'')/gi,h=/(\{([^{\r\n]+)\})/g,b=/'/g,I=/^\s*expression\//i,F=/(\n)/gi,w=/[\u00A0-\u9999<>&]/gim,T=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,C=/^(?:mailto:|tel:)/,N="relationships/",L=(0,o.J2)("short-date-short-time");function Z(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}const v=new Set(["building","knowledge-graph","link-chart","map-image","map-notes","subtype-group","tile"]);function q(e){let t=e?.origin;return(null==t?void 0:v.has(t.type??"")?t.sublayer:t.layer)??e?.layer}function k(e,t){let r=a(e);r&&"layer"in r&&r.layer&&(r=r.layer);let n="subtype-sublayer"===r?.type?r.parent:r;return n&&t?.allLayers.includes(n)?r:e.layer??r}function x(e,t,r){let n="subtype-sublayer"===t.type&&t.parent&&r?.allLayers?.includes(t.parent)?t.parent:r?.allLayers?.includes(t)?t:null;return n?e.when().then(()=>e.whenLayerView(n)):null}async function A({type:e,value:t,event:r}){try{return"function"==typeof t?t(r):await t}catch(n){return void m().error("error",`An error occurred when calling the "${e}" function`,{error:n,graphic:r.graphic,value:t})}}function E(e=""){if(e)return!C.test(e.trim().toLowerCase())}function U(e){return!!e&&I.test(e)}function R(e){let{fieldInfo:t,graphic:r,layer:n}=e;return function({fieldInfo:e,graphic:t}){return!(!e?.fieldName||U(e.fieldName)||ue(e.fieldName)||t?.popupTemplate)}({fieldInfo:t,graphic:r})?(0,l.p2)(n,{graphic:r}):null}function M({expressionInfos:e,fieldInfo:t,graphic:r,isContentFieldInfos:n,layer:i}){if(!t?.fieldName)return null;let l=function(e,t){if(!t||!U(t)||!e)return;let r=t.replace(I,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===r)}(e,t.fieldName);if(l)return l.title||null;let a=R({fieldInfo:t,graphic:r,layer:i});if(a){let e=a.getFieldAlias(t.fieldName);return n?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function j(e){let{configurableFieldsContainer:t,fieldInfo:r,isContentFieldInfos:n}=e;if(!r?.fieldName)return null;let i=t.popupTemplate||t.fieldConfigurations?t.getFieldConfiguration(r.fieldName)?.fieldFormat:(0,s.iu)(r,t.getField(r.fieldName));return n&&r.fieldFormat||i}function S(e,t){let r=$(t,e);return r?r.name:e}function D(e,t){return e&&e.map(e=>S(e,t))}function $(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function z(e){return`${e}`.trim()}function H({attributes:e,globalAttributes:t,layer:r,text:n,expressionAttributes:i,fieldInfoMap:l}){return n?O({formattedAttributes:t,template:G(n,{...t,...i,...e},r),fieldInfoMap:l}):""}function O({formattedAttributes:e,template:t,fieldInfoMap:r}){return z(function(e){return e.replaceAll(g,"")}((0,i.HC)((0,i.HC)(t,e=>function(e,t){return`{${t.get(e.toLowerCase())?.fieldName||e}}`}(e,r)),e)))}function J(e,t){return e.replaceAll(h,(e,r,n)=>{let i=$(t,n);return i?`{${i.name}}`:r})}function G(e,t,r){let n=J(e,r);return n&&n.replaceAll(T,(e,r,n)=>function(e,t,r){let n=(t=z(t))&&!t.startsWith("{");return(0,i.HC)(e,function(e,t=!1){let r={...e};return Object.keys(r).forEach(e=>function(e,t,r=!1){let n=t[e];"string"==typeof n&&(t[e]=(r?encodeURIComponent(n):n).replaceAll(b,"%27"))}(e,r,t)),r}(r,n||!1))}(e,r||n,t))}function V(e){return"object"==typeof e&&!!e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function Q(e){return"object"==typeof e&&!!e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function Y(e){return V(e)&&Q(e)}function P(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function _(e){return!(!e||"object"!=typeof e)&&Y(a(e))}function W(e,t){let{fieldInfos:r,fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,preventPlacesFormatting:o,timeZone:f}=t,s=K(r,n),y=R({fieldInfo:s,graphic:i,layer:a}),c=$(y||a,n),m=y?null:s?.format,g=y?j({configurableFieldsContainer:y,fieldInfo:s,isContentFieldInfos:l}):null,h="number"===g?.type;if(s&&!(0,d.JL)(n)){let t=c?.type,r="date-time"===g?.type,n=m?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||r||n)return(0,p.i0)(e,{format:r?void 0:n,fieldFormat:r?g:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:f,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a)||!a.datesInUnknownTimezone)}})}if("string"==typeof e&&(0,d.JL)(n)&&m)return function(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?B(e,",",", ",t):e.includes(";")?B(e,";","; ",t):e.includes(" ")?B(e," "," ",t):(0,u.ZV)(Number(e),(0,u.yx)(t))}(e,m);if(e=function(e,t){let r="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&r){let t=Number(e);if(!isNaN(t))return t}return e}(e,{format:h?void 0:m,fieldFormat:h?g:void 0}),"string"==typeof e||null==e||null==m&&null==g)return ne(e);let b=h?(0,u.Up)(g):m?(0,u.yx)(m):void 0;return o?(0,u.ZV)(e,{...b,minimumFractionDigits:0,maximumFractionDigits:20}):(0,u.ZV)(e,b)}function B(e,t,r,n){return e.trim().split(t).map(e=>(0,u.ZV)(Number(e),(0,u.yx)(n))).join(r)}function K(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function X(e,t,r,n){let{creatorField:i,creationDateField:l,editorField:a,editDateField:u}=e;if(!t)return;let f=(0,c.hv)(n&&"preferredTimeZone"in n?n.preferredTimeZone:null,!(!n||!("datesInUnknownTimezone"in n)||!n.datesInUnknownTimezone),r,L,"date"),s={...L,...f},d=t[u];if("number"==typeof d){let e=t[a];return{type:"edit",date:(0,o.Yq)(d,s),user:e}}let p=t[l];if("number"==typeof p){let e=t[i];return{type:"create",date:(0,o.Yq)(p,s),user:e}}return null}function ee(e,t){let r=new Map;if(!e)return r;for(let n of e){if(!n.fieldName)continue;let e=S(n.fieldName,t);n.fieldName=e,r.set(e.toLowerCase(),n)}return r}function te(e){let t=[];if(!e)return t;let{fieldInfos:r,content:n}=e;return r&&t.push(...r),!n||!Array.isArray(n)||n.forEach(e=>{if("fields"===e.type){let r=e?.fieldInfos;r&&t.push(...r)}}),t}function re(e){return e.replaceAll(w,e=>`&#${e.charCodeAt(0)};`)}function ne(e){return"string"==typeof e?e.replaceAll(F,'<br class="esri-text-new-line" />'):e}function ie(e){let{fieldInfoMap:t,fieldInfos:r,fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,timeZone:o,value:u}=e;if(null==u)return"";let s=function({fieldName:e,value:t,graphic:r,layer:n}){if(ue(e)||!n||"function"!=typeof n.getFieldDomain)return null;let i=r&&n.getFieldDomain(e,{feature:r});return i&&"coded-value"===i.type?i.getName(t):null}({fieldName:n,value:u,graphic:i,layer:a});if(s)return s;let y=a?.types&&(0,f.uU)(a.types)?function({fieldName:e,graphic:t,layer:r}){if(ue(e)||!r||"function"!=typeof r.getFeatureType)return null;let{typeIdField:n}=r;if(!n||e!==n)return null;let i=r.getFeatureType(t);return i?i.name:null}({fieldName:n,graphic:i,layer:a}):null;if(y)return y;if(t.get(n.toLowerCase()))return W(u,{fieldInfos:r||Array.from(t.values()),fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,timeZone:o});let c=a?.fieldsIndex?.get(n);return c&&((0,p.fs)(c)||(0,d.OH)(c))?(0,p.i0)(u,{fieldType:c.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:o,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a)||!a.datesInUnknownTimezone)}}):ne(u)}function le({attributes:e,fieldInfoMap:t,fieldInfos:r,graphic:n,isContentFieldInfos:i,layer:l,relatedInfos:a,timeZone:o}){let u={};return a?.forEach(e=>function({attributes:e,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l}){e&&t&&(t.relatedFeatures?.forEach(a=>fe({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l})),t.relatedStatsFeatures?.forEach(a=>fe({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l})))}({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:r,layer:l,timeZone:o})),e&&Object.keys(e).forEach(a=>{let f=e[a];u[a]=ie({fieldInfoMap:t,fieldInfos:r,fieldName:a,graphic:n,isContentFieldInfos:i,layer:l,timeZone:o,value:f})}),u}async function ae(e,t){let{layer:r,graphic:n,outFields:i,objectIds:a,returnGeometry:o,spatialReference:u}=e,f=a[0];if("number"!=typeof f&&"string"!=typeof f){let e={layer:r,graphic:n,objectId:f,requiredFields:i};return m().warn("Could not query required fields for the specified feature. The feature's ID is invalid.",e),null}if(!(0,l.BR)(r)?.operations?.supportsQuery){let e={layer:r,graphic:n,requiredFields:i,returnGeometry:o};return m().warn("The specified layer cannot be queried. The following fields will not be available.",e),null}let s=r.createQuery();return s.objectIds=a,s.outFields=i?.length?i:[r.objectIdField],s.returnGeometry=!!o,s.returnZ=!!o,s.returnM=!!o,s.outSpatialReference=u,(await r.queryFeatures(s,t)).features[0]}async function oe({graphic:e,popupTemplate:t,layer:r,spatialReference:n},i){if(!r||!t||("function"==typeof r.load&&await r.load(i),!e.attributes))return;let l=r.objectIdField,a=e.attributes[l];if(null==a)return;let o=[a],u=new Set(await t.getRequiredFields(r.fieldsIndex));null!=r.timeInfo?.trackIdField&&!u.has(r.timeInfo.trackIdField)&&await async function(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{requiresTrack:t}}=await(0,y.l)();return t(e)}(t)&&u.add(r.timeInfo.trackIdField);let f=(0,d.Kl)(e,u),s=f?[]:u.has(l)?[...u]:[...u,l],p=t.returnGeometry||await async function(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{hasGeometryFunctions:t}}=await(0,y.l)();return t(e)}(t);if(f&&!p)return;let c=await ae({layer:r,graphic:e,outFields:s,objectIds:o,returnGeometry:p,spatialReference:n},i);c&&(c.geometry&&(e.geometry=c.geometry),c.attributes&&(e.attributes={...e.attributes,...c.attributes}))}function ue(e=""){return!!e&&e.includes(N)}function fe({attributes:e,graphic:t,relatedInfo:r,fieldInfos:n,fieldInfoMap:i,layer:l,timeZone:a}){e&&t&&r&&Object.keys(t.attributes).forEach(o=>{let u=function(e){return e?`${N}${e.layerId}/${e.fieldName}`:""}({layerId:r.relation.id.toString(),fieldName:o}),f=t.attributes[o];e[u]=ie({fieldName:u,fieldInfos:n,fieldInfoMap:i,layer:l,value:f,graphic:t,timeZone:a})})}const se=e=>{if(!e)return!1;let t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},de=({layer:e,method:t,query:r,definitionExpression:n})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;let i=null==r.where?null:r.where,l=null==r.geometry?null:r.geometry;e.capabilities.query.supportsCacheHint&&!se(n)&&!se(i)&&"extent"!==l?.type&&"tile"!==r.resultType&&(r.cacheHint=!0)},pe=({query:e,layer:t,method:r})=>{de({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},ye=({queryPayload:e,layer:t,method:r})=>{de({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function ce(e,t,r){return e&&t&&r?"sublayer"===t.type?he({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:r})||he({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:r}):he({layers:e.allLayers,map:e,relatedLayer:t,relationship:r})||he({layers:e.allTables,map:e,relatedLayer:t,relationship:r}):null}function me(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function ge(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function he({map:e,relationship:t,relationship:{relatedTableId:r},relatedLayer:n,layers:i}){if(!i)return null;for(let l of i){if("map-image"===l.type){let r=he({layers:l.sublayers,map:e,relatedLayer:n,relationship:t})||he({layers:l.subtables,map:e,relatedLayer:n,relationship:t});if(r)return r;continue}if(!Y(l))continue;if("sublayer"===n.type){if(l!==n&&l.id===r)return l.isTable?ge(e,l):l;continue}let i="scene"===n.type&&n.associatedLayer?n.associatedLayer.url:n.url;if(!i)return null;if("sublayer"===l.type){if(l!==n&&l.layer?.url===i&&l.id===r)return l.isTable?ge(e,l):l}else if(l!==n&&l.url===i&&l.layerId===r)return l}return null}},4560(e,t,r){r.d(t,{i0:()=>f,j4:()=>u,fs:()=>o});var n=r(97770),i=r(30524);r(7762),r(84952),r(27865),r(43281),r(98623);var l=r(56400);let a;function o(e){return(0,i.vE)(e)||(0,i.zD)(e)||(0,i.Ah)(e)}async function u(e,t){return e?(a||=new(await Promise.all([r.e(9696),r.e(2867)]).then(()=>r(44123)).then(e=>e.WhereClauseCache))(50,500),a.get(e,t)):null}function f(e,t){let r,i,{format:a,fieldFormat:o,timeZoneOptions:u,fieldType:f}=t??{},s=o?(0,n._m)(o):null;if(u&&({timeZone:r,timeZoneName:i}=(0,l.hv)(u.layerTimeZone,u.datesInUnknownTimezone,u.viewTimeZone,s||(0,n.J2)(a||"short-date-short-time"),f)),"string"==typeof e&&isNaN(Date.parse("time-only"===f?`1970-01-01T${e}Z`:e)))return e;switch(f){case"date-only":{let t=s||(0,n.J2)(a||"short-date");return"string"==typeof e?(0,n.iS)(e,{...t}):(0,n.Yq)(e,{...t,timeZone:"UTC"})}case"time-only":{let t=s||(0,n.J2)(a||"short-time");return"string"==typeof e?(0,n.F8)(e,t):(0,n.Yq)(e,{...t,timeZone:"UTC"})}case"timestamp-offset":{let t=a||s||u?s||(0,n.J2)(a||"short-date-short-time"):void 0,l=t?{...t,timeZone:r,timeZoneName:i}:void 0;return"string"==typeof e?(0,n.Ey)(e,l):(0,n.Yq)(e,l)}default:{let t=a||s||u?s||(0,n.J2)(a||"short-date-short-time"):void 0;return(0,n.Yq)("string"==typeof e?new Date(e):e,t?{...t,timeZone:r,timeZoneName:i}:void 0)}}}new Set(["integer","small-integer"])}}]);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{TileBackground as t}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as n}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";function c(c){let l=new s,u=l.fragment;if(l.include(n),c.background===1){let t=c.output===2;return t?u.uniforms.add(new r(`backgroundColor`,e=>e.backgroundColor)):u.include(e),u.main.add(a`fragColor = vec4(${t?a`backgroundColor`:a`gridColor(uv)`}, 1.0);`),l}return l.include(t,c),u.uniforms.add(new o(`tex`,e=>e.texture),new i(`opacity`,e=>e.opacity)).main.add(a`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),l}const l=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:`Module`}));export{l as B,c as b};
2
+ import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{blendLayers as t}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/blendLayers.glsl.js";import{TileComposite as n}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function s(s){let c=new o,l=c.fragment;return c.include(n),s.background===1?(s.output===2?l.uniforms.add(new r(`backgroundColor`,e=>e.backgroundColor)).main.add(`fragColor = vec4(backgroundColor, 1.0);`):(l.include(e),l.main.add(`fragColor = vec4(gridColor(uv), 1.0);`)),c):(c.include(t,s),l.uniforms.add(new a(`tex`,e=>e.texture),new i(`opacity`,e=>e.opacity)).main.add(`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),c)}const c=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:`Module`}));export{c as B,s as b};
@@ -49,7 +49,7 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
49
49
  ? selectLocalOverlayUVs(projectOverlay(vPositionForDraping))
50
50
  : selectMapOverlayUVs(overlayMapUVFromWorldPosition());
51
51
  }
52
- `)):O.code.add(`vec2 projectOverlay(vec3 pos) { return pos.xy; }`));let Q=R&&H&&j===4;Q&&(D.varyings.add(`tbnTangent`,`vec3`),D.varyings.add(`tbnBiTangent`,`vec3`),D.varyings.add(`upNormal`,`vec3`));let ge=z===0,_e=z===2;if(D.include(_,E),D.include(ee,E),O.include(C),O.main.add(S`
52
+ `)):O.code.add(`vec2 projectOverlay(vec3 pos) { return pos.xy; }`));let Q=R&&H&&j===4;Q&&I&&(D.varyings.add(`tbnTangent`,`vec3`),D.varyings.add(`tbnBiTangent`,`vec3`));let ge=z===0,_e=z===2;if(D.include(_,E),D.include(ee,E),O.include(C),O.main.add(S`
53
53
  bool castShadows;
54
54
  vec4 externalColor = forwardExternalColor(castShadows);
55
55
  ${x(he,`if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }`)}
@@ -66,13 +66,10 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
66
66
  forwardLinearDepthToWriteShadow();
67
67
  forwardEmissiveStrength();
68
68
  forwardObjectAndLayerIdColor();
69
- ${x(Q,I?S`
70
- upNormal = normalize(positionWorld());
71
- tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), upNormal));
72
- tbnBiTangent = normalize(cross(upNormal, tbnTangent));`:S`
73
- upNormal = vec3(0.0, 0.0, 1.0);
74
- tbnTangent = vec3(1.0, 0.0, 0.0);
75
- tbnBiTangent = vec3(0.0, 1.0, 0.0);`)}
69
+ ${x(Q&&I,S`
70
+ vec3 upNormal = normalize(positionWorld());
71
+ tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), upNormal));
72
+ tbnBiTangent = normalize(cross(upNormal, tbnTangent));`)}
76
73
  ${x(R||G,x(I,`vPositionForDraping = positionForDraping();
77
74
  vtcOverlay = vec4(0.0);`,`setOverlayVTC(projectOverlay(positionForDraping()));`))}
78
75
 
@@ -121,7 +118,7 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
121
118
  vec3 shadingNormal = ${M?`computeTextureNormal(tangentSpace, vuv0)`:`fragmentShadingNormal`};
122
119
 
123
120
  float ssao = occlusion * evaluateAmbientOcclusionInverse();
124
- ${x(N,S`float snow = applySnow(fragmentFaceNormal, normalize(positionWorld(), materialColor.rgb, ssao));
121
+ ${x(N,S`float snow = applySnow(fragmentFaceNormal, upNormal, materialColor.rgb, ssao);
125
122
  shadingNormal = mix(shadingNormal, fragmentFaceNormal, snow);`)}
126
123
  ${x(R,`materialColor = compositeOverlayUnpremultiplied(materialColor, overlayColor);`)}
127
124
 
@@ -138,10 +135,10 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
138
135
  float dotFL = dot(fragmentFaceNormal, mainLightDirection);
139
136
  if( dotFL <= 0.0) shadow = 1.0;
140
137
  `)}
141
- ${x(N,`float snow = applySnow(fragmentFaceNormal, normalize(positionWorld()), materialColor.rgb, ssao);`)}
138
+ vec3 upNormal = getLocalUp(positionWorld());
139
+ ${x(N,`float snow = applySnow(fragmentFaceNormal, upNormal, materialColor.rgb, ssao);`)}
142
140
 
143
141
  vec3 viewDirection = normalize(vPositionWorldCameraRelative);
144
- vec3 upNormal = getLocalUp(positionWorld());
145
142
 
146
143
  // At global scale we create some additional ambient light based on the main light to simulate global illumination
147
144
  vec3 additionalLight = evaluateAdditionalLighting(1.0 - ssao, positionWorld());
@@ -152,7 +149,7 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
152
149
  ${x(Q,S`vec4 overlayWaterMask = getOverlayColor(waterNormals, overlayUVs);
153
150
  float waterNormalLength = length(overlayWaterMask);
154
151
  if (waterNormalLength > 0.95) {
155
- mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, upNormal);
152
+ mat3 tbnMatrix = ${I?`mat3(tbnTangent, tbnBiTangent, upNormal)`:`mat3(1.0)`};
156
153
  vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, overlayColor, -normalize(vPositionWorldCameraRelative), shadow, upNormal, tbnMatrix, vPosition_view, positionWorld());
157
154
  vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
158
155
  // un-gamma the ground color to mix in linear space
@@ -1,20 +1,20 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{calculateUVZShadowPass as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{readShadowPass as a,readShadowMaps as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{cameraPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{RgbNormalizedDepthEncoding as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{glsl as l,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as d}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as f,GaussianSplatFading as p,gaussianSplatPerspectiveVertex as m}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{getGaussianSplatAlphaCutoffValue as h}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";function _(_){let{receiveShadows:v,spherical:y}=_,b=v&&_.fragmentShading,x=b&&_.preciseDepth,S=new g,{varyings:C,vertex:w,fragment:T,outputs:E}=S;C.add(`vColor`,`vec4`),x&&C.add(`shadowReceiverRay`,`vec3`),S.include(f,_),_.fadingEnabled&&w.include(p),w.uniforms.add(s);let D=b?T:w;D.uniforms.add(s),D.include(t,_),D.include(i,_),n(D),D.uniforms.add(r),b?S.include(a,_):v&&(w.include(e),_.hasShadowHighlights&&w.code.add(l`ivec2 getShadowHighlightCoordinates() {
2
+ import{calculateUVZShadowPass as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{readShadowPass as o,readShadowMaps as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{cameraPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{RgbNormalizedDepthEncoding as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{glsl as u,If as d}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as f}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{gaussianSplatPerspective as p,gaussianSplatFading as m}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{getGaussianSplatAlphaCutoffValue as h}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";function _(_){let{receiveShadows:v,spherical:y}=_,b=v&&_.fragmentShading,x=b&&_.preciseDepth,S=new g,{varyings:C,vertex:w,fragment:T,outputs:E}=S;C.add(`vColor`,`vec4`),C.add(`gaussianCoordinates`,`vec2`),C.add(`gaussianLogFalloffCutoff`,`float`),C.add(`fragmentPositionCameraRelative`,`vec3`),_.preciseDepth&&C.add(`rayGaussianFactor`,`vec4`),x&&C.add(`shadowReceiverRay`,`vec3`),S.include(p,_),_.fadingEnabled&&w.include(m),w.uniforms.add(c);let D=b?T:w;D.uniforms.add(c),D.include(t,_),D.include(i,_),n(D),D.uniforms.add(r),b?S.include(o,_):v&&(w.include(e),_.hasShadowHighlights&&w.code.add(u`ivec2 getShadowHighlightCoordinates() {
3
3
  vec2 screenUV = gl_Position.xy / gl_Position.w * 0.5 + 0.5;
4
4
  ivec2 screenPixel = ivec2(screenUV / inverseScreenSize);
5
5
  return clamp(screenPixel, ivec2(0), textureSize(shadowHighlight, 0) - 1);
6
- }`),o(w,_.hasShadowHighlights,`getShadowHighlightCoordinates()`)),E.add(`fragColor`,`vec4`,0),E.add(`fragDepthColor`,`vec4`,1);let O=h(_.alphaCutoff),k=l`float groundLightAlignment = dot(upNormal, mainLightDirection);
6
+ }`),s(w,_.hasShadowHighlights,`getShadowHighlightCoordinates()`)),E.add(`fragColor`,`vec4`,0),E.add(`fragDepthColor`,`vec4`,1);let O=h(_.alphaCutoff),k=u`float groundLightAlignment = dot(upNormal, mainLightDirection);
7
7
  float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);
8
- vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,A=l`
8
+ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,A=u`
9
9
  vec3 viewDirection = normalize(fragmentPositionCameraRelative - cameraPosition);
10
10
  vec3 upNormal = getLocalUp(fragmentPositionCameraRelative, cameraPosition);
11
11
  ${k}
12
- float shadow = ${y?l`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:l`0.0`};
13
- ${u(v,l`
14
- ${_.preciseDepth?l`
15
- float receiverDepth = gaussianSplatRayDepth();
12
+ float shadow = ${y?u`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:u`0.0`};
13
+ ${d(v,u`
14
+ ${_.preciseDepth?u`
15
+ float receiverDepth = computeGaussianRayDepth(rayGaussianFactor);
16
16
  vec3 receiverPosition = transpose(mat3(view)) * rayView * receiverDepth;
17
- `:l`
17
+ `:u`
18
18
  float receiverDepth = -viewPos.z;
19
19
  vec3 receiverPosition = fragmentPositionCameraRelative;
20
20
  `}
@@ -22,18 +22,19 @@ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoos
22
22
  shadow = max(shadow, readShadowMaps(uvzShadow));
23
23
  `)}
24
24
  vColor.rgb = evaluateSceneLighting(upNormal, vColor.rgb, shadow, 0.0, additionalLight, viewDirection, upNormal);
25
- `,j=l`
25
+ `,j=u`
26
26
  vec3 viewDirection = normalize(fragmentPositionCameraRelative - cameraPosition);
27
27
  vec3 upNormal = getLocalUp(fragmentPositionCameraRelative, cameraPosition);
28
28
  ${k}
29
- ${x?l`
29
+ ${x?u`
30
30
  float shadow = max(
31
31
  lightingGlobalFactor * (1.0 - additionalAmbientScale),
32
32
  readShadowMap(shadowReceiverRay * receiverDepth, receiverDepth)
33
33
  );
34
34
  `:`float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);`}
35
35
  shadedColor = evaluateSceneLighting(upNormal, vColor.rgb, shadow, 0.0, additionalLight, viewDirection, upNormal);
36
- `;return w.main.add(`
36
+ `;return w.main.add(u`
37
+ gl_Position = ${a};
37
38
  uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));
38
39
  uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);
39
40
 
@@ -42,34 +43,77 @@ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoos
42
43
  float opacity = vColor.a;
43
44
 
44
45
  // Apply per-page fading before the early alpha rejection.
45
- ${u(_.fadingEnabled,l`opacity = applyGaussianSplatFading(opacity, gaussianIndex);
46
- vColor.a = opacity;`)}
46
+ ${d(_.fadingEnabled,u`
47
+ opacity = applyGaussianSplatFading(opacity, gaussianIndex);
48
+ vColor.a = opacity;
49
+ `)}
50
+
51
+ if (opacity < ${u.float(O)}) {
52
+ return;
53
+ }
54
+
55
+ vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);
56
+ if (rejectGaussianPosition(cameraRelativePosition)) {
57
+ return;
58
+ }
59
+
60
+ vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);
61
+ if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
62
+ return;
63
+ }
47
64
 
48
- ${m(_,O)}
65
+ vec3 gaussianScale = unpackScale(packedGaussian);
66
+ mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));
67
+ GaussianSplatProjection projection;
68
+ if (!projectGaussianSplat(
69
+ viewPos.xyz, gaussianScale, gaussianRotation,
70
+ ${u.float(O)}, ${u.float(Math.log(O))}, opacity, projection
71
+ )) {
72
+ return;
73
+ }
74
+
75
+ gaussianCoordinates = projection.coordinates;
76
+ gaussianLogFalloffCutoff = projection.logFalloffCutoff;
77
+ fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * projection.viewOffset;
78
+
79
+ ${d(_.preciseDepth,u`
80
+ vec3 rayView = reconstructViewRay(projection.clipPosition.xy, inverseProjectionMatrix);
81
+ rayGaussianFactor = computeGaussianRayFactor(
82
+ rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
83
+ );
84
+ `)}
85
+ gl_Position = projection.clipPosition;
49
86
  vColor.a = opacity;
50
- ${u(x,`shadowReceiverRay = transpose(mat3(view)) * rayView;`)}
87
+ ${d(x,`shadowReceiverRay = transpose(mat3(view)) * rayView;`)}
51
88
 
52
89
  // Per-fragment lighting preserves crisp shadow borders; vertex lighting reduces overdraw cost.
53
- ${u(b,`forwardLinearDepth(-viewPos.z);`,A)}
54
- `),T.include(c),T.main.add(`
90
+ ${d(b,`forwardLinearDepth(-viewPos.z);`,A)}
91
+ `),T.include(l),T.main.add(u`
92
+ if (rejectGaussianPosition(fragmentPositionCameraRelative)) {
93
+ discard;
94
+ }
95
+ float gaussianExponent = evaluateGaussianExponent(gaussianCoordinates);
96
+ if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogFalloffCutoff) {
97
+ discard;
98
+ }
55
99
  float gaussianFalloff = exp(gaussianExponent);
56
100
 
57
101
  // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.
58
102
  float alpha = min(.99f, vColor.a * gaussianFalloff);
59
103
 
60
- ${u(x,l`float receiverDepth = gaussianSplatRayDepth();`)}
104
+ ${d(_.preciseDepth,u`float receiverDepth = computeGaussianRayDepth(rayGaussianFactor);`)}
61
105
  vec3 shadedColor = vColor.rgb;
62
- ${u(b,j)}
106
+ ${d(b,j)}
63
107
  fragColor = vec4(shadedColor * alpha, alpha);
64
108
 
65
109
  // We simulate first hit based depth using the shared opacity threshold.
66
110
  // This works because we render in front-to-back order,
67
111
  // i.e. the first hit that counts completely saturates the alpha channel
68
112
  // and further splats do not contribute.
69
- float depthHit = step(${l.float(d)}, alpha);
113
+ float depthHit = step(${u.float(f)}, alpha);
70
114
  vec3 encodedDepth = vec3(0.0);
71
115
  if (depthHit > 0.0) {
72
- encodedDepth = encodeNormalizedDepthToRGB(${x?`delinearizeDepth(-receiverDepth)`:`gaussianSplatDepth()`});
116
+ encodedDepth = encodeNormalizedDepthToRGB(${_.preciseDepth?`delinearizeDepth(-receiverDepth)`:`gl_FragCoord.z`});
73
117
  }
74
118
  fragDepthColor = vec4(encodedDepth, depthHit);
75
119
  `),S}const v=Object.freeze(Object.defineProperty({__proto__:null,build:_},Symbol.toStringTag,{value:`Module`}));export{v as G,_ as b};
@@ -1,11 +1,52 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{If as e,glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as n}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as r,GaussianSplatFading as i,gaussianSplatPerspectiveVertex as a}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function s(s){let{fadingEnabled:c}=s,l=new o,{fragment:u,vertex:d}=l;return l.include(r,s),s.fadingEnabled&&l.vertex.include(i),s.writeNormals&&l.outputs.add(`fragNormal`,`vec4`,0),d.main.add(t`
2
+ import{positionOutsideClipSpace as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{If as t,glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as r}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{gaussianSplatPerspective as i,gaussianSplatFading as a}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function s(s){let{fadingEnabled:c}=s,l=new o,{fragment:u,vertex:d,varyings:f}=l;return l.include(i,s),f.add(`gaussianCoordinates`,`vec2`),f.add(`gaussianLogFalloffCutoff`,`float`),f.add(`fragmentPositionCameraRelative`,`vec3`),s.preciseDepth&&f.add(`rayGaussianFactor`,`vec4`),s.fadingEnabled&&l.vertex.include(a),s.writeNormals&&l.outputs.add(`fragNormal`,`vec4`,0),d.main.add(n`
3
+ gl_Position = ${e};
3
4
  uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));
4
5
  uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);
5
6
 
6
7
  float opacity = unpackOpacity(packedGaussian);
7
8
 
8
- ${e(c,t`opacity = applyGaussianSplatFading(opacity, gaussianIndex);`)}
9
+ ${t(c,n`opacity = applyGaussianSplatFading(opacity, gaussianIndex);`)}
9
10
 
10
- ${a(s,n)}
11
- `),s.preciseDepth&&u.main.add(`gl_FragDepth = gaussianSplatDepth();`),s.writeNormals&&u.main.add(`fragNormal = vec4(0.0);`),l}const c=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:`Module`}));export{c as G,s as b};
11
+ if (opacity < ${n.float(r)}) {
12
+ return;
13
+ }
14
+
15
+ vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);
16
+ if (rejectGaussianPosition(cameraRelativePosition)) {
17
+ return;
18
+ }
19
+
20
+ vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);
21
+ if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
22
+ return;
23
+ }
24
+
25
+ vec3 gaussianScale = unpackScale(packedGaussian);
26
+ mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));
27
+ GaussianSplatProjection projection;
28
+ if (!projectGaussianSplat(
29
+ viewPos.xyz, gaussianScale, gaussianRotation,
30
+ ${n.float(r)}, ${n.float(Math.log(r))}, opacity, projection
31
+ )) {
32
+ return;
33
+ }
34
+
35
+ gaussianCoordinates = projection.coordinates;
36
+ gaussianLogFalloffCutoff = projection.logFalloffCutoff;
37
+ fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * projection.viewOffset;
38
+
39
+ ${t(s.preciseDepth,n`
40
+ vec3 rayView = reconstructViewRay(projection.clipPosition.xy, inverseProjectionMatrix);
41
+ rayGaussianFactor = computeGaussianRayFactor(
42
+ rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
43
+ );
44
+ `)}
45
+ gl_Position = projection.clipPosition;
46
+ `),u.main.add(n`if (rejectGaussianPosition(fragmentPositionCameraRelative)) {
47
+ discard;
48
+ }
49
+ float gaussianExponent = evaluateGaussianExponent(gaussianCoordinates);
50
+ if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogFalloffCutoff) {
51
+ discard;
52
+ }`),s.preciseDepth&&u.main.add(n`gl_FragDepth = delinearizeDepth(-computeGaussianRayDepth(rayGaussianFactor));`),s.writeNormals&&u.main.add(`fragNormal = vec4(0.0);`),l}const c=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:`Module`}));export{c as G,s as b};
@@ -1,5 +1,11 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{create as e}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{nearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{glsl as n,If as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{shadowDepthBias as a,gaussianSplatFirstHitAlpha as o}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{gaussianSplatRayDepth as s,GaussianSplatPass as c,gaussianSplatUnpackScaleAndRotation as l,gaussianSplatComputeQuad as u,gaussianSplatCullAndTransformVertex as d,gaussianSplatComputeEllipse as f}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{GaussianSplatRenderParameters as p}from"../views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";class h extends p{constructor(){super(...arguments),this.inverseProjectionMatrix=e()}}function g(e){let p=new m,{vertex:h,fragment:g}=p,_=e.output===8;return e.preciseDepth&&(_?p.include(s):(p.varyings.add(`shadowRayDepth`,`vec2`),h.code.add(n`vec2 gaussianSplatPrepareParallelRayDepth(
2
+ import{create as e}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{positionOutsideClipSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{nearFar as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{glsl as r,If as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4PassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{shadowDepthBias as o,gaussianSplatFirstHitAlpha as s}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{gaussianSplatCommon as c,gaussianSplatRayDepth as l}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{GaussianSplatRenderParameters as u}from"../views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";class f extends u{constructor(){super(...arguments),this.inverseProjectionMatrix=e()}}function p(e){let u=new d,{vertex:f,fragment:p,varyings:m}=u,h=e.output===8,g=e.clippingEnabled||e.hasSlicePlane;return u.include(c,e),m.add(`gaussianCoordinates`,`vec2`),m.add(`gaussianLogFalloffCutoff`,`float`),(e.preciseDepth||g)&&f.uniforms.add(new a(`inverseProjectionMatrix`,e=>e.inverseProjectionMatrix)),g&&(m.add(`homogeneousPositionCameraRelative`,`vec4`),f.code.add(r`vec4 reconstructHomogeneousViewPosition(vec2 clipPosition, float viewZ, mat4 inverseProjection) {
3
+ vec4 origin = inverseProjection * vec4(clipPosition, 0.0, 1.0);
4
+ vec4 depthAxis = inverseProjection[2];
5
+ float denominator = depthAxis.z - viewZ * depthAxis.w;
6
+ float numerator = viewZ * origin.w - origin.z;
7
+ return origin * denominator + depthAxis * numerator;
8
+ }`)),e.preciseDepth&&(h?(u.include(l),m.add(`rayGaussianFactor`,`vec4`)):(u.varyings.add(`shadowRayDepth`,`vec2`),f.code.add(r`vec2 gaussianSplatPrepareParallelRayDepth(
3
9
  vec2 clipPosition,
4
10
  vec3 viewPosition,
5
11
  vec3 gaussianScale,
@@ -14,18 +20,27 @@ vec3 homogeneousCenterOffset = vec3(viewPosition.xy * homogeneousOrigin.w - homo
14
20
  vec3 factorSpaceOffset = (viewToGaussian * homogeneousCenterOffset) / gaussianScale;
15
21
  float homogeneousPeakOffset = dot(factorSpaceDirection, factorSpaceOffset) / dot(factorSpaceDirection, factorSpaceDirection);
16
22
  return vec2(-viewPosition.z * homogeneousOrigin.w + homogeneousPeakOffset, homogeneousOrigin.w);
17
- }`)),h.uniforms.add(new i(`inverseProjectionMatrix`,e=>e.inverseProjectionMatrix)),g.uniforms.add(t),g.constants.add(`depthBias`,`float`,a),g.main.add(n`
18
- float rayDepth = ${_?`gaussianSplatRayDepth()`:`shadowRayDepth.x / (shadowRayDepth.y == 0.0 ? 1.0 : shadowRayDepth.y)`};
23
+ }`)),p.uniforms.add(n),p.constants.add(`depthBias`,`float`,o),p.main.add(r`
24
+ float rayDepth = ${h?`computeGaussianRayDepth(rayGaussianFactor)`:`shadowRayDepth.x / (shadowRayDepth.y == 0.0 ? 1.0 : shadowRayDepth.y)`};
19
25
  float linearDepth = (rayDepth - nearFar.x) / (nearFar.y - nearFar.x);
20
26
  float slopeBias = 2.0 * max(abs(dFdx(linearDepth)), abs(dFdy(linearDepth)));
21
- ${r(!_,n`if (shadowRayDepth.y == 0.0) { discard; }`)}
27
+ ${i(!h,r`if (shadowRayDepth.y == 0.0) { discard; }`)}
22
28
  if (rayDepth < nearFar.x || rayDepth > nearFar.y) {
23
29
  discard;
24
30
  }
25
31
  gl_FragDepth = min(linearDepth + depthBias + slopeBias, 1.0);
26
- `)),p.include(c,e),h.constants.add(`alphaCutoff`,`float`,o),h.constants.add(`depthBias`,`float`,a),h.code.add(n`float safeClipW(float clipW) {
32
+ `)),g&&p.main.add(r`if (homogeneousPositionCameraRelative.w == 0.0) {
33
+ discard;
34
+ }
35
+ vec3 positionCameraRelative = homogeneousPositionCameraRelative.xyz / homogeneousPositionCameraRelative.w;
36
+ if (rejectGaussianPosition(positionCameraRelative)) {
37
+ discard;
38
+ }`),p.main.add(r`float gaussianExponent = evaluateGaussianExponent(gaussianCoordinates);
39
+ if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogFalloffCutoff) {
40
+ discard;
41
+ }`),f.constants.add(`alphaCutoff`,`float`,s),f.constants.add(`depthBias`,`float`,o),f.code.add(r`float safeClipW(float clipW) {
27
42
  return abs(clipW) < 1e-7 ? (clipW < 0.0 ? -1e-7 : 1e-7) : clipW;
28
- }`),h.code.add(n`vec3 computeProjectivePixelGradient(
43
+ }`),f.code.add(r`vec3 computeProjectivePixelGradient(
29
44
  vec3 clipGradient,
30
45
  vec3 clipWGradient,
31
46
  float clipValue,
@@ -34,17 +49,31 @@ float invWSquared,
34
49
  float halfScreenSize
35
50
  ) {
36
51
  return (clipGradient * safeW - clipValue * clipWGradient) * invWSquared * halfScreenSize;
37
- }`),h.code.add(n`float biasDepth(float linearDepth) {
52
+ }`),f.code.add(r`float biasDepth(float linearDepth) {
38
53
  return min(linearDepth + depthBias, 1.0);
39
- }`),h.main.add(`
54
+ }`),f.main.add(r`
55
+ gl_Position = ${t};
40
56
  uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));
41
57
  uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);
42
58
 
43
59
  float opacity = unpackOpacity(packedGaussian);
44
60
 
45
- ${d(e,`alphaCutoff`)}
61
+ if (opacity < alphaCutoff) {
62
+ return;
63
+ }
64
+
65
+ vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);
66
+ if (rejectGaussianPosition(cameraRelativePosition)) {
67
+ return;
68
+ }
69
+
70
+ vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);
71
+ if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
72
+ return;
73
+ }
46
74
 
47
- ${l}
75
+ vec3 gaussianScale = unpackScale(packedGaussian);
76
+ mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));
48
77
 
49
78
  vec4 projPos = proj * viewPos;
50
79
  float safeW = safeClipW(projPos.w);
@@ -78,7 +107,19 @@ return min(linearDepth + depthBias, 1.0);
78
107
  return;
79
108
  }
80
109
 
81
- ${f(`log(alphaCutoff) - log(opacity)`,`minimumRadiusOpacity`)}
110
+ float determinant = computeGaussianCovarianceDeterminant(covariance2D);
111
+ if (determinant <= 0.0) {
112
+ return;
113
+ }
114
+
115
+ vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);
116
+ gaussianLogFalloffCutoff = log(alphaCutoff) - log(opacity);
117
+ float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogFalloffCutoff);
118
+ vec2 screenRadii = computeGaussianScreenRadii(covariance2D, gaussianEllipseThreshold);
119
+ float maxRadius = ceil(sqrt(eigenvalues.x * gaussianEllipseThreshold));
120
+ if (rejectGaussianByMinimumRadius(maxRadius, minimumRadiusOpacity, minSplatRadius)) {
121
+ return;
122
+ }
82
123
 
83
124
  // Avoid invalid/extremely large footprints.
84
125
  if (maxRadius < 0.0 || maxRadius > maxShadowSplatRadius) {
@@ -86,16 +127,29 @@ return min(linearDepth + depthBias, 1.0);
86
127
  }
87
128
 
88
129
  vec3 ndcPos = projPos.xyz / safeW;
89
- ${u}
130
+ vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
131
+ if (rejectGaussianByScreenBounds(ndcPos.xy, screenRadii, clipSpacePixelScale)) {
132
+ return;
133
+ }
134
+ gaussianCoordinates = computeGaussianUnitQuadCorner(gl_VertexID) * sqrt(gaussianEllipseThreshold);
135
+ vec2 offsetFromCenter = computeGaussianQuadOffset(covariance2D, determinant, gaussianCoordinates);
90
136
  float linearDepth = (-viewPos.z - nearFar.x) / (nearFar.y - nearFar.x);
91
137
  float biasedDepth = biasDepth(linearDepth);
92
138
 
93
139
  vec2 clipPos = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
94
- ${r(e.preciseDepth,_?n`vec3 rayView = reconstructViewRay(clipPos, inverseProjectionMatrix);
95
- rayGaussianFactor = computeGaussianRayFactor(
96
- rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
97
- );`:n`shadowRayDepth = gaussianSplatPrepareParallelRayDepth(
98
- clipPos, viewPos.xyz, gaussianScale, gaussianRotation, inverseProjectionMatrix, mat3(view)
99
- );`)}
140
+ ${i(g,r`
141
+ vec4 homogeneousViewPosition = reconstructHomogeneousViewPosition(clipPos, viewPos.z, inverseProjectionMatrix);
142
+ homogeneousPositionCameraRelative = vec4(transpose(mat3(view)) * homogeneousViewPosition.xyz, homogeneousViewPosition.w);
143
+ `)}
144
+ ${i(e.preciseDepth,h?r`
145
+ vec3 rayView = reconstructViewRay(clipPos, inverseProjectionMatrix);
146
+ rayGaussianFactor = computeGaussianRayFactor(
147
+ rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
148
+ );
149
+ `:r`
150
+ shadowRayDepth = gaussianSplatPrepareParallelRayDepth(
151
+ clipPos, viewPos.xyz, gaussianScale, gaussianRotation, inverseProjectionMatrix, mat3(view)
152
+ );
153
+ `)}
100
154
  gl_Position = vec4(clipPos, biasedDepth * 2.0 - 1.0, 1.0);
101
- `),p}const _=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatShadowPassParameters:h,build:g},Symbol.toStringTag,{value:`Module`}));export{h as G,_ as a,g as b};
155
+ `),u}const m=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatShadowPassParameters:f,build:p},Symbol.toStringTag,{value:`Module`}));export{f as G,m as a,p as b};
@@ -29,15 +29,6 @@ float idleOcclusionBlendProgress = clamp(accumulatedFrames / highQualityIdleOccl
29
29
  return mix(highQualityIdleOcclusionBlendStart, highQualityIdleOcclusionBlendEnd,
30
30
  pow(idleOcclusionBlendProgress, highQualityIdleOcclusionBlendExponent));
31
31
  }
32
- bool isEdgeDepth(float centerDepth, vec2 sampleUv) {
33
- vec2 texelSize = 1.0 / vec2(textureSize(depthMap, 0));
34
- float depthLeft = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(-texelSize.x, 0.0)));
35
- float depthRight = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(texelSize.x, 0.0)));
36
- float depthUp = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(0.0, texelSize.y)));
37
- float depthDown = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(0.0, -texelSize.y)));
38
- float maxDifference = max(max(abs(centerDepth - depthLeft), abs(centerDepth - depthRight)), max(abs(centerDepth - depthUp), abs(centerDepth - depthDown)));
39
- return abs(maxDifference / centerDepth) > 0.01;
40
- }
41
32
  vec3 sampleCosineHemisphere(vec2 u) {
42
33
  float phi = 6.28318530718 * u.x;
43
34
  float radius = sqrt(u.y);
@@ -117,17 +108,11 @@ return value * 2.0 - 1.0;
117
108
  float reprojectionDepthMismatch = abs((lastFrameDepthViewPos + reprojectedViewPos.z) / max(lastFrameDepthViewPos, reprojectedViewPos.z));
118
109
  bool hasReprojectionMismatch = reprojectionDepthMismatch > reprojectionMismatchThreshold;
119
110
  bool isScaledGlobalIllumination = resolutionScale < 1.0;
120
- bool isLowQualityEdgePixel = isScaledGlobalIllumination && isEdgeDepth(currentPixelDepth, uv);
121
111
 
122
112
  // Heuristic to determine blending weights and number of steps for occlusion and color
123
113
  if (hasReprojectionMismatch) {
124
- if (isLowQualityEdgePixel) {
125
- steps = 1;
126
- occlusionBlendWeight = lowQualityOcclusionBlendWeight;
127
- } else {
128
- steps = 6;
129
- occlusionBlendWeight = 1.0;
130
- }
114
+ steps = 6;
115
+ occlusionBlendWeight = 1.0;
131
116
  } else {
132
117
  steps = 1;
133
118
  if (historyOcclusionBlendWeight > weakHistoryOcclusionThreshold) {