@arcgis/core 4.32.0-next.20250203 → 4.32.0-next.20250205

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 (242) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{d3a8aabdbfb59dd433e3.js → 01c3507d78398baaf61b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/06f693780f70e5a627c4.js +1 -0
  5. package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js +2 -0
  6. package/assets/esri/core/workers/chunks/{bf9bc52a3c559108c19a.js.LICENSE.txt → 1a2e1a414e651e988435.js.LICENSE.txt} +1 -1
  7. package/assets/esri/core/workers/chunks/{6e25742ceedea7fb1b97.js → 287362f9af132fafe4de.js} +1 -1
  8. package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
  9. package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js +2 -0
  10. package/assets/esri/core/workers/chunks/{6e8905f20101c1f4509d.js.LICENSE.txt → 354531dc2f0dea2ad96f.js.LICENSE.txt} +1 -1
  11. package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +1 -0
  12. package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +1 -0
  13. package/assets/esri/core/workers/chunks/{adfa126cea32298c28e9.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{af2a70d33afb12bb536f.js → 4d0a6ccb8434f8898377.js} +44 -44
  15. package/assets/esri/core/workers/chunks/{e9f0402fa3ac5a249807.js → 5196c43dbce48d1b81ae.js} +1 -1
  16. package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +1 -0
  17. package/assets/esri/core/workers/chunks/{f2fae056a81f12b56b04.js → 5e7f16b312077ca8c18d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/61243217aed5de012e93.js +1 -0
  19. package/assets/esri/core/workers/chunks/6d5bfcc7856cafe7b043.js +2 -0
  20. package/assets/esri/core/workers/chunks/{7d3a441d2eb18d709ef9.js.LICENSE.txt → 6d5bfcc7856cafe7b043.js.LICENSE.txt} +1 -1
  21. package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
  22. package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bc50585615f07d5ec1a9.js → 746c964cf07e4306f21f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js +2 -0
  25. package/assets/esri/core/workers/chunks/{25c8cc30faade043c8dc.js.LICENSE.txt → 77764ca90bdd13ee2167.js.LICENSE.txt} +1 -1
  26. package/assets/esri/core/workers/chunks/{07360fde6ea65664e6ca.js → 82d26884127ed772cc4b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{ba3c18d1efde46461231.js → 8438fba57e82e4cc7c11.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{d1678945cf6a58f76863.js → 858b191c078d04232342.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{0ef5b0f8aa8a09acd6e0.js → 8e90c5fee4ad7c7275dc.js} +1 -1
  30. package/assets/esri/core/workers/chunks/918bdba41fa470cf77fd.js +1 -0
  31. package/assets/esri/core/workers/chunks/{3ec51b75d1a86dad6cb1.js → 91d2bdfa6e34c10b7f50.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{12dd892cf61a76fb40ad.js → 991e0f619f1f81f94d56.js} +1 -1
  33. package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +1 -0
  34. package/assets/esri/core/workers/chunks/9a2d7c98fa0c4f8a9fd5.js +314 -0
  35. package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{7810579a5a780933cdc9.js → ad3e692681b50bd1acc2.js} +1 -1
  37. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
  38. package/assets/esri/core/workers/chunks/{c7a94e569c905f97244a.js → b33122adfd1fb68f7c0f.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{da77eefaad83c0644380.js → b8fae500c69ca2cff62a.js} +1 -1
  40. package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +1 -0
  41. package/assets/esri/core/workers/chunks/{79afe4674a0557eb26e4.js → bf26f58210755875748c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5adeb979f178944b9ce5.js → c4c2b94e5cee7b824093.js} +1 -1
  43. package/assets/esri/core/workers/chunks/c7b6f237efaab333459e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3e872e5e528dca7bee0c.js → cc75bbfd779f409943a3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{4c5279fedf982a174706.js → d175953337fa655dc6b0.js} +1 -1
  46. package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +1 -0
  47. package/assets/esri/core/workers/chunks/d3d1dcb440588a295eba.js +1 -0
  48. package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +1 -0
  49. package/assets/esri/core/workers/chunks/{448ee44c7f594e5b2551.js → e410a09650530d7aad10.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{2345344be4b0e487d3a6.js → f198f4ba7d3d52882d98.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{881ddbdeb40336208e90.js → f29715459ecd46180829.js} +1 -1
  52. package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +1 -0
  53. package/assets/esri/themes/base/widgets/_Directions.scss +74 -17
  54. package/assets/esri/themes/dark/main.css +1 -1
  55. package/assets/esri/themes/light/main.css +1 -1
  56. package/assets/esri/themes/light/view.css +1 -1
  57. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  58. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  59. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  60. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  61. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  62. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  63. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  64. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  65. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  66. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  67. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  68. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  69. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  70. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  71. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  72. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  73. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  74. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  75. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  76. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  77. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  78. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  79. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  80. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  81. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  82. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  83. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  84. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  85. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  86. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  87. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  88. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  89. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  90. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  91. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  92. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  93. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  94. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  95. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  96. package/chunks/ColorMaterial.glsl.js +4 -5
  97. package/chunks/ComponentShader.glsl.js +30 -30
  98. package/chunks/DefaultMaterial.glsl.js +19 -19
  99. package/chunks/HUDMaterial.glsl.js +34 -34
  100. package/chunks/MeasurementArrow.glsl.js +6 -6
  101. package/chunks/NativeLine.glsl.js +4 -4
  102. package/chunks/Pattern.glsl.js +1 -1
  103. package/chunks/QuadraticBezier.js +1 -1
  104. package/chunks/RealisticTree.glsl.js +14 -14
  105. package/chunks/RibbonLine.glsl.js +32 -32
  106. package/chunks/Terrain.glsl.js +31 -31
  107. package/chunks/WaterSurface.glsl.js +15 -15
  108. package/copyright.txt +0 -29
  109. package/core/Collection.js +1 -1
  110. package/core/has.js +1 -1
  111. package/geometry/operators/projectOperator.js +1 -1
  112. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  113. package/geometry/support/centroid.js +1 -1
  114. package/interfaces.d.ts +120 -13
  115. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  116. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  117. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  118. package/layers/mixins/ArcGISImageService.js +1 -1
  119. package/layers/mixins/ImageryTileMixin.js +1 -1
  120. package/layers/ogc/wcsUtils.js +1 -1
  121. package/layers/support/RasterFunctionTemplate.js +1 -1
  122. package/layers/support/Sublayer.js +1 -1
  123. package/layers/support/capabilities.js +1 -1
  124. package/layers/support/featureLayerUtils.js +1 -1
  125. package/layers/support/labelUtils.js +1 -1
  126. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  127. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  128. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  129. package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
  130. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  131. package/package.json +4 -5
  132. package/popup/content/AttachmentsContent.js +1 -1
  133. package/popup/support/AttachmentsOrderByInfo.d.ts +4 -0
  134. package/popup/support/AttachmentsOrderByInfo.js +5 -0
  135. package/portal/schemas/definitions.js +1 -1
  136. package/rest/imageService/fetchRasterInfo.js +1 -1
  137. package/rest/query/operations/queryAttachments.js +1 -1
  138. package/rest/support/AttachmentQuery.js +1 -1
  139. package/support/revision.js +1 -1
  140. package/support/timeUtils.d.ts +0 -1
  141. package/support/timeUtils.js +1 -1
  142. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  143. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/line/gradientStrokeConstants.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  148. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  149. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  150. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  151. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  152. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  153. package/views/2d/layers/LayerView2D.js +1 -1
  154. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  155. package/views/2d/layers/TileLayerView2D.js +1 -1
  156. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  157. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  158. package/views/2d/layers/support/util.js +1 -1
  159. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  160. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  161. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  168. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  169. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  170. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  171. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  172. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  173. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  174. package/views/3d/terrain/PatchRenderData.js +1 -1
  175. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  176. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  177. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +3 -3
  178. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  179. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  180. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  181. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  182. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  183. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  184. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  185. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  191. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  192. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  193. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  194. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  195. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  196. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
  197. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  198. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  199. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  200. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  201. package/views/layers/FeatureLayerView.js +1 -1
  202. package/views/layers/ImageryTileLayerView.d.ts +4 -0
  203. package/views/layers/ImageryTileLayerView.js +1 -1
  204. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  205. package/webscene/spec-certification/index.js +1 -1
  206. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  207. package/widgets/BasemapLayerList.js +1 -1
  208. package/widgets/Directions/DirectionsViewModel.js +1 -1
  209. package/widgets/Directions.js +1 -1
  210. package/widgets/Editor/UpdateWorkflow.js +1 -1
  211. package/widgets/Editor/support/EditorItem.js +1 -1
  212. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  213. package/widgets/Feature/FeatureViewModel.js +1 -1
  214. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  215. package/widgets/LayerList.js +1 -1
  216. package/widgets/Legend/LegendViewModel.js +1 -1
  217. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  218. package/widgets/Legend.js +1 -1
  219. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  220. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  221. package/widgets/support/geolocationUtils.js +1 -1
  222. package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +0 -1
  223. package/assets/esri/core/workers/chunks/0a19e1aec6a5502e391a.js +0 -1
  224. package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +0 -1
  225. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +0 -1
  226. package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js +0 -2
  227. package/assets/esri/core/workers/chunks/34d464dacee52739c98c.js +0 -1
  228. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +0 -1
  229. package/assets/esri/core/workers/chunks/4263eee3247aaf4e64bf.js +0 -1
  230. package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +0 -1
  231. package/assets/esri/core/workers/chunks/613db14d698741886753.js +0 -1
  232. package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js +0 -2
  233. package/assets/esri/core/workers/chunks/7d3a441d2eb18d709ef9.js +0 -2
  234. package/assets/esri/core/workers/chunks/ba37ab9e560644dc1f18.js +0 -1
  235. package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +0 -2
  236. package/assets/esri/core/workers/chunks/c4b0e3f7dcad6c7ea620.js +0 -314
  237. package/assets/esri/core/workers/chunks/c74441fbe0f63633796f.js +0 -1
  238. package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +0 -1
  239. package/assets/esri/core/workers/chunks/e444ec05a8a1dfbd21a8.js +0 -1
  240. package/assets/esri/core/workers/chunks/f8367c21fa91435c7c53.js +0 -1
  241. package/assets/esri/core/workers/chunks/ffa2b9d70830aed03a8f.js +0 -1
  242. /package/{views/3d/webgl-engine/core/shaderLibrary/util → webscene/support}/AlphaCutoff.js +0 -0
@@ -2,15 +2,15 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as m}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as h,addMainLightIntensity as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as x,PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as L,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{alphaCutoff as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaPass as M}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as S,addCameraPosition as E}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as $}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as N,If as V}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as I}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as T}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as B}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as _}from"../views/webgl/ShaderBuilder.js";function R(R){const z=new _,{vertex:k,fragment:G,varyings:U}=z,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=R,X=J===x.Normal||J===x.Schematic;if(S(k,R),z.include(s),U.add("vpos","vec3"),z.include(O,R),z.include(l,R),z.include(g,R),z.include(j,R),i(W)&&(E(z.vertex,R),z.include(t,R),z.include(a,R),H&&z.include(r),q&&z.attributes.add(T.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3"),z.include(d,R),z.include(e,R),z.include(n,R),z.include(c,R),k.uniforms.add(new F("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add(N`
5
+ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as m}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as p,addMainLightIntensity as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as x,PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as L,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as M}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as A,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as $,If as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as T}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as _}from"../webscene/support/AlphaCutoff.js";function R(R){const z=new B,{vertex:k,fragment:G,varyings:U}=z,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=R,X=J===x.Normal||J===x.Schematic;if(A(k,R),z.include(s),U.add("vpos","vec3"),z.include(O,R),z.include(l,R),z.include(g,R),z.include(j,R),i(W)&&(S(z.vertex,R),z.include(t,R),z.include(a,R),H&&z.include(r),q&&z.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3"),z.include(d,R),z.include(e,R),z.include(n,R),z.include(c,R),k.uniforms.add(new D("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add($`
6
6
  forwardNormalizedVertexColor();
7
7
  vcolorExt = externalColor;
8
- ${V(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
8
+ ${N(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
9
9
  vcolorExt *= vvColor();
10
10
  vcolorExt *= getSymbolColor();
11
11
  forwardColorMixMode();
12
12
 
13
- if (vcolorExt.a < ${N.float(P)}) {
13
+ if (vcolorExt.a < ${$.float(_)}) {
14
14
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
15
15
  } else {
16
16
  vpos = getVertexInLocalOriginSpace();
@@ -19,15 +19,15 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
19
19
  vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
20
20
  vpos = addVerticalOffset(vpos, localOrigin);
21
21
  gl_Position = transformPosition(proj, view, vpos);
22
- ${V(H,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
22
+ ${N(H,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
23
23
  }
24
24
  forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
25
25
  forwardLinearDepth();
26
- forwardTextureCoordinates();`)),i(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:i}=R;z.include(b,R),z.include(v,R),z.include(M,R),z.include(R.instancedDoublePrecision?L:C,R),z.fragment.include(o,R),z.include(B,R),E(z.fragment,R),h(G),w(G),f(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new D("ambient",(e=>e.ambient)),new D("diffuse",(e=>e.diffuse)),new $("opacity",(e=>e.opacity)),new $("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new I("tex",(e=>e.texture))),z.include(y,R),z.include(p,R),G.include(A),u(G),G.main.add(N`
26
+ forwardTextureCoordinates();`)),i(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:i}=R;z.include(b,R),z.include(v,R),z.include(P,R),z.include(R.instancedDoublePrecision?L:C,R),z.fragment.include(o,R),z.include(T,R),S(z.fragment,R),p(G),w(G),f(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new E("ambient",(e=>e.ambient)),new E("diffuse",(e=>e.diffuse)),new F("opacity",(e=>e.opacity)),new F("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new V("tex",(e=>e.texture))),z.include(y,R),z.include(h,R),G.include(M),u(G),G.main.add($`
27
27
  discardBySlice(vpos);
28
28
  discardByTerrainDepth();
29
29
  vec4 texColor = ${e?`texture(tex, ${r?"colorUV":"vuv0"})`:" vec4(1.0)"};
30
- ${V(e,`${V(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
30
+ ${N(e,`${N(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
31
31
  vec3 viewDirection = normalize(vpos - cameraPosition);
32
32
  applyPBRFactors();
33
33
  float ssao = evaluateAmbientOcclusionInverse();
@@ -37,11 +37,11 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
37
37
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
38
38
  float shadow = ${i?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
39
39
  vec3 matColor = max(ambient, diffuse);
40
- ${R.hasVertexColors?N`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
41
- float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:N`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
40
+ ${R.hasVertexColors?$`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
41
+ float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:$`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
42
42
  float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
43
- ${V(K,"albedo = mix(albedo, vec3(1), 0.9);")}
44
- ${N`vec3 shadingNormal = normalize(vNormalWorld);
43
+ ${N(K,"albedo = mix(albedo, vec3(1), 0.9);")}
44
+ ${$`vec3 shadingNormal = normalize(vNormalWorld);
45
45
  albedo *= 1.2;
46
46
  vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
47
47
  float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
@@ -49,10 +49,10 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
49
49
  float treeRadialFalloff = vColor.r;
50
50
  float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
51
51
  additionalLight += backLightFactor * mainLightIntensity;`}
52
- ${V(X,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
53
- ${X?N`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
54
- ${V(K,N`mrr = vec3(0.0, 1.0, 0.04);`)}
52
+ ${N(X,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
53
+ ${X?$`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
54
+ ${N(K,$`mrr = vec3(0.0, 1.0, 0.04);`)}
55
55
  vec4 emission = ${K?"vec4(0.0)":"getEmissions()"};
56
- vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:N`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
56
+ vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:$`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
57
57
  vec4 finalColor = vec4(shadedColor, opacity_);
58
58
  outputColorHighlightOID(finalColor, vpos);`)}return z.include(m,R),z}const z=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{z as R,R as b};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{alphaCutoff as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{VertexAttribute as x}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{LineMarkerSpace as L}from"../views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js";import{outputColorHighlightOID as w}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{CapType as b}from"../views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js";import{ShaderBuilder as y}from"../views/webgl/ShaderBuilder.js";const j=1;function C(C){const F=new y,{attributes:P,varyings:R,vertex:z,fragment:A}=F,{applyMarkerOffset:T,draped:V,output:O,capType:W,stippleEnabled:E,falloffEnabled:I,roundJoins:N,wireframe:M,innerColorEnabled:_}=C;F.include(s),F.include(n,C),F.include(r,C),F.include(t,C),F.include(l,C);const k=T&&!V;k&&(z.uniforms.add(new S("markerScale",(e=>e.markerScale))),F.include(a,{space:L.World})),c(z,C),z.uniforms.add(new D("inverseProjectionMatrix",(e=>e.camera.inverseProjectionMatrix)),new v("nearFar",(e=>e.camera.nearFar)),new S("miterLimit",(e=>"miter"!==e.join?0:e.miterLimit)),new g("viewport",(e=>e.camera.fullViewport))),z.constants.add("LARGE_HALF_FLOAT","float",65500),P.add(x.POSITION,"vec3"),P.add(x.PREVPOSITION,"vec3"),P.add(x.NEXTPOSITION,"vec3"),P.add(x.SUBDIVISIONFACTOR,"float"),P.add(x.UV0,"vec2"),R.add("vColor","vec4"),R.add("vpos","vec3"),R.add("vLineDistance","float"),R.add("vLineWidth","float");const B=E;B&&R.add("vLineSizeInv","float");const U=W===b.ROUND,$=E&&U,H=I||$;H&&R.add("vLineDistanceNorm","float"),U&&(R.add("vSegmentSDF","float"),R.add("vReverseSegmentSDF","float")),z.code.add(u`vec2 perpendicular(vec2 v) {
5
+ import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{VertexAttribute as D}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{LineMarkerSpace as x}from"../views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js";import{outputColorHighlightOID as L}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{CapType as w}from"../views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as y}from"../webscene/support/AlphaCutoff.js";const j=1;function C(C){const F=new b,{attributes:P,varyings:R,vertex:z,fragment:A}=F,{applyMarkerOffset:T,draped:V,output:O,capType:W,stippleEnabled:E,falloffEnabled:I,roundJoins:N,wireframe:M,innerColorEnabled:_}=C;F.include(s),F.include(n,C),F.include(r,C),F.include(t,C),F.include(l,C);const k=T&&!V;k&&(z.uniforms.add(new h("markerScale",(e=>e.markerScale))),F.include(a,{space:x.World})),p(z,C),z.uniforms.add(new u("inverseProjectionMatrix",(e=>e.camera.inverseProjectionMatrix)),new m("nearFar",(e=>e.camera.nearFar)),new h("miterLimit",(e=>"miter"!==e.join?0:e.miterLimit)),new v("viewport",(e=>e.camera.fullViewport))),z.constants.add("LARGE_HALF_FLOAT","float",65500),P.add(D.POSITION,"vec3"),P.add(D.PREVPOSITION,"vec3"),P.add(D.NEXTPOSITION,"vec3"),P.add(D.SUBDIVISIONFACTOR,"float"),P.add(D.UV0,"vec2"),R.add("vColor","vec4"),R.add("vpos","vec3"),R.add("vLineDistance","float"),R.add("vLineWidth","float");const B=E;B&&R.add("vLineSizeInv","float");const U=W===w.ROUND,$=E&&U,H=I||$;H&&R.add("vLineDistanceNorm","float"),U&&(R.add("vSegmentSDF","float"),R.add("vReverseSegmentSDF","float")),z.code.add(S`vec2 perpendicular(vec2 v) {
6
6
  return vec2(v.y, -v.x);
7
7
  }
8
8
  float interp(float ncp, vec4 a, vec4 b) {
@@ -13,11 +13,11 @@ float s = sin(a);
13
13
  float c = cos(a);
14
14
  mat2 m = mat2(c, -s, s, c);
15
15
  return m * v;
16
- }`),z.code.add(u`vec4 projectAndScale(vec4 pos) {
16
+ }`),z.code.add(S`vec4 projectAndScale(vec4 pos) {
17
17
  vec4 posNdc = proj * pos;
18
18
  posNdc.xy *= viewport.zw / posNdc.w;
19
19
  return posNdc;
20
- }`),z.code.add(u`void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {
20
+ }`),z.code.add(S`void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {
21
21
  float vnp = nearFar[0] * 0.99;
22
22
  if(pos.z > -nearFar[0]) {
23
23
  if (!isStartVertex) {
@@ -47,7 +47,7 @@ forwardViewPosDepth(pos.xyz);
47
47
  pos = projectAndScale(pos);
48
48
  next = projectAndScale(next);
49
49
  prev = projectAndScale(prev);
50
- }`),m(z),z.constants.add("aaWidth","float",E?0:1).main.add(u`
50
+ }`),c(z),z.constants.add("aaWidth","float",E?0:1).main.add(S`
51
51
  // unpack values from uv0.y
52
52
  bool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;
53
53
 
@@ -72,25 +72,25 @@ prev = projectAndScale(prev);
72
72
 
73
73
  float lineWidth = lineSize * pixelRatio;
74
74
  vLineWidth = lineWidth;
75
- ${B?u`vLineSizeInv = 1.0 / lineSize;`:""}
75
+ ${B?S`vLineSizeInv = 1.0 / lineSize;`:""}
76
76
 
77
77
  vec4 pos = view * vec4(position, 1.0);
78
78
  vec4 prev = view * vec4(prevPosition, 1.0);
79
79
  vec4 next = view * vec4(nextPosition, 1.0);
80
- `),k&&z.main.add(u`vec4 other = isStartVertex ? next : prev;
80
+ `),k&&z.main.add(S`vec4 other = isStartVertex ? next : prev;
81
81
  bool markersHidden = areWorldMarkersHidden(pos, other);
82
82
  if(!isJoin && !markersHidden) {
83
83
  pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos) * 0.5;
84
- }`),z.main.add(u`clipAndTransform(pos, prev, next, isStartVertex);
84
+ }`),z.main.add(S`clipAndTransform(pos, prev, next, isStartVertex);
85
85
  vec2 left = (pos.xy - prev.xy);
86
86
  vec2 right = (next.xy - pos.xy);
87
87
  float leftLen = length(left);
88
- float rightLen = length(right);`);(E||U)&&z.main.add(u`
88
+ float rightLen = length(right);`);(E||U)&&z.main.add(S`
89
89
  float isEndVertex = float(!isStartVertex);
90
90
  vec2 segmentOrigin = mix(pos.xy, prev.xy, isEndVertex);
91
91
  vec2 segment = mix(right, left, isEndVertex);
92
- ${U?u`vec2 segmentEnd = mix(next.xy, pos.xy, isEndVertex);`:""}
93
- `),z.main.add(u`left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);
92
+ ${U?S`vec2 segmentEnd = mix(next.xy, pos.xy, isEndVertex);`:""}
93
+ `),z.main.add(S`left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);
94
94
  right = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);
95
95
  vec2 capDisplacementDir = vec2(0, 0);
96
96
  vec2 joinDisplacementDir = vec2(0, 0);
@@ -106,18 +106,18 @@ if (!isOutside) {
106
106
  displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));
107
107
  }
108
108
  }
109
- if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),N?z.main.add(u`
109
+ if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),N?z.main.add(S`
110
110
  vec2 startDir = leftLen < 0.001 ? right : left;
111
111
  startDir = perpendicular(startDir);
112
112
 
113
113
  vec2 endDir = rightLen < 0.001 ? left : right;
114
114
  endDir = perpendicular(endDir);
115
115
 
116
- float factor = ${E?u`min(1.0, subdivisionFactor * ${u.float((j+2)/(j+1))})`:u`subdivisionFactor`};
116
+ float factor = ${E?S`min(1.0, subdivisionFactor * ${S.float((j+2)/(j+1))})`:S`subdivisionFactor`};
117
117
 
118
118
  float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));
119
119
  joinDisplacementDir = rotate(startDir, -sign(uv0.y) * factor * rotationAngle);
120
- `):z.main.add(u`if (leftLen < 0.001) {
120
+ `):z.main.add(S`if (leftLen < 0.001) {
121
121
  joinDisplacementDir = right;
122
122
  }
123
123
  else if (rightLen < 0.001) {
@@ -126,7 +126,7 @@ joinDisplacementDir = left;
126
126
  else {
127
127
  joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? right : left;
128
128
  }
129
- joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==b.BUTT;return z.main.add(u`
129
+ joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==w.BUTT;return z.main.add(S`
130
130
  displacementLen = lineWidth;
131
131
  }
132
132
  } else {
@@ -134,27 +134,27 @@ joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==b.BUTT;r
134
134
  joinDisplacementDir = isStartVertex ? right : left;
135
135
  joinDisplacementDir = perpendicular(joinDisplacementDir);
136
136
 
137
- ${J?u`capDisplacementDir = isStartVertex ? -right : left;`:""}
137
+ ${J?S`capDisplacementDir = isStartVertex ? -right : left;`:""}
138
138
  }
139
- `),z.main.add(u`
139
+ `),z.main.add(S`
140
140
  // Displacement (in pixels) caused by join/or cap
141
141
  vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;
142
142
  float lineDistNorm = sign(uv0.y) * pos.w;
143
143
 
144
144
  vLineDistance = lineWidth * lineDistNorm;
145
- ${H?u`vLineDistanceNorm = lineDistNorm;`:""}
145
+ ${H?S`vLineDistanceNorm = lineDistNorm;`:""}
146
146
 
147
147
  pos.xy += dpos;
148
- `),U&&z.main.add(u`vec2 segmentDir = normalize(segment);
148
+ `),U&&z.main.add(S`vec2 segmentDir = normalize(segment);
149
149
  vSegmentSDF = (isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin, segmentDir) * pos.w) ;
150
- vReverseSegmentSDF = (isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir) * pos.w);`),E&&(V?z.uniforms.add(new h("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):z.main.add(u`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
151
- float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),z.main.add(u`float segmentLengthScreenDouble = length(segment);
150
+ vReverseSegmentSDF = (isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir) * pos.w);`),E&&(V?z.uniforms.add(new g("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):z.main.add(S`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
151
+ float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),z.main.add(S`float segmentLengthScreenDouble = length(segment);
152
152
  float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
153
153
  float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
154
154
  float segmentLengthRender = length(mix(nextPosition - position, position - prevPosition, isEndVertex));
155
- vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),V?z.main.add(u`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
156
- float startPseudoScreen = uv0.x * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):z.main.add(u`float startPseudoScreen = mix(uv0.x, uv0.x - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
157
- float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),z.uniforms.add(new S("stipplePatternPixelSize",(e=>o(e)))),z.main.add(u`float patternLength = lineSize * stipplePatternPixelSize;
155
+ vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),V?z.main.add(S`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
156
+ float startPseudoScreen = uv0.x * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):z.main.add(S`float startPseudoScreen = mix(uv0.x, uv0.x - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
157
+ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),z.uniforms.add(new h("stipplePatternPixelSize",(e=>o(e)))),z.main.add(S`float patternLength = lineSize * stipplePatternPixelSize;
158
158
  vStippleDistanceLimits = computeStippleDistanceLimits(startPseudoScreen, segmentLengthPseudoScreen, segmentLengthScreen, patternLength);
159
159
  vStippleDistance = mix(vStippleDistanceLimits.x, vStippleDistanceLimits.y, isEndVertex);
160
160
  if (segmentLengthScreenDouble >= 0.001) {
@@ -168,7 +168,7 @@ vStippleDistanceLimits = isJoin ?
168
168
  vStippleDistanceLimits :
169
169
  isStartVertex ?
170
170
  vec2(-1e34, vStippleDistanceLimits.y) :
171
- vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(u`
171
+ vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(S`
172
172
  // Convert back into NDC
173
173
  pos.xy = (pos.xy / viewport.zw) * pos.w;
174
174
 
@@ -181,8 +181,8 @@ vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(u`
181
181
  vpos = (inverseProjectionMatrix * pos).xyz;
182
182
  gl_Position = pos;
183
183
  forwardObjectAndLayerIdColor();
184
- }`),F.fragment.include(i,C),F.include(w,C),A.include(p),A.main.add(u`discardBySlice(vpos);
185
- discardByTerrainDepth();`),M?A.main.add(u`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(U&&A.main.add(u`
184
+ }`),F.fragment.include(i,C),F.include(L,C),A.include(d),A.main.add(S`discardBySlice(vpos);
185
+ discardByTerrainDepth();`),M?A.main.add(S`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(U&&A.main.add(S`
186
186
  float sdf = min(vSegmentSDF, vReverseSegmentSDF);
187
187
  vec2 fragmentPosition = vec2(
188
188
  min(sdf, 0.0),
@@ -193,10 +193,10 @@ discardByTerrainDepth();`),M?A.main.add(u`vec4 finalColor = vec4(1.0, 0.0, 1.0,
193
193
  float fragmentCapSDF = (fragmentRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
194
194
  float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
195
195
 
196
- if (capCoverage < ${u.float(d)}) {
196
+ if (capCoverage < ${S.float(y)}) {
197
197
  discard;
198
198
  }
199
- `),$?A.main.add(u`
199
+ `),$?A.main.add(S`
200
200
  vec2 stipplePosition = vec2(
201
201
  min(getStippleSDF() * 2.0 - 1.0, 0.0),
202
202
  vLineDistanceNorm * gl_FragCoord.w
@@ -204,11 +204,11 @@ discardByTerrainDepth();`),M?A.main.add(u`vec4 finalColor = vec4(1.0, 0.0, 1.0,
204
204
  float stippleRadius = length(stipplePosition * vLineWidth);
205
205
  float stippleCapSDF = (stippleRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
206
206
  float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
207
- float stippleAlpha = step(${u.float(d)}, stippleCoverage);
208
- `):A.main.add(u`float stippleAlpha = getStippleAlpha();`),O!==e.ObjectAndLayerIdColor&&A.main.add(u`discardByStippleAlpha(stippleAlpha, ${u.float(d)});`),A.uniforms.add(new f("intrinsicColor",(e=>e.color))),A.main.add(u`vec4 color = intrinsicColor * vColor;`),_&&(A.uniforms.add(new f("innerColor",(e=>e.innerColor??e.color)),new S("innerWidth",((e,i)=>e.innerWidth*i.camera.pixelRatio))),A.main.add(u`float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;
207
+ float stippleAlpha = step(${S.float(y)}, stippleCoverage);
208
+ `):A.main.add(S`float stippleAlpha = getStippleAlpha();`),O!==e.ObjectAndLayerIdColor&&A.main.add(S`discardByStippleAlpha(stippleAlpha, ${S.float(y)});`),A.uniforms.add(new f("intrinsicColor",(e=>e.color))),A.main.add(S`vec4 color = intrinsicColor * vColor;`),_&&(A.uniforms.add(new f("innerColor",(e=>e.innerColor??e.color)),new h("innerWidth",((e,i)=>e.innerWidth*i.camera.pixelRatio))),A.main.add(S`float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;
209
209
  float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
210
210
  float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
211
- color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`)),A.main.add(u`vec4 finalColor = blendStipple(color, stippleAlpha);`),I&&(A.uniforms.add(new S("falloff",(e=>e.falloff))),A.main.add(u`finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);`)),E||A.main.add(u`float featherStartDistance = max(vLineWidth - 2.0, 0.0);
211
+ color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`)),A.main.add(S`vec4 finalColor = blendStipple(color, stippleAlpha);`),I&&(A.uniforms.add(new h("falloff",(e=>e.falloff))),A.main.add(S`finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);`)),E||A.main.add(S`float featherStartDistance = max(vLineWidth - 2.0, 0.0);
212
212
  float value = abs(vLineDistance) * gl_FragCoord.w;
213
213
  float feather = (value - featherStartDistance) / (vLineWidth - featherStartDistance);
214
- finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`)),A.main.add(u`outputColorHighlightOID(finalColor, vpos);`),F}const F=Object.freeze(Object.defineProperty({__proto__:null,build:C,ribbonlineNumRoundJoinSubdivisions:j},Symbol.toStringTag,{value:"Module"}));export{F as R,C as b,j as r};
214
+ finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`)),A.main.add(S`outputColorHighlightOID(finalColor, vpos);`),F}const F=Object.freeze(Object.defineProperty({__proto__:null,build:C,ribbonlineNumRoundJoinSubdivisions:j},Symbol.toStringTag,{value:"Module"}));export{F as R,C as b,j as r};
@@ -2,30 +2,30 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- 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{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{TextureCoordinateAttribute as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as w}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as y,addAmbientBoostFactor as C,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as j,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as z,OverlayTerrain as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as M,TerrainTexture as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{alphaCutoff as N}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{addProjViewLocalOrigin as D,addViewNormal as W,addCameraPosition as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as F,If as U}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as _}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ShaderBuilder as H}from"../views/webgl/ShaderBuilder.js";class k extends M{}function E(r){const i=new H,{vertex:M,fragment:k,varyings:E}=i,{output:G,pbrMode:R,overlayMode:J,tileBorders:K,spherical:Q,transparencyMode:X,screenSizePerspective:Y}=r;i.include(p),i.include(g,r),i.include(f,r);const Z=()=>{i.include(S,r),M.code.add(F`vec3 getNormal() {
5
+ 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{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{TextureCoordinateAttribute as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as w}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as y,addAmbientBoostFactor as C,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as j,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as z,OverlayTerrain as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as M,TerrainTexture as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as N,addViewNormal as D,addCameraPosition as W}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as V,If as F}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as U}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as _}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as H}from"../webscene/support/AlphaCutoff.js";class k extends M{}function E(r){const i=new B,{vertex:M,fragment:k,varyings:E}=i,{output:G,pbrMode:R,overlayMode:J,tileBorders:K,spherical:Q,transparencyMode:X,screenSizePerspective:Y}=r;i.include(p),i.include(g,r),i.include(f,r);const Z=()=>{i.include(S,r),M.code.add(V`vec3 getNormal() {
6
6
  float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
7
7
  vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
8
8
  normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
9
9
  return normalize(n);
10
- }`)};D(M,r),i.include(v,r);const ee=X===t.InvisibleWithDraped||X===t.Invisible,re=J!==z.Disabled,oe=re&&ee;switch(G){case d.ColorEmission:case d.Color:{i.include($,r),i.include(y,r),re&&(r.pbrMode=R===L.Simplified?L.TerrainWithWater:L.Water,i.include(P,r),r.pbrMode=R);const t=J===z.EnabledWithWater;t&&i.include(w,r),E.add("vnormal","vec3"),E.add("vpos","vec3"),E.add("vup","vec3"),Z(),Y&&W(M);const n=r.receiveShadows&&!r.renderOccluded;n&&i.include(c,r),Y&&(E.add("screenSizeDistanceToCamera","float"),E.add("screenSizeCosAngle","float")),M.main.add(F`
10
+ }`)};N(M,r),i.include(v,r);const ee=X===t.InvisibleWithDraped||X===t.Invisible,re=J!==z.Disabled,oe=re&&ee;switch(G){case d.ColorEmission:case d.Color:{i.include($,r),i.include(y,r),re&&(r.pbrMode=R===L.Simplified?L.TerrainWithWater:L.Water,i.include(P,r),r.pbrMode=R);const t=J===z.EnabledWithWater;t&&i.include(w,r),E.add("vnormal","vec3"),E.add("vpos","vec3"),E.add("vup","vec3"),Z(),Y&&D(M);const n=r.receiveShadows&&!r.renderOccluded;n&&i.include(c,r),Y&&(E.add("screenSizeDistanceToCamera","float"),E.add("screenSizeCosAngle","float")),M.main.add(V`
11
11
  vpos = position;
12
12
  vec3 positionWorld = position + localOrigin;
13
13
  gl_Position = transformPosition(proj, view, vpos);
14
14
  vnormal = getNormal();
15
15
  vup = getLocalUp(position, localOrigin);
16
- ${U(t,F`forwardVertexTangent(vnormal);`)}
16
+ ${F(t,V`forwardVertexTangent(vnormal);`)}
17
17
 
18
18
  vec2 uv = getUV0();
19
19
  forwardTextureCoordinatesWithTransform(uv);
20
- ${U(re,"setOverlayVTC(uv);")}
21
- ${U(K,"forwardTextureCoordinates();")}
22
- ${U(Y,F`vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
20
+ ${F(re,"setOverlayVTC(uv);")}
21
+ ${F(K,"forwardTextureCoordinates();")}
22
+ ${F(Y,V`vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
23
23
  screenSizeDistanceToCamera = length(viewPos);
24
24
  vec3 viewSpaceNormal = (viewNormal * vec4(normalize(positionWorld), 1.0)).xyz;
25
25
  screenSizeCosAngle = abs(viewSpaceNormal.z);`)}
26
- ${U(n,"forwardLinearDepth();")}`),i.fragment.include(m,r),i.include(y,r),i.include(b,r),i.include(T,r),A(k,r),C(k),x(k),k.uniforms.add(M.uniforms.get("localOrigin"),new V("viewDirection",(({camera:e})=>o(q,a(q,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&k.uniforms.add(new B("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new _("view",(({origin:r},{camera:o})=>e(I,o.viewMatrix,r))));const s=.2;k.code.add(F`float lum(vec3 c) {
26
+ ${F(n,"forwardLinearDepth();")}`),i.fragment.include(m,r),i.include(y,r),i.include(b,r),i.include(T,r),W(k,r),C(k),x(k),k.uniforms.add(M.uniforms.get("localOrigin"),new A("viewDirection",(({camera:e})=>o(q,a(q,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&k.uniforms.add(new _("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new U("view",(({origin:r},{camera:o})=>e(I,o.viewMatrix,r))));const s=.2;k.code.add(V`float lum(vec3 c) {
27
27
  return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
28
- }`),j(k),O(k),k.main.add(F`
28
+ }`),j(k),O(k),k.main.add(V`
29
29
  vec3 normal = normalize(vnormal);
30
30
  float vndl = dot(normal, mainLightDirection);
31
31
 
@@ -35,21 +35,21 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
35
35
  float ssao = evaluateAmbientOcclusionInverse();
36
36
  vec4 tileColor = getTileColor();
37
37
 
38
- ${U(re,F`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
38
+ ${F(re,V`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
39
39
  vec4 overlayColor = overlayOpacity * overlayColorOpaque;
40
- ${U(ee,`if (overlayColor.a < ${F.float(N)}) { discard; }`)}
40
+ ${F(ee,`if (overlayColor.a < ${V.float(H)}) { discard; }`)}
41
41
  vec4 groundColor = tileColor;
42
42
  tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`)}
43
43
 
44
44
  // If combined alpha is 0 we can discard pixel. The performance impact by having a discard here
45
45
  // is neglectable because terrain typically renders first into the framebuffer.
46
- if(tileColor.a < ${F.float(N)}) {
46
+ if(tileColor.a < ${V.float(H)}) {
47
47
  discard;
48
48
  }
49
49
 
50
50
  bool sliced = rejectBySlice(vpos);
51
51
  if (sliced) {
52
- tileColor *= ${F.float(s)};
52
+ tileColor *= ${V.float(s)};
53
53
  }
54
54
 
55
55
  vec3 albedo = tileColor.rgb;
@@ -58,8 +58,8 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
58
58
 
59
59
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
60
60
 
61
- ${R===L.Simplified||R===L.TerrainWithWater?F`fragColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:F`fragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
62
- ${U(t,F`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
61
+ ${R===L.Simplified||R===L.TerrainWithWater?V`fragColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:V`fragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
62
+ ${F(t,V`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
63
63
  float waterNormalLength = length(overlayWaterMask);
64
64
  if (waterNormalLength > 0.95) {
65
65
  mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
@@ -67,11 +67,11 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
67
67
  vec4 viewPosition = view*vec4(vpos, 1.0);
68
68
  vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, waterOverlayColor, -normalize(vpos - cameraPosition), shadow, vnormal, tbnMatrix, viewPosition.xyz, vpos + localOrigin);
69
69
  vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
70
- float opacity = sliced ? ${F.float(s)} : 1.0;
70
+ float opacity = sliced ? ${V.float(s)} : 1.0;
71
71
  // un-gamma the ground color to mix in linear space
72
72
  fragColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w) * opacity;
73
73
  }`)}
74
- ${U(Y,F`float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, vec4(0.0));
74
+ ${F(Y,V`float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, vec4(0.0));
75
75
  if (perspectiveScale <= 0.25) {
76
76
  fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), perspectiveScale * 4.0);
77
77
  } else if (perspectiveScale <= 0.5) {
@@ -81,35 +81,35 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
81
81
  } else {
82
82
  fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), (perspectiveScale - 0.5) * 2.0);
83
83
  }`)}
84
- ${U(r.visualizeNormals,Q?F`
84
+ ${F(r.visualizeNormals,Q?V`
85
85
  vec3 localUp = normalize(vpos + localOrigin);
86
86
  vec3 right = normalize(cross(vec3(0.0, 0.0, 1.0), localUp));
87
87
  vec3 forward = normalize(cross(localUp, right));
88
88
  mat3 tbn = mat3(right, forward, localUp);
89
89
  vec3 tNormal = normalize(normal * tbn);
90
- fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`:F`
90
+ fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`:V`
91
91
  vec3 tNormal = normalize(normal);
92
92
  fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`)}
93
- ${U(K,F`vec2 dVuv = fwidth(vuv0);
93
+ ${F(K,V`vec2 dVuv = fwidth(vuv0);
94
94
  vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv0, 1.0 - vuv0));
95
95
  float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
96
96
  fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
97
- fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:oe&&i.include(P,r),M.main.add(F`
98
- ${U(oe,"setOverlayVTC(getUV0());")}
99
- gl_Position = transformPosition(proj, view, position);`),k.main.add(`${U(oe,`if (getCombinedOverlayColor().a < ${F.float(N)}) discard;`)}`);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:case d.ViewshedShadow:i.include(h,r),n(i),s(i),M.main.add(F`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),k.main.add(F`outputDepth(linearDepth);`);break;case d.Normal:oe&&i.include(P,r),E.add("vnormal","vec3"),W(M),Z(),M.main.add(F`
100
- ${U(oe,"setOverlayVTC(getUV0());")}
97
+ fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:oe&&i.include(P,r),M.main.add(V`
98
+ ${F(oe,"setOverlayVTC(getUV0());")}
99
+ gl_Position = transformPosition(proj, view, position);`),k.main.add(`${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}`);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:case d.ViewshedShadow:i.include(h,r),n(i),s(i),M.main.add(V`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),k.main.add(V`outputDepth(linearDepth);`);break;case d.Normal:oe&&i.include(P,r),E.add("vnormal","vec3"),D(M),Z(),M.main.add(V`
100
+ ${F(oe,"setOverlayVTC(getUV0());")}
101
101
  gl_Position = transformPosition(proj, view, position);
102
- vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),k.main.add(F`
103
- ${U(oe,`if (getCombinedOverlayColor().a < ${F.float(N)}) discard;`)}
102
+ vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),k.main.add(V`
103
+ ${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}
104
104
  vec3 normal = normalize(vnormal);
105
105
  if (gl_FrontFacing == false) {
106
106
  normal = -normal;
107
107
  }
108
- fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:re&&i.include(P,r),M.main.add(F`
109
- ${U(re,"setOverlayVTC(getUV0());")}
110
- gl_Position = transformPosition(proj, view, position);`),i.include(u,r),k.main.add(F`
111
- ${U(re,F`
108
+ fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:re&&i.include(P,r),M.main.add(V`
109
+ ${F(re,"setOverlayVTC(getUV0());")}
110
+ gl_Position = transformPosition(proj, view, position);`),i.include(u,r),k.main.add(V`
111
+ ${F(re,V`
112
112
  vec2 overlayHighlightTexel = getAllOverlayHighlightValuesEncoded();
113
113
  calculateOcclusionAndOutputHighlightOverlay(overlayHighlightTexel);`,"calculateOcclusionAndOutputHighlight();")}
114
- `)}if(G===d.ObjectAndLayerIdColor)if(re)r.pbrMode=L.Disabled,i.include(P,r),r.pbrMode=R,M.main.add(F`gl_Position = transformPosition(proj, view, position);
115
- setOverlayVTC(getUV0());`),k.main.add(F`fragColor = getOverlayColorTexel();`);else{const e=X===t.Opaque;M.main.add(F`${U(e,"gl_Position = transformPosition(proj, view, position);")}`),k.main.add(F`fragColor = vec4(0.0);`)}return i}const I=r(),q=i(),G=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:k,build:E},Symbol.toStringTag,{value:"Module"}));export{k as T,G as a,E as b};
114
+ `)}if(G===d.ObjectAndLayerIdColor)if(re)r.pbrMode=L.Disabled,i.include(P,r),r.pbrMode=R,M.main.add(V`gl_Position = transformPosition(proj, view, position);
115
+ setOverlayVTC(getUV0());`),k.main.add(V`fragColor = getOverlayColorTexel();`);else{const e=X===t.Opaque;M.main.add(V`${F(e,"gl_Position = transformPosition(proj, view, position);")}`),k.main.add(V`fragColor = vec4(0.0);`)}return i}const I=r(),q=i(),G=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:k,build:E},Symbol.toStringTag,{value:"Module"}));export{k as T,G as a,E as b};
@@ -2,16 +2,16 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as r,ShaderOutput as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{addMainLightDirection as l,addMainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{alphaCutoff as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as h,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as C}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as P}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";function O(O){const S=new x,{vertex:D,fragment:N}=S,{output:_,draped:F,receiveShadows:M}=O;h(D,O),S.include(a,O),S.attributes.add(C.POSITION,"vec3"),S.attributes.add(C.UV0,"vec2");const z=new y("waterColor",(e=>e.color));if(r(_)&&F)return S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(L`
6
- if (waterColor.a < ${L.float(u)}) {
5
+ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as r,ShaderOutput as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{addMainLightDirection as l,addMainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ColorConversion as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addCameraPosition as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as j}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as L}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as C}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as x}from"../webscene/support/AlphaCutoff.js";function O(O){const S=new P,{vertex:D,fragment:N}=S,{output:_,draped:F,receiveShadows:M}=O;f(D,O),S.include(a,O),S.attributes.add(L.POSITION,"vec3"),S.attributes.add(L.UV0,"vec2");const z=new b("waterColor",(e=>e.color));if(r(_)&&F)return S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
6
+ if (waterColor.a < ${j.float(x)}) {
7
7
  // Discard this vertex
8
8
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
9
9
  return;
10
10
  }
11
11
 
12
12
  vpos = position;
13
- gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(z),N.main.add(L`fragColor = waterColor;`),S;switch(r(_)&&(S.include(g,O),S.include(e,O),S.varyings.add("vuv","vec2"),S.varyings.add("vpos","vec3"),S.varyings.add("vnormal","vec3"),S.varyings.add("vtbnMatrix","mat3"),D.uniforms.add(z),D.main.add(L`
14
- if (waterColor.a < ${L.float(u)}) {
13
+ gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(z),N.main.add(j`fragColor = waterColor;`),S;switch(r(_)&&(S.include(g,O),S.include(e,O),S.varyings.add("vuv","vec2"),S.varyings.add("vpos","vec3"),S.varyings.add("vnormal","vec3"),S.varyings.add("vtbnMatrix","mat3"),D.uniforms.add(z),D.main.add(j`
14
+ if (waterColor.a < ${j.float(x)}) {
15
15
  // Discard this vertex
16
16
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
17
17
  return;
@@ -25,7 +25,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
25
25
  forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
26
26
 
27
27
  gl_Position = transformPosition(proj, view, vpos);
28
- forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(P,O),N.uniforms.add(z,new j("timeElapsed",(e=>e.timeElapsed)),D.uniforms.get("view"),D.uniforms.get("localOrigin")),b(N,O),N.include(f),l(N),d(N),N.main.add(L`
28
+ forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.uniforms.add(z,new y("timeElapsed",(e=>e.timeElapsed)),D.uniforms.get("view"),D.uniforms.get("localOrigin")),h(N,O),N.include(u),l(N),d(N),N.main.add(j`
29
29
  discardBySlice(vpos);
30
30
  discardByTerrainDepth();
31
31
  vec3 localUp = vnormal;
@@ -35,14 +35,14 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
35
35
  // we rotate the normal according to the tangent-bitangent-normal-Matrix
36
36
  vec3 n = normalize(vtbnMatrix * tangentNormalFoam.xyz);
37
37
  vec3 v = -normalize(vpos - cameraPosition);
38
- float shadow = ${M?L`1.0 - readShadowMap(vpos, linearDepth)`:"1.0"};
38
+ float shadow = ${M?j`1.0 - readShadowMap(vpos, linearDepth)`:"1.0"};
39
39
  vec4 vPosView = view * vec4(vpos, 1.0);
40
40
  vec4 final = vec4(getSeaColor(n, v, mainLightDirection, waterColor.rgb, mainLightIntensity, localUp, shadow, tangentNormalFoam.w, vPosView.xyz, vpos + localOrigin), waterColor.w);
41
41
 
42
42
  // gamma correction
43
43
  fragColor = delinearizeGamma(final);
44
- outputColorHighlightOID(fragColor, vpos);`);break;case i.Normal:S.include(g,O),S.include(w,O),S.fragment.include(o,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),D.uniforms.add(z),D.main.add(L`
45
- if (waterColor.a < ${L.float(u)}) {
44
+ outputColorHighlightOID(fragColor, vpos);`);break;case i.Normal:S.include(g,O),S.include(w,O),S.fragment.include(o,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),D.uniforms.add(z),D.main.add(j`
45
+ if (waterColor.a < ${j.float(x)}) {
46
46
  // Discard this vertex
47
47
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
48
48
  return;
@@ -51,20 +51,20 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
51
51
  vuv = uv0;
52
52
  vpos = position;
53
53
 
54
- gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new j("timeElapsed",(e=>e.timeElapsed))),N.main.add(L`discardBySlice(vpos);
54
+ gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(e=>e.timeElapsed))),N.main.add(j`discardBySlice(vpos);
55
55
  vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
56
56
  tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
57
- fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(s,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(L`
58
- if (waterColor.a < ${L.float(u)}) {
57
+ fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(n,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
58
+ if (waterColor.a < ${j.float(x)}) {
59
59
  // Discard this vertex
60
60
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
61
61
  return;
62
62
  }
63
63
 
64
64
  vpos = position;
65
- gl_Position = transformPosition(proj, view, vpos);`),S.fragment.include(o,O),N.main.add(L`discardBySlice(vpos);
66
- calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.include(n,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(L`
67
- if (waterColor.a < ${L.float(u)}) {
65
+ gl_Position = transformPosition(proj, view, vpos);`),S.fragment.include(o,O),N.main.add(j`discardBySlice(vpos);
66
+ calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.include(s,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
67
+ if (waterColor.a < ${j.float(x)}) {
68
68
  // Discard this vertex
69
69
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
70
70
  return;
@@ -72,5 +72,5 @@ calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.i
72
72
 
73
73
  vpos = position;
74
74
  gl_Position = transformPosition(proj, view, vpos);
75
- forwardObjectAndLayerIdColor();`),S.fragment.include(o,O),N.main.add(L`discardBySlice(vpos);
75
+ forwardObjectAndLayerIdColor();`),S.fragment.include(o,O),N.main.add(j`discardBySlice(vpos);
76
76
  outputObjectAndLayerIdColor();`)}return S}const S=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));export{S as W,O as b};
package/copyright.txt CHANGED
@@ -971,35 +971,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
971
971
 
972
972
  -------------------------------------------------------------------------------
973
973
 
974
- esri/libs/sortablejs/Sortable.js
975
-
976
- Sortable — is a JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices.
977
- https://github.com/SortableJS/Sortable
978
-
979
- MIT License
980
-
981
- Copyright (c) 2019 All contributors to Sortable
982
-
983
- Permission is hereby granted, free of charge, to any person obtaining a copy
984
- of this software and associated documentation files (the "Software"), to deal
985
- in the Software without restriction, including without limitation the rights
986
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
987
- copies of the Software, and to permit persons to whom the Software is
988
- furnished to do so, subject to the following conditions:
989
-
990
- The above copyright notice and this permission notice shall be included in all
991
- copies or substantial portions of the Software.
992
-
993
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
994
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
995
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
996
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
997
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
998
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
999
- SOFTWARE.
1000
-
1001
- -------------------------------------------------------------------------------
1002
-
1003
974
  vaadin/
1004
975
 
1005
976
  https://github.com/vaadin/web-components/tree/main/packages/grid