@arcgis/core 5.2.0-next.67 → 5.2.0-next.69

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 (443) hide show
  1. package/arcgisGlobal.d.ts +2 -0
  2. package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
  3. package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
  4. package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
  5. package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
  6. package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
  7. package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
  8. package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
  9. package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
  10. package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
  11. package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
  12. package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
  13. package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
  14. package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
  15. package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
  16. package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
  17. package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
  18. package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
  19. package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
  20. package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
  21. package/assets/components/assets/combobox/t9n/messages.json +1 -1
  22. package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
  23. package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
  24. package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
  25. package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
  26. package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
  27. package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
  28. package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
  29. package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
  30. package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
  31. package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
  32. package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
  33. package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
  34. package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
  35. package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
  36. package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
  37. package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
  38. package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
  39. package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
  40. package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
  41. package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
  42. package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
  43. package/assets/components/assets/icon/arcgisEnterprise16.json +1 -0
  44. package/assets/components/assets/icon/arcgisEnterprise24.json +1 -0
  45. package/assets/components/assets/icon/arcgisEnterprise32.json +1 -0
  46. package/assets/components/assets/icon/buildingIndex16.json +1 -0
  47. package/assets/components/assets/icon/buildingIndex24.json +1 -0
  48. package/assets/components/assets/icon/buildingIndex32.json +1 -0
  49. package/assets/components/assets/icon/fireIndex16.json +1 -0
  50. package/assets/components/assets/icon/fireIndex24.json +1 -0
  51. package/assets/components/assets/icon/fireIndex32.json +1 -0
  52. package/assets/components/assets/icon/geologyIndex16.json +1 -0
  53. package/assets/components/assets/icon/geologyIndex24.json +1 -0
  54. package/assets/components/assets/icon/geologyIndex32.json +1 -0
  55. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +1 -0
  56. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +1 -0
  57. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +1 -0
  58. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +1 -0
  59. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +1 -0
  60. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +1 -0
  61. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +1 -0
  62. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +1 -0
  63. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +1 -0
  64. package/assets/components/assets/icon/parquetFeatureLayer16.json +1 -0
  65. package/assets/components/assets/icon/parquetFeatureLayer24.json +1 -0
  66. package/assets/components/assets/icon/parquetFeatureLayer32.json +1 -0
  67. package/assets/components/assets/icon/publish32.json +1 -1
  68. package/assets/components/assets/icon/radarChart16.json +1 -0
  69. package/assets/components/assets/icon/radarChart24.json +1 -0
  70. package/assets/components/assets/icon/radarChart32.json +1 -0
  71. package/assets/components/assets/icon/returnToDefault16.json +1 -1
  72. package/assets/components/assets/icon/returnToDefault32.json +1 -1
  73. package/assets/components/assets/icon/smartSearch16.json +1 -0
  74. package/assets/components/assets/icon/smartSearch24.json +1 -0
  75. package/assets/components/assets/icon/smartSearch32.json +1 -0
  76. package/assets/components/assets/icon/snowIndex16.json +1 -0
  77. package/assets/components/assets/icon/snowIndex24.json +1 -0
  78. package/assets/components/assets/icon/snowIndex32.json +1 -0
  79. package/assets/components/assets/icon/soilAdjustedVegetationIndex16.json +1 -0
  80. package/assets/components/assets/icon/soilAdjustedVegetationIndex24.json +1 -0
  81. package/assets/components/assets/icon/soilAdjustedVegetationIndex32.json +1 -0
  82. package/assets/components/assets/icon/treeMap16.json +1 -0
  83. package/assets/components/assets/icon/treeMap24.json +1 -0
  84. package/assets/components/assets/icon/treeMap32.json +1 -0
  85. package/assets/components/assets/icon/userSave16.json +1 -0
  86. package/assets/components/assets/icon/userSave24.json +1 -0
  87. package/assets/components/assets/icon/userSave32.json +1 -0
  88. package/assets/components/assets/icon/vegetationIndex16.json +1 -0
  89. package/assets/components/assets/icon/vegetationIndex24.json +1 -0
  90. package/assets/components/assets/icon/vegetationIndex32.json +1 -0
  91. package/assets/components/assets/icon/weatherRadar16.json +1 -0
  92. package/assets/components/assets/icon/weatherRadar24.json +1 -0
  93. package/assets/components/assets/icon/weatherRadar32.json +1 -0
  94. package/assets/components/assets/input/t9n/messages.ar.json +1 -1
  95. package/assets/components/assets/input/t9n/messages.bg.json +1 -1
  96. package/assets/components/assets/input/t9n/messages.bs.json +1 -1
  97. package/assets/components/assets/input/t9n/messages.ca.json +1 -1
  98. package/assets/components/assets/input/t9n/messages.cs.json +1 -1
  99. package/assets/components/assets/input/t9n/messages.da.json +1 -1
  100. package/assets/components/assets/input/t9n/messages.de.json +1 -1
  101. package/assets/components/assets/input/t9n/messages.el.json +1 -1
  102. package/assets/components/assets/input/t9n/messages.en.json +1 -1
  103. package/assets/components/assets/input/t9n/messages.es.json +1 -1
  104. package/assets/components/assets/input/t9n/messages.et.json +1 -1
  105. package/assets/components/assets/input/t9n/messages.fi.json +1 -1
  106. package/assets/components/assets/input/t9n/messages.fr.json +1 -1
  107. package/assets/components/assets/input/t9n/messages.he.json +1 -1
  108. package/assets/components/assets/input/t9n/messages.hr.json +1 -1
  109. package/assets/components/assets/input/t9n/messages.hu.json +1 -1
  110. package/assets/components/assets/input/t9n/messages.id.json +1 -1
  111. package/assets/components/assets/input/t9n/messages.it.json +1 -1
  112. package/assets/components/assets/input/t9n/messages.ja.json +1 -1
  113. package/assets/components/assets/input/t9n/messages.json +1 -1
  114. package/assets/components/assets/input/t9n/messages.ko.json +1 -1
  115. package/assets/components/assets/input/t9n/messages.lt.json +1 -1
  116. package/assets/components/assets/input/t9n/messages.lv.json +1 -1
  117. package/assets/components/assets/input/t9n/messages.nl.json +1 -1
  118. package/assets/components/assets/input/t9n/messages.no.json +1 -1
  119. package/assets/components/assets/input/t9n/messages.pl.json +1 -1
  120. package/assets/components/assets/input/t9n/messages.pt-BR.json +1 -1
  121. package/assets/components/assets/input/t9n/messages.pt-PT.json +1 -1
  122. package/assets/components/assets/input/t9n/messages.ro.json +1 -1
  123. package/assets/components/assets/input/t9n/messages.ru.json +1 -1
  124. package/assets/components/assets/input/t9n/messages.sk.json +1 -1
  125. package/assets/components/assets/input/t9n/messages.sl.json +1 -1
  126. package/assets/components/assets/input/t9n/messages.sr.json +1 -1
  127. package/assets/components/assets/input/t9n/messages.sv.json +1 -1
  128. package/assets/components/assets/input/t9n/messages.th.json +1 -1
  129. package/assets/components/assets/input/t9n/messages.tr.json +1 -1
  130. package/assets/components/assets/input/t9n/messages.uk.json +1 -1
  131. package/assets/components/assets/input/t9n/messages.vi.json +1 -1
  132. package/assets/components/assets/input/t9n/messages.zh-CN.json +1 -1
  133. package/assets/components/assets/input/t9n/messages.zh-HK.json +1 -1
  134. package/assets/components/assets/input/t9n/messages.zh-TW.json +1 -1
  135. package/assets/components/assets/input-date-picker/t9n/messages.ar.json +1 -1
  136. package/assets/components/assets/input-date-picker/t9n/messages.bg.json +1 -1
  137. package/assets/components/assets/input-date-picker/t9n/messages.bs.json +1 -1
  138. package/assets/components/assets/input-date-picker/t9n/messages.ca.json +1 -1
  139. package/assets/components/assets/input-date-picker/t9n/messages.cs.json +1 -1
  140. package/assets/components/assets/input-date-picker/t9n/messages.da.json +1 -1
  141. package/assets/components/assets/input-date-picker/t9n/messages.de.json +1 -1
  142. package/assets/components/assets/input-date-picker/t9n/messages.el.json +1 -1
  143. package/assets/components/assets/input-date-picker/t9n/messages.en.json +1 -1
  144. package/assets/components/assets/input-date-picker/t9n/messages.es.json +1 -1
  145. package/assets/components/assets/input-date-picker/t9n/messages.et.json +1 -1
  146. package/assets/components/assets/input-date-picker/t9n/messages.fi.json +1 -1
  147. package/assets/components/assets/input-date-picker/t9n/messages.fr.json +1 -1
  148. package/assets/components/assets/input-date-picker/t9n/messages.he.json +1 -1
  149. package/assets/components/assets/input-date-picker/t9n/messages.hr.json +1 -1
  150. package/assets/components/assets/input-date-picker/t9n/messages.hu.json +1 -1
  151. package/assets/components/assets/input-date-picker/t9n/messages.id.json +1 -1
  152. package/assets/components/assets/input-date-picker/t9n/messages.it.json +1 -1
  153. package/assets/components/assets/input-date-picker/t9n/messages.ja.json +1 -1
  154. package/assets/components/assets/input-date-picker/t9n/messages.json +1 -1
  155. package/assets/components/assets/input-date-picker/t9n/messages.ko.json +1 -1
  156. package/assets/components/assets/input-date-picker/t9n/messages.lt.json +1 -1
  157. package/assets/components/assets/input-date-picker/t9n/messages.lv.json +1 -1
  158. package/assets/components/assets/input-date-picker/t9n/messages.nl.json +1 -1
  159. package/assets/components/assets/input-date-picker/t9n/messages.no.json +1 -1
  160. package/assets/components/assets/input-date-picker/t9n/messages.pl.json +1 -1
  161. package/assets/components/assets/input-date-picker/t9n/messages.pt-BR.json +1 -1
  162. package/assets/components/assets/input-date-picker/t9n/messages.pt-PT.json +1 -1
  163. package/assets/components/assets/input-date-picker/t9n/messages.ro.json +1 -1
  164. package/assets/components/assets/input-date-picker/t9n/messages.ru.json +1 -1
  165. package/assets/components/assets/input-date-picker/t9n/messages.sk.json +1 -1
  166. package/assets/components/assets/input-date-picker/t9n/messages.sl.json +1 -1
  167. package/assets/components/assets/input-date-picker/t9n/messages.sr.json +1 -1
  168. package/assets/components/assets/input-date-picker/t9n/messages.sv.json +1 -1
  169. package/assets/components/assets/input-date-picker/t9n/messages.th.json +1 -1
  170. package/assets/components/assets/input-date-picker/t9n/messages.tr.json +1 -1
  171. package/assets/components/assets/input-date-picker/t9n/messages.uk.json +1 -1
  172. package/assets/components/assets/input-date-picker/t9n/messages.vi.json +1 -1
  173. package/assets/components/assets/input-date-picker/t9n/messages.zh-CN.json +1 -1
  174. package/assets/components/assets/input-date-picker/t9n/messages.zh-HK.json +1 -1
  175. package/assets/components/assets/input-date-picker/t9n/messages.zh-TW.json +1 -1
  176. package/assets/components/assets/input-number/t9n/messages.ar.json +1 -1
  177. package/assets/components/assets/input-number/t9n/messages.bg.json +1 -1
  178. package/assets/components/assets/input-number/t9n/messages.bs.json +1 -1
  179. package/assets/components/assets/input-number/t9n/messages.ca.json +1 -1
  180. package/assets/components/assets/input-number/t9n/messages.cs.json +1 -1
  181. package/assets/components/assets/input-number/t9n/messages.da.json +1 -1
  182. package/assets/components/assets/input-number/t9n/messages.de.json +1 -1
  183. package/assets/components/assets/input-number/t9n/messages.el.json +1 -1
  184. package/assets/components/assets/input-number/t9n/messages.en.json +1 -1
  185. package/assets/components/assets/input-number/t9n/messages.es.json +1 -1
  186. package/assets/components/assets/input-number/t9n/messages.et.json +1 -1
  187. package/assets/components/assets/input-number/t9n/messages.fi.json +1 -1
  188. package/assets/components/assets/input-number/t9n/messages.fr.json +1 -1
  189. package/assets/components/assets/input-number/t9n/messages.he.json +1 -1
  190. package/assets/components/assets/input-number/t9n/messages.hr.json +1 -1
  191. package/assets/components/assets/input-number/t9n/messages.hu.json +1 -1
  192. package/assets/components/assets/input-number/t9n/messages.id.json +1 -1
  193. package/assets/components/assets/input-number/t9n/messages.it.json +1 -1
  194. package/assets/components/assets/input-number/t9n/messages.ja.json +1 -1
  195. package/assets/components/assets/input-number/t9n/messages.json +1 -1
  196. package/assets/components/assets/input-number/t9n/messages.ko.json +1 -1
  197. package/assets/components/assets/input-number/t9n/messages.lt.json +1 -1
  198. package/assets/components/assets/input-number/t9n/messages.lv.json +1 -1
  199. package/assets/components/assets/input-number/t9n/messages.nl.json +1 -1
  200. package/assets/components/assets/input-number/t9n/messages.no.json +1 -1
  201. package/assets/components/assets/input-number/t9n/messages.pl.json +1 -1
  202. package/assets/components/assets/input-number/t9n/messages.pt-BR.json +1 -1
  203. package/assets/components/assets/input-number/t9n/messages.pt-PT.json +1 -1
  204. package/assets/components/assets/input-number/t9n/messages.ro.json +1 -1
  205. package/assets/components/assets/input-number/t9n/messages.ru.json +1 -1
  206. package/assets/components/assets/input-number/t9n/messages.sk.json +1 -1
  207. package/assets/components/assets/input-number/t9n/messages.sl.json +1 -1
  208. package/assets/components/assets/input-number/t9n/messages.sr.json +1 -1
  209. package/assets/components/assets/input-number/t9n/messages.sv.json +1 -1
  210. package/assets/components/assets/input-number/t9n/messages.th.json +1 -1
  211. package/assets/components/assets/input-number/t9n/messages.tr.json +1 -1
  212. package/assets/components/assets/input-number/t9n/messages.uk.json +1 -1
  213. package/assets/components/assets/input-number/t9n/messages.vi.json +1 -1
  214. package/assets/components/assets/input-number/t9n/messages.zh-CN.json +1 -1
  215. package/assets/components/assets/input-number/t9n/messages.zh-HK.json +1 -1
  216. package/assets/components/assets/input-number/t9n/messages.zh-TW.json +1 -1
  217. package/assets/components/assets/input-text/t9n/messages.ar.json +1 -1
  218. package/assets/components/assets/input-text/t9n/messages.bg.json +1 -1
  219. package/assets/components/assets/input-text/t9n/messages.bs.json +1 -1
  220. package/assets/components/assets/input-text/t9n/messages.ca.json +1 -1
  221. package/assets/components/assets/input-text/t9n/messages.cs.json +1 -1
  222. package/assets/components/assets/input-text/t9n/messages.da.json +1 -1
  223. package/assets/components/assets/input-text/t9n/messages.de.json +1 -1
  224. package/assets/components/assets/input-text/t9n/messages.el.json +1 -1
  225. package/assets/components/assets/input-text/t9n/messages.en.json +1 -1
  226. package/assets/components/assets/input-text/t9n/messages.es.json +1 -1
  227. package/assets/components/assets/input-text/t9n/messages.et.json +1 -1
  228. package/assets/components/assets/input-text/t9n/messages.fi.json +1 -1
  229. package/assets/components/assets/input-text/t9n/messages.fr.json +1 -1
  230. package/assets/components/assets/input-text/t9n/messages.he.json +1 -1
  231. package/assets/components/assets/input-text/t9n/messages.hr.json +1 -1
  232. package/assets/components/assets/input-text/t9n/messages.hu.json +1 -1
  233. package/assets/components/assets/input-text/t9n/messages.id.json +1 -1
  234. package/assets/components/assets/input-text/t9n/messages.it.json +1 -1
  235. package/assets/components/assets/input-text/t9n/messages.ja.json +1 -1
  236. package/assets/components/assets/input-text/t9n/messages.json +1 -1
  237. package/assets/components/assets/input-text/t9n/messages.ko.json +1 -1
  238. package/assets/components/assets/input-text/t9n/messages.lt.json +1 -1
  239. package/assets/components/assets/input-text/t9n/messages.lv.json +1 -1
  240. package/assets/components/assets/input-text/t9n/messages.nl.json +1 -1
  241. package/assets/components/assets/input-text/t9n/messages.no.json +1 -1
  242. package/assets/components/assets/input-text/t9n/messages.pl.json +1 -1
  243. package/assets/components/assets/input-text/t9n/messages.pt-BR.json +1 -1
  244. package/assets/components/assets/input-text/t9n/messages.pt-PT.json +1 -1
  245. package/assets/components/assets/input-text/t9n/messages.ro.json +1 -1
  246. package/assets/components/assets/input-text/t9n/messages.ru.json +1 -1
  247. package/assets/components/assets/input-text/t9n/messages.sk.json +1 -1
  248. package/assets/components/assets/input-text/t9n/messages.sl.json +1 -1
  249. package/assets/components/assets/input-text/t9n/messages.sr.json +1 -1
  250. package/assets/components/assets/input-text/t9n/messages.sv.json +1 -1
  251. package/assets/components/assets/input-text/t9n/messages.th.json +1 -1
  252. package/assets/components/assets/input-text/t9n/messages.tr.json +1 -1
  253. package/assets/components/assets/input-text/t9n/messages.uk.json +1 -1
  254. package/assets/components/assets/input-text/t9n/messages.vi.json +1 -1
  255. package/assets/components/assets/input-text/t9n/messages.zh-CN.json +1 -1
  256. package/assets/components/assets/input-text/t9n/messages.zh-HK.json +1 -1
  257. package/assets/components/assets/input-text/t9n/messages.zh-TW.json +1 -1
  258. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  259. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  260. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  261. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  262. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  263. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  264. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  265. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  266. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  267. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  268. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  269. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  270. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  271. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  272. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  273. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  274. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  275. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  276. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  277. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  278. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  279. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  280. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  281. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  282. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  283. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  284. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  285. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  286. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  287. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  288. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  289. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  290. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  291. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  292. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  293. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  294. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  295. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  296. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  297. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  298. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  299. package/assets/esri/core/workers/RemoteClient.js +1 -1
  300. package/assets/esri/core/workers/chunks/{6f39545710d1b35d922c.js → 181f330314c1989f642f.js} +1 -1
  301. package/assets/esri/core/workers/chunks/{d4058352db1e8255b52e.js → 1d38a710cf799cb0e5b3.js} +1 -1
  302. package/assets/esri/core/workers/chunks/{59dd83e5aee2908c7eca.js → 3f84ade6285560b692d1.js} +1 -1
  303. package/assets/esri/core/workers/chunks/{25197ecb324d6f08e03e.js → 538bdf02c4dfb5ec72fe.js} +1 -1
  304. package/assets/esri/core/workers/chunks/{f5c9659fc5d571d501c9.js → 59a795eba31061dc357a.js} +1 -1
  305. package/assets/esri/core/workers/chunks/{7d163d9d90393e491ee5.js → 5fb0e8f89b885e5e3742.js} +1 -1
  306. package/assets/esri/core/workers/chunks/{19bf6826e7d9a4d52035.js → 6cc1120554bcb1b4899b.js} +1 -1
  307. package/assets/esri/core/workers/chunks/7dd672c25beb8813cc75.js +2 -0
  308. package/assets/esri/core/workers/chunks/{d7267f429a051943187b.js → 873d8332e2149eb1b36a.js} +1 -1
  309. package/assets/esri/core/workers/chunks/{a97e0b9b057664911c14.js → 8f8db62f126e4a8c1bf7.js} +1 -1
  310. package/assets/esri/core/workers/chunks/b526055794e64b0227ca.js +256 -0
  311. package/assets/esri/core/workers/chunks/be291d920ebc68fde02b.js +2 -0
  312. package/assets/esri/core/workers/chunks/c10a0eebd935472d8fae.js +1 -0
  313. package/assets/esri/core/workers/chunks/c97451f75c23be979476.js +1 -0
  314. package/assets/esri/core/workers/chunks/d198ecb1fe3690d6092f.js +2 -0
  315. package/assets/esri/core/workers/chunks/d2a51c797b2966cb95f3.js +2 -0
  316. package/assets/esri/core/workers/chunks/d303621c902330be5035.js +1 -0
  317. package/assets/esri/core/workers/chunks/{7d4c65311064a5c2e0b1.js → df89bf05c18f0c8e418b.js} +1 -1
  318. package/assets/esri/core/workers/chunks/f4e813ead56d963b16b8.js +1 -0
  319. package/assets/esri/core/workers/chunks/f6f1122bed931f1d960b.js +1 -0
  320. package/assets/esri/core/workers/chunks/f82cd34a79c8aa58d40c.js +2 -0
  321. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +1 -0
  322. package/assets/esri/themes/dark/main.css +1 -1
  323. package/assets/esri/themes/light/main.css +1 -1
  324. package/assets/esri/themes/light/view.css +1 -1
  325. package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
  326. package/chunks/DeepSky.glsl.js +66 -0
  327. package/chunks/GaussianSplat.glsl.js +10 -9
  328. package/chunks/GaussianSplatDepth.glsl.js +11 -0
  329. package/chunks/GaussianSplatShadow.glsl.js +7 -16
  330. package/config.js +1 -1
  331. package/interfaces.d.ts +0 -14
  332. package/kernel.js +1 -1
  333. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  334. package/networks/RulesTable.js +1 -1
  335. package/networks/UtilityNetwork.js +1 -1
  336. package/networks/support/utils.js +1 -1
  337. package/package.json +4 -4
  338. package/popup/FeatureContent.d.ts +17 -96
  339. package/popup/FeatureContentCollection.d.ts +71 -188
  340. package/support/revision.js +1 -1
  341. package/symbols/LabelSymbol3D.js +1 -1
  342. package/symbols/LineSymbol3D.js +1 -1
  343. package/symbols/MeshSymbol3D.js +1 -1
  344. package/symbols/PointSymbol3D.js +1 -1
  345. package/symbols/PolygonSymbol3D.js +1 -1
  346. package/third-party-notices.txt +9 -0
  347. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  348. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  349. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  350. package/views/2d/layers/support/MediaLayerInteraction.js +1 -1
  351. package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +46 -0
  352. package/views/2d/layers/support/MediaLayerInteractionOptions.js +1 -1
  353. package/views/2d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +22 -0
  354. package/views/2d/layers/support/MediaLayerInteractionReshapeOptions.js +2 -0
  355. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  356. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  357. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  358. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  359. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  360. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  361. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  362. package/views/3d/layers/I3SMeshView3D.js +1 -1
  363. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  364. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  365. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  366. package/views/3d/layers/i3s/SweptSphereVolume.js +2 -0
  367. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +0 -1
  368. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  369. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  370. package/views/3d/support/hitTest.js +1 -1
  371. package/views/3d/terrain/TerrainSurface.js +1 -1
  372. package/views/3d/webgl/RenderCamera.js +1 -1
  373. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  374. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  375. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  376. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  377. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  378. package/views/3d/webgl-engine/effects/stars/DeepSky.glsl.js +2 -0
  379. package/views/3d/webgl-engine/effects/stars/DeepSkyTechnique.js +2 -0
  380. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  381. package/views/3d/webgl-engine/effects/stars/starsUtils.js +2 -0
  382. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  383. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +2 -0
  384. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  385. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  386. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  387. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  388. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  389. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  390. package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +2 -0
  391. package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +2 -0
  392. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +2 -0
  393. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +97 -0
  394. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  395. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
  396. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  397. package/views/3d/webgl.js +1 -1
  398. package/widgets/BasemapLayerList.js +1 -1
  399. package/widgets/Bookmarks.js +1 -1
  400. package/widgets/Daylight.js +1 -1
  401. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  402. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  403. package/widgets/Editor/legacy/AddAssociationWorkflow.js +1 -1
  404. package/widgets/Editor/legacy/AddAssociationWorkflowData.js +1 -1
  405. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/AssociationDetails.js +1 -1
  406. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  407. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  408. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  409. package/widgets/LayerList.js +1 -1
  410. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  411. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  412. package/widgets/PanoramicVideoViewer.js +1 -1
  413. package/widgets/PanoramicViewer.js +1 -1
  414. package/widgets/Print.js +1 -1
  415. package/widgets/Search/support/locatorUtils.js +1 -1
  416. package/widgets/ShadowCast.js +1 -1
  417. package/widgets/Sketch.js +1 -1
  418. package/widgets/TableList.js +1 -1
  419. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  420. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  421. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  422. package/widgets/support/SelectionToolbar.js +1 -1
  423. package/widgets/support/SketchTooltipControls.js +1 -1
  424. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  425. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  426. package/widgets/support/UtilityNetworkAssociations/utils/isFromElement.js +1 -1
  427. package/assets/esri/core/workers/chunks/15de305ac3d6433748e7.js +0 -1
  428. package/assets/esri/core/workers/chunks/2426601b8cae7f06af4d.js +0 -256
  429. package/assets/esri/core/workers/chunks/242cad472fbc38b24dbc.js +0 -2
  430. package/assets/esri/core/workers/chunks/24c0b3586bb6500eda53.js +0 -2
  431. package/assets/esri/core/workers/chunks/394716bd1ecfd638d708.js +0 -2
  432. package/assets/esri/core/workers/chunks/55af58b6dff52dc040fe.js +0 -2
  433. package/assets/esri/core/workers/chunks/5b18696109fe84a1010a.js +0 -2
  434. package/assets/esri/core/workers/chunks/7f6eee102871769fdf8f.js +0 -1
  435. package/assets/esri/core/workers/chunks/93c0a620a147cbf4a0ba.js +0 -1
  436. package/assets/esri/core/workers/chunks/a27172dacdb85a774c4b.js +0 -1
  437. package/assets/esri/core/workers/chunks/ddafe402f1bc9e8285ef.js +0 -1
  438. package/views/3d/layers/i3s/SphereCone.js +0 -2
  439. /package/assets/esri/core/workers/chunks/{394716bd1ecfd638d708.js.LICENSE.txt → 7dd672c25beb8813cc75.js.LICENSE.txt} +0 -0
  440. /package/assets/esri/core/workers/chunks/{55af58b6dff52dc040fe.js.LICENSE.txt → be291d920ebc68fde02b.js.LICENSE.txt} +0 -0
  441. /package/assets/esri/core/workers/chunks/{24c0b3586bb6500eda53.js.LICENSE.txt → d198ecb1fe3690d6092f.js.LICENSE.txt} +0 -0
  442. /package/assets/esri/core/workers/chunks/{5b18696109fe84a1010a.js.LICENSE.txt → d2a51c797b2966cb95f3.js.LICENSE.txt} +0 -0
  443. /package/assets/esri/core/workers/chunks/{242cad472fbc38b24dbc.js.LICENSE.txt → f82cd34a79c8aa58d40c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"../../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Matrix4PassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/DeepSky.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ReloadableShader as t}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{D as i}from"../../../../../chunks/DeepSky.glsl.js";import{NoParameters as a}from"../../../../webgl/NoParameters.js";import{makePipelineState as c,defaultColorWrite as l,unpremultipliedAlphaToPremultipliedAlpha as n}from"../../../../webgl/renderState.js";class m extends a{constructor(){super(...arguments),this.inverseModelMatrix=s(),this.bandTexture=null}}let p=class extends o{constructor(){super(...arguments),this.shader=new t(i,()=>import("./DeepSky.glsl.js"))}initializePipeline(){return c({blending:n,depthTest:{func:515},colorWrite:l})}};p=e([r("esri.views.3d.webgl-engine.effects.stars.DeepSkyTechnique")],p);export{m as DeepSkyPassParameters,p as DeepSkyTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{fetchAsset as e}from"../../../../../assets.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Error.js";import a from"../../../../../core/Logger.js";import{abortMaybe as i,disposeMaybe as n}from"../../../../../core/maybe.js";import{isAbortError as o}from"../../../../../core/promiseUtils.js";import{watch as f,initial as c,syncAndInitial as m}from"../../../../../core/reactiveUtils.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{copy as u,rotateZ as d,multiply as l}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{fromValues as p}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{InternalRenderCategory as b}from"../../../webgl.js";import{glLayout as _}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as g}from"../OpaqueEnvironment.js";import{StarPassParameters as w,StarsTechnique as v,layout as j}from"./StarsTechnique.js";import{VertexArrayObject as P}from"../../lib/VertexArrayObject.js";import{ColorAttachment0 as D,PrimitiveType as y}from"../../../../webgl/enums.js";import{VertexBuffer as T}from"../../../../webgl/VertexBuffer.js";let M=class extends g{constructor(){super(...arguments),this._numPoints=0,this._passParameters=new w}initialize(){this.addHandles([f(()=>this.view.environment.starsEnabled,t=>t?this._enable():this._disable(),c),f(()=>"virtual"===this.view.environment.lighting.type?null:this.view.environment.lighting.date,t=>this._update(t),m)])}_enable(){super._enable(),this._loadDataTask=this._createLoadDataTask()}get loading(){return!!this._loadDataTask&&!this._loadDataTask.finished}destroy(){this._loadDataTask=i(this._loadDataTask),this._numPoints=0,this._vao=n(this._vao),this._starData=null}render(t){const e=t.find(({name:t})=>t===b.OPAQUE_ENVIRONMENT),s=this.techniques.getCompiled(v);if(this.loading||!s)return this.requestRender(1),e;if(!this._starData)return e;this._vao??=this._ensureResources(this._starData);const r=this.renderingContext;return r.bindTechnique(s,this.bindParameters,this._passParameters),r.setDrawBuffers([D]),r.bindVAO(this._vao),r.drawArrays(y.POINTS,0,this._numPoints),e}_ensureResources(t){this._numPoints=t.byteLength/R;const e=new Float32Array(t,0,2*this._numPoints),s=new Uint8Array(t,2*this._numPoints*4,this._numPoints);return x(this.renderingContext,e,s,this._numPoints)}_update(t){if(!t)return;const e=(t.getHours()/12+t.getMinutes()/60*(2/24)+t.getSeconds()/60*(2/1440)-.9972222)%2,s=2*k(t),r=u(this._passParameters.modelMatrix,O);d(r,r,-s*Math.PI),l(r,L,r),d(r,r,-e*Math.PI),this.requestRender(1)}_createLoadDataTask(){if(this._starData)return null;const t=s(async t=>{const{data:s}=await e("esri/views/3d/environment/resources/stars.wsv",{responseType:"array-buffer",signal:t});q(s),this._starData=s});return t.promise.catch(t=>{o(t)||a.getLogger(this).error(t)}).then(()=>{this.destroyed||this.requestRender(1)}),t}};function x(t,e,s,r){const a=j.createBuffer(r),i=a.position,n=a.color,o=a.size;for(let f=0;f<r;f++){const t=e[2*f],r=e[2*f+1];i.set(f,0,-Math.cos(t)*Math.sin(r)),i.set(f,1,-Math.sin(t)*Math.sin(r)),i.set(f,2,-Math.cos(r));const a=A(s[f]),c=I(E[a[1]]);n.set(f,0,c[0]),n.set(f,1,c[1]),n.set(f,2,c[2]),n.set(f,3,255),o.set(f,a[0])}return new P(t,new T(t,_(j),a.buffer))}function k(t){const e=t,s=new Date(t.getFullYear(),0,1,11,58,56);return(+e-+s)/(+new Date(t.getFullYear()+1,0,1,11,58,55)-+s)}function q(t){if(!t)throw new r("stars:no-data-received","Failed to create stars because star catalogue is missing");const e=t.byteLength/R;if(e%1!=0||e>5e4||e<5e3)throw new r("stars:invalid-data","Failed to create stars because star catalogue data is invalid")}function I(t){return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function A(t){return t>=192?[2.9,t-192]:t>=160?[2.5,t-160]:t>=128?[2,t-128]:t>=96?[1.5,t-96]:t>=64?[1,t-64]:t>=32?[.7,t-32]:[.4,t]}M=t([h("esri.views.3d.webgl-engine.effects.stars.Stars")],M);const E=["9bb2ff","9eb5ff","aabfff","bbccff","ccd8ff ","dae2ff","e4e9ff","eeefff","f8f6ff","fff9fb","fff5ef","fff1e5","ffeddb","ffe9d2","ffe6ca","ffe3c3","ffe0bb","ffddb4","ffdaad","ffd6a5","ffd29c","ffcc8f","ffc178","ffa94b","ff7b00"],L=p(1,0,0,0,0,.9174771405229186,.39778850739794974,0,0,-.39778850739794974,.9174771405229186,0,0,0,0,1),O=p(1,0,0,0,0,.9174771405229186,-.39778850739794974,0,0,.39778850739794974,.9174771405229186,0,0,0,0,1),R=9;export{M as Stars};
2
+ import{__decorate as e}from"tslib";import{fetchAsset as t}from"../../../../../assets.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Error.js";import a from"../../../../../core/Logger.js";import{abortMaybe as i,disposeMaybe as n}from"../../../../../core/maybe.js";import{isAbortError as o,throwIfAborted as f}from"../../../../../core/promiseUtils.js";import{watch as d,initial as h,syncAndInitial as c}from"../../../../../core/reactiveUtils.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{copy as m,rotateZ as l,multiply as b,invertOrIdentity as p}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{InternalRenderCategory as _}from"../../../webgl.js";import{glLayout as T}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as g}from"../OpaqueEnvironment.js";import{DeepSkyPassParameters as w,DeepSkyTechnique as x}from"./DeepSkyTechnique.js";import{StarPassParameters as y,StarsTechnique as P,layout as v}from"./StarsTechnique.js";import{getDailyRotationCoefficient as k,computeDayDuration as j,eq2ec as D,ec2eq as M}from"./starsUtils.js";import{createTextureKTX2 as q}from"../../lib/BasisUtil.js";import{VertexArrayObject as L}from"../../lib/VertexArrayObject.js";import{ColorAttachment0 as S,PrimitiveType as U}from"../../../../webgl/enums.js";import{TextureDescriptor as A}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as B}from"../../../../webgl/VertexBuffer.js";let I=class extends g{constructor(){super(...arguments),this._numPoints=0,this._passParameters=new y,this._deepSkyPassParameters=new w}initialize(){this.addHandles([d(()=>this.view.environment.starsEnabled,e=>e?this._enable():this._disable(),h),d(()=>"virtual"===this.view.environment.lighting.type?null:this.view.environment.lighting.date,e=>this._update(e),c)])}_enable(){super._enable(),this._bandTextureTask=this._createLoadBandTextureTask(),this._loadDataTask=this._createLoadDataTask()}get loading(){return!!this._loadDataTask&&!this._loadDataTask.finished||!!this._bandTextureTask&&!this._bandTextureTask.finished}destroy(){this._bandTextureTask=i(this._bandTextureTask),this._bandTexture=n(this._bandTexture),this._loadDataTask=i(this._loadDataTask),this._numPoints=0,this._vao=n(this._vao),this._starData=null}render(e){const t=e.find(({name:e})=>e===_.OPAQUE_ENVIRONMENT),s=this.techniques.getCompiled(P),r=this.techniques.getCompiled(x);if(this.loading||!s||!r)return this.requestRender(1),t;const a=this.renderingContext;return this._bandTexture&&(this._deepSkyPassParameters.bandTexture=this._bandTexture,a.bindTechnique(r,this.bindParameters,this._deepSkyPassParameters),a.setDrawBuffers([S]),a.screen.draw()),this._starData&&(this._vao??=this._ensureResources(this._starData),a.bindTechnique(s,this.bindParameters,this._passParameters),a.setDrawBuffers([S]),a.bindVAO(this._vao),a.drawArrays(U.POINTS,0,this._numPoints)),t}_ensureResources(e){this._numPoints=e.byteLength/z;const t=new Float32Array(e,0,2*this._numPoints),s=new Uint8Array(e,2*this._numPoints*4,this._numPoints);return R(this.renderingContext,t,s,this._numPoints)}_update(e){if(!e)return;const t=k(e),s=2*j(e),r=m(this._passParameters.modelMatrix,D);l(r,r,-s*Math.PI),b(r,M,r),l(r,r,-t*Math.PI),p(this._deepSkyPassParameters.inverseModelMatrix,r),this.requestRender(1)}_createLoadDataTask(){if(this._starData)return null;const e=s(async e=>{const{data:s}=await t(F,{responseType:"array-buffer",signal:e});E(s),this._starData=s});return e.promise.catch(e=>{o(e)||a.getLogger(this).error(e)}).then(()=>{this.destroyed||this.requestRender(1)}),e}_createLoadBandTextureTask(){if(this._bandTexture)return null;const e=s(async e=>{const{data:s}=await t(N,{responseType:"array-buffer",signal:e});f(e);const a=new A;a.wrapMode=33071,a.hasMipmap=!0,a.maxAnisotropy=8;const i=await q(this.renderingContext,a,s);if(e.aborted&&(i?.dispose(),f(e)),!i)throw new r("stars:invalid-band-texture","Failed to transcode Milky Way band texture.");this._bandTexture=i});return e.promise.catch(e=>{o(e)||a.getLogger(this).warn("Failed to load Milky Way band texture.",e)}).then(()=>{this.destroyed||this.requestRender(1)}),e}};function R(e,t,s,r){const a=v.createBuffer(r),i=a.position,n=a.color,o=a.size;for(let f=0;f<r;f++){const e=t[2*f],r=t[2*f+1];i.set(f,0,-Math.cos(e)*Math.sin(r)),i.set(f,1,-Math.sin(e)*Math.sin(r)),i.set(f,2,-Math.cos(r));const a=C(s[f]),d=O(V[a[1]]);n.set(f,0,d[0]),n.set(f,1,d[1]),n.set(f,2,d[2]),n.set(f,3,255),o.set(f,a[0])}return new L(e,new B(e,T(v),a.buffer))}function E(e){if(!e)throw new r("stars:no-data-received","Failed to create stars because star catalogue is missing");const t=e.byteLength/z;if(t%1!=0||t>5e4||t<5e3)throw new r("stars:invalid-data","Failed to create stars because star catalogue data is invalid")}function O(e){return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function C(e){return e>=192?[2.9,e-192]:e>=160?[2.5,e-160]:e>=128?[2,e-128]:e>=96?[1.5,e-96]:e>=64?[1,e-64]:e>=32?[.7,e-32]:[.4,e]}I=e([u("esri.views.3d.webgl-engine.effects.stars.Stars")],I);const F="esri/views/3d/environment/resources/stars.wsv",N="esri/views/3d/environment/resources/milkyway-band.ktx2",V=["9bb2ff","9eb5ff","aabfff","bbccff","ccd8ff ","dae2ff","e4e9ff","eeefff","f8f6ff","fff9fb","fff5ef","fff1e5","ffeddb","ffe9d2","ffe6ca","ffe3c3","ffe0bb","ffddb4","ffdaad","ffd6a5","ffd29c","ffcc8f","ffc178","ffa94b","ff7b00"],z=9;export{I as Stars};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{fromValues as t}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";function e(t){return(t.getHours()/12+t.getMinutes()/60*(2/24)+t.getSeconds()/60*(2/1440)-.9972222)%2}function r(t){const e=t,r=new Date(t.getFullYear(),0,1,11,58,56);return(+e-+r)/(+new Date(t.getFullYear()+1,0,1,11,58,55)-+r)}const n=t(1,0,0,0,0,.9174771405229186,.39778850739794974,0,0,-.39778850739794974,.9174771405229186,0,0,0,0,1),o=t(1,0,0,0,0,.9174771405229186,-.39778850739794974,0,0,.39778850739794974,.9174771405229186,0,0,0,0,1);export{r as computeDayDuration,n as ec2eq,o as eq2ec,e as getDailyRotationCoefficient};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{releaseMaybe as t}from"../../../../core/maybe.js";import{signal as i}from"../../../../core/signal.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import e from"../../webgl/RenderCamera.js";import{isColor as h}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as n}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as r}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as o}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as a}from"../lighting/SceneLighting.js";class l{constructor(t,i){this.width=t,this.height=i}}const g=5e5;class u{constructor(t,h){this._rctx=t,this.shadowMap=h,this._output=0,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this._emissions=i(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=i(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=i(new e),this._inverseViewport=s(),this._oldLighting=new a,this._newLighting=new a,this._fadedLighting=new a,this._lighting=this._newLighting,this.screenSpaceReflections=new o,this.reprojection=new r,this.highlights=new Array,this.highlightMixOrigin=s(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new n,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=t(this.depth),this.shadowMap?.dispose()}get output(){return this._output}set output(t){this._output!==t&&(this._output=t,this._rctx.resetDrawBuffers(t))}get emissions(){return this._emissions.value}set emissions(t){this._emissions.value=t}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return 1===this.emissions||3===this.emissions}get hasTransparentEmission(){return 2===this.emissions||3===this.emissions}get hasEmissions(){return 0!==this.emissions}get camera(){return this._camera.value}set camera(t){this._camera.value=t,this._inverseViewport[0]=1/t.fullViewport[2],this._inverseViewport[1]=1/t.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<g}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(t,i,s,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=i,this._newLighting.globalFactor=s,this._newLighting.set(t),this._oldLighting.updateLegacy(),1===e&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return h(this.output)&&this.screenSpaceReflections.enabled&&null!=this.reprojection.lastFrameColor}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(t){t&&(t.name="geometry depth"),this._depth=t}get occluder(){return 10===this.slot||11===this.slot?this.slot:null}}export{u as BindParameters,l as ViewportSize};
2
+ import{releaseMaybe as t}from"../../../../core/maybe.js";import{signal as i}from"../../../../core/signal.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import e from"../../webgl/RenderCamera.js";import{isColor as h}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as n}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as r}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as o}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as a}from"../lighting/SceneLighting.js";class l{constructor(t,i){this.width=t,this.height=i}}const g=5e5;class u{constructor(t,h){this._rctx=t,this.shadowMap=h,this._output=0,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this._emissions=i(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=i(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this.renderingShadowAnalysisMap=!1,this._camera=i(new e),this._inverseViewport=s(),this._oldLighting=new a,this._newLighting=new a,this._fadedLighting=new a,this._lighting=this._newLighting,this.screenSpaceReflections=new o,this.reprojection=new r,this.highlights=new Array,this.highlightMixOrigin=s(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new n,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=t(this.depth),this.shadowMap?.dispose()}get output(){return this._output}set output(t){this._output!==t&&(this._output=t,this._rctx.resetDrawBuffers(t))}get emissions(){return this._emissions.value}set emissions(t){this._emissions.value=t}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return 1===this.emissions||3===this.emissions}get hasTransparentEmission(){return 2===this.emissions||3===this.emissions}get hasEmissions(){return 0!==this.emissions}get camera(){return this._camera.value}set camera(t){this._camera.value=t,this._inverseViewport[0]=1/t.fullViewport[2],this._inverseViewport[1]=1/t.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<g}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(t,i,s,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=i,this._newLighting.globalFactor=s,this._newLighting.set(t),this._oldLighting.updateLegacy(),1===e&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return h(this.output)&&this.screenSpaceReflections.enabled&&null!=this.reprojection.lastFrameColor}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(t){t&&(t.name="geometry depth"),this._depth=t}get occluder(){return 10===this.slot||11===this.slot?this.slot:null}}export{u as BindParameters,l as ViewportSize};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{property as i,subclass as t}from"../../../../core/accessorSupport/decorators.js";import{InternalRenderCategory as r}from"../../webgl.js";import s from"../../webgl/RenderNode.js";import{prepareGaussianSplatPerspectiveParameters as n,canRenderGaussianSplats as a}from"./GaussianSplatRenderUtils.js";import{GaussianSplatDepthTechnique as o}from"../shaders/GaussianSplatDepthTechnique.js";import{GaussianSplatPassParameters as l}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechniqueConfiguration as d}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{PrimitiveType as h}from"../../../webgl/enums.js";let p=class extends s{constructor(e){super(e),this.consumes={required:[r.GAUSSIAN_SPLAT_DEPTH]},this.produces=r.GAUSSIAN_SPLAT_DEPTH,this.layerView=null,this._passParameters=new l,this._configuration=new d(e.view.state.isGlobal)}precompile(){this._canRender&&(this._updateConfiguration(),this.techniques.precompile(o,this._configuration))}render(){const e=this.bindRenderTarget();if(this.layerView.fadeHelper.updateForFrame(this.view.stage.renderView.renderer.renderContext.time),!this._canRender)return e;this._updateConfiguration(),n(this._passParameters,this.layerView,this.bindParameters.camera);const i=this.techniques.get(o,this._configuration);return this.renderingContext.bindTechnique(i,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(h.TRIANGLE_STRIP,0,4,this.layerView.data.visibleGaussians),e}get _canRender(){return a(this.layerView.data)}_updateConfiguration(){this._configuration.fadingEnabled=this.layerView.fadeHelper.fadingEnabled,this._configuration.clippingEnabled=null!=this.layerView.clippingBox,this._configuration.hasSlicePlane=this.layerView.slicePlaneEnabled&&null!=this.bindParameters.slicePlane,this._configuration.needsFragmentPosition=this._configuration.clippingEnabled||this._configuration.hasSlicePlane}};e([i()],p.prototype,"consumes",void 0),e([i()],p.prototype,"produces",void 0),e([i({constructOnly:!0})],p.prototype,"layerView",void 0),p=e([t("esri.views.3d.webgl-engine.lib.GaussianSplatDepthRenderer")],p);export{p as GaussianSplatDepthRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as i}from"../../../../core/reactiveUtils.js";import{property as t,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as n,positiveInfinity as h,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as u}from"../../webgl.js";import{addWraparound as c}from"../../layers/i3s/I3SUtil.js";import p from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as m,prepareGaussianSplatPerspectiveParameters as d}from"./GaussianSplatRenderUtils.js";import{G as _}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as g}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as f}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as C}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as b}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatPassParameters as P}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechnique as S}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as q}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as v,DepthStencilAttachment as w,PrimitiveType as R}from"../../../webgl/enums.js";let x=class extends p{constructor(e){super(e),this.consumes={required:[u.GAUSSIAN_SPLAT]},this.produces=u.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new P,this._compositionPassParameters=new _,this._depthCompositionPassParameters=new C,this._compositionConfiguration=new f,this._clipBox=o(),this._previousSortRequestCameraDirection=a(),this._cameraSortDirty=!1,this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._configuration=new q(e.view.state.isGlobal),n(this._clipBox,h)}async initialize(){this.addHandles([i(()=>this.view.state.camera,()=>this._onCameraChange()),i(()=>2===this.view.state.mode,e=>{e&&this._cameraSortDirty&&this._requestCameraSort(this.view.state.camera.ray.direction),this.requestRender(1)})])}precompile(){this._canRender&&(this._updateConfigurations(),this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=this.bindParameters.hasOpaqueEmission,this.techniques.precompile(S,this._configuration),this.techniques.precompile(g,this._compositionConfiguration),this.techniques.precompile(b))}render(){const e=this.input;if(this._updateConfigurations(),this._fadeHelper.updateForFrame(this.view.stage.renderView.renderer.renderContext.time),!this._canRender)return e;const i=e.getAttachment(v);this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=null!=i;const{fullWidth:t,fullHeight:s}=this.bindParameters.camera;this._prepareParameters();const r=this.renderingContext,a=this.fboCache,o=a.acquire(t,s,"gaussian color output"),n=e.getAttachment(w);o.attachDepth(n);const h=this.techniques.get(S,this._configuration);this._renderGaussianColorAndDepth(o,h);const l=a.acquire(t,s,this.produces);this._depthCompositionPassParameters.splatDepth=o.getTexture(v),l.attachDepth(e.getAttachment(w)),r.bindFramebuffer(l.fbo);const u=this.techniques.get(b);r.bindTechnique(u,this.bindParameters,this._depthCompositionPassParameters),r.screen.draw(),this._compositionPassParameters.color=e.getTexture(),this._compositionPassParameters.splatColor=o.getTexture(),i?(l.acquireColor(v,8,"emissive"),this._compositionPassParameters.emission=e.getTexture(v)):this._compositionPassParameters.emission=null,r.bindFramebuffer(l.fbo);const c=this.techniques.get(g,this._compositionConfiguration);return r.bindTechnique(c,this.bindParameters,this._compositionPassParameters),r.screen.draw(),o.release(),l}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){const i=e||h;this._hasSameClipBox(i)||(n(this._clipBox,i),this._tileCullingRevision=c(this._tileCullingRevision,1),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get tileCullingRevision(){return this._tileCullingRevision}get _clippingEnabled(){return!l(this._clipBox,h,(e,i)=>e===i)}get _isIdle(){return 2===this.view.state.mode}get _data(){return this.layerView.data}get _canRender(){return m(this._data)}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){const{idleMinimumOpacity:e,nonIdleMinimumOpacity:i}=this.view.qualitySettings.gaussianSplat;this._configuration.alphaCutoff=this._isIdle?e:i,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&null!=this.bindParameters.slicePlane}_onCameraChange(){this._tileCullingRevision=c(this._tileCullingRevision,1);const e=this.view.state.camera.ray.direction;this._cameraSortDirty=!0,(this._isIdle||this._shouldRequestSort(e))&&this._requestCameraSort(e)}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_requestCameraSort(e){this._data.requestSort(),r(this._previousSortRequestCameraDirection,e),this._cameraSortDirty=!1}_prepareParameters(){d(this._passParameters,this.layerView,this.camera)}_hasSameClipBox(e){return l(this._clipBox,e,(e,i)=>e===i)}_renderGaussianColorAndDepth(e,i){const t=this.renderingContext;e.acquireColor(v,5,"gaussian depth output"),t.bindFramebuffer(e.fbo),t.setClearColor(0,0,0,0),t.clear(16384),this.renderingContext.bindTechnique(i,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(R.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}};e([t()],x.prototype,"consumes",void 0),e([t()],x.prototype,"produces",void 0),e([t({constructOnly:!0})],x.prototype,"layerView",void 0),x=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatRenderer")],x);export{x as GaussianSplatRenderer};
2
+ import{__decorate as e}from"tslib";import{watch as i}from"../../../../core/reactiveUtils.js";import{property as t,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as n,positiveInfinity as h,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as u}from"../../webgl.js";import{addWraparound as c}from"../../layers/i3s/I3SUtil.js";import p from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as m,prepareGaussianSplatPerspectiveParameters as d}from"./GaussianSplatRenderUtils.js";import{G as _}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as g}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as f}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as C}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as b}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatPassParameters as P}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechnique as S}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as q}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as v,DepthStencilAttachment as w,PrimitiveType as R}from"../../../webgl/enums.js";let x=class extends p{constructor(e){super(e),this.consumes={required:[u.GAUSSIAN_SPLAT]},this.produces=u.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new P,this._compositionPassParameters=new _,this._depthCompositionPassParameters=new C,this._compositionConfiguration=new f,this._clipBox=o(),this._previousSortRequestCameraDirection=a(),this._cameraSortDirty=!1,this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._configuration=new q(e.view.state.isGlobal),n(this._clipBox,h)}async initialize(){this.addHandles([i(()=>this.view.state.camera,()=>this._onCameraChange()),i(()=>2===this.view.state.mode,e=>{e&&this._cameraSortDirty&&this._requestCameraSort(this.view.state.camera.ray.direction),this.requestRender(1)})])}precompile(){this._canRender&&(this._updateConfigurations(),this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=this.bindParameters.hasOpaqueEmission,this.techniques.precompile(S,this._configuration),this.techniques.precompile(g,this._compositionConfiguration),this.techniques.precompile(b))}render(){const e=this.input;if(this._updateConfigurations(),this._fadeHelper.updateForFrame(this.view.stage.renderView.renderer.renderContext.time),!this._canRender)return e;const i=e.getAttachment(v);this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=null!=i;const{fullWidth:t,fullHeight:s}=this.bindParameters.camera;this._prepareParameters();const r=this.renderingContext,a=this.fboCache,o=a.acquire(t,s,"gaussian color output"),n=e.getAttachment(w);o.attachDepth(n);const h=this.techniques.get(S,this._configuration);this._renderGaussianColorAndDepth(o,h);const l=a.acquire(t,s,this.produces);this._depthCompositionPassParameters.splatDepth=o.getTexture(v),l.attachDepth(e.getAttachment(w)),r.bindFramebuffer(l.fbo);const u=this.techniques.get(b);r.bindTechnique(u,this.bindParameters,this._depthCompositionPassParameters),r.screen.draw(),this._compositionPassParameters.color=e.getTexture(),this._compositionPassParameters.splatColor=o.getTexture(),i?(l.acquireColor(v,8,"emissive"),this._compositionPassParameters.emission=e.getTexture(v)):this._compositionPassParameters.emission=null,r.bindFramebuffer(l.fbo);const c=this.techniques.get(g,this._compositionConfiguration);return r.bindTechnique(c,this.bindParameters,this._compositionPassParameters),r.screen.draw(),o.release(),l}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){const i=e||h;this._hasSameClipBox(i)||(n(this._clipBox,i),this._tileCullingRevision=c(this._tileCullingRevision,1),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get tileCullingRevision(){return this._tileCullingRevision}get _clippingEnabled(){return!l(this._clipBox,h,(e,i)=>e===i)}get _isIdle(){return 2===this.view.state.mode}get _data(){return this.layerView.data}get _canRender(){return m(this._data)}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){const{idleMinimumOpacity:e,nonIdleMinimumOpacity:i}=this.view.qualitySettings.gaussianSplat;this._configuration.alphaCutoff=this._isIdle?e:i,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&null!=this.bindParameters.slicePlane,this._configuration.needsFragmentPosition=this._configuration.receiveShadows||this._configuration.clippingEnabled||this._configuration.hasSlicePlane}_onCameraChange(){this._tileCullingRevision=c(this._tileCullingRevision,1);const e=this.view.state.camera.ray.direction;this._cameraSortDirty=!0,(this._isIdle||this._shouldRequestSort(e))&&this._requestCameraSort(e)}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_requestCameraSort(e){this._data.requestSort(),r(this._previousSortRequestCameraDirection,e),this._cameraSortDirty=!1}_prepareParameters(){d(this._passParameters,this.layerView,this.camera)}_hasSameClipBox(e){return l(this._clipBox,e,(e,i)=>e===i)}_renderGaussianColorAndDepth(e,i){const t=this.renderingContext;e.acquireColor(v,5,"gaussian depth output"),t.bindFramebuffer(e.fbo),t.setClearColor(0,0,0,0),t.clear(16384),this.renderingContext.bindTechnique(i,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(R.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}};e([t()],x.prototype,"consumes",void 0),e([t()],x.prototype,"produces",void 0),e([t({constructOnly:!0})],x.prototype,"layerView",void 0),x=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatRenderer")],x);export{x as GaussianSplatRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as i,subclass as t}from"../../../../core/accessorSupport/decorators.js";import{set as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InternalRenderCategory as a}from"../../webgl.js";import n from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as o,prepareGaussianSplatRenderParameters as p}from"./GaussianSplatRenderUtils.js";import{GaussianSplatRenderParameters as h}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatShadowTechnique as l}from"../shaders/GaussianSplatShadowTechnique.js";import{GaussianSplatTechniqueConfiguration as d}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{PrimitiveType as u}from"../../../webgl/enums.js";let c=class extends n{constructor(e){super(e),this.consumes={required:[a.SHADOWMAP]},this.produces=a.SHADOWMAP,this.layerView=null,this._passParameters=new h,this._cameraPosition=r(),this._configuration=new d(e.view.state.isGlobal)}precompile(){this._canRender&&(this._updateConfiguration(),this.techniques.precompile(l,this._configuration))}render(){const e=this.bindRenderTarget();return this._canRender&&this._render(),e}queryDepthRange(e){return this.layerView.suspended?null:this._data.queryVisibleTileDepthRange(e,this.layerView.clippingBox)}get _data(){return this.layerView.data}get _clippingEnabled(){return null!=this.layerView.clippingBox}get _canRender(){return!this.layerView.suspended&&o(this._data)}_render(){const e=this.techniques.get(l,this._configuration);this._prepareShadowParameters(this.bindParameters.camera),this.renderingContext.bindTechnique(e,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(u.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}_updateConfiguration(){this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this.layerView.slicePlaneEnabled&&null!=this.bindParameters.slicePlane,this._configuration.output=this.bindParameters.output}_prepareShadowParameters(e){this._updateShadowCameraPosition(e),p(this._passParameters,this.layerView,e,this._cameraPosition)}_updateShadowCameraPosition(e){const i=e.viewInverseTransposeMatrix;s(this._cameraPosition,i[3],i[7],i[11])}};e([i()],c.prototype,"consumes",void 0),e([i()],c.prototype,"produces",void 0),e([i({constructOnly:!0})],c.prototype,"layerView",void 0),c=e([t("esri.views.3d.webgl-engine.lib.GaussianSplatShadows")],c);export{c as GaussianSplatShadows};
2
+ import{__decorate as e}from"tslib";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InternalRenderCategory as r}from"../../webgl.js";import n from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as o,prepareGaussianSplatRenderParameters as h}from"./GaussianSplatRenderUtils.js";import{gaussianSplatDepthPolicy as p}from"../shaders/GaussianSplatDepthPolicy.js";import{G as l}from"../../../../chunks/GaussianSplatShadow.glsl.js";import{GaussianSplatShadowTechnique as d}from"../shaders/GaussianSplatShadowTechnique.js";import{GaussianSplatTechniqueConfiguration as u}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{PrimitiveType as c}from"../../../webgl/enums.js";let m=class extends n{constructor(e){super(e),this.consumes={required:[r.SHADOWMAP]},this.produces=r.SHADOWMAP,this.layerView=null,this._passParameters=new l,this._cameraPosition=a(),this._configuration=new u(e.view.state.isGlobal)}precompile(){this._canRender&&(this._updateConfiguration(),this.techniques.precompile(d,this._configuration))}render(){const e=this.bindRenderTarget();return this._canRender&&this._render(),e}queryDepthRange(e){return this.layerView.suspended?null:this._data.queryVisibleTileDepthRange(e,this.layerView.clippingBox)}get _data(){return this.layerView.data}get _clippingEnabled(){return null!=this.layerView.clippingBox}get _canRender(){return!this.layerView.suspended&&o(this._data)}_render(){const e=this.techniques.get(d,this._configuration);this._prepareShadowParameters(this.bindParameters.camera),this.renderingContext.bindTechnique(e,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(c.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}_updateConfiguration(){this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this.layerView.slicePlaneEnabled&&null!=this.bindParameters.slicePlane,this._configuration.output=this.bindParameters.output}_prepareShadowParameters(e){const i=this.bindParameters.renderingShadowAnalysisMap?p.analysis:p.direct;this._passParameters.alphaCutoff=i.alphaCutoff,this._passParameters.depthBias=i.depthBias,this._updateShadowCameraPosition(e),h(this._passParameters,this.layerView,e,this._cameraPosition)}_updateShadowCameraPosition(e){const i=e.viewInverseTransposeMatrix;t(this._cameraPosition,i[3],i[7],i[11])}};e([i()],m.prototype,"consumes",void 0),e([i()],m.prototype,"produces",void 0),e([i({constructOnly:!0})],m.prototype,"layerView",void 0),m=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatShadows")],m);export{m as GaussianSplatShadows};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as m,sync as u}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as I}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as T}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as R,InternalRenderCategory as O,AllRenderNodeOutputs as S,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{computeShadowsEnabled as G}from"../../support/sunUtils.js";import{FBOCache as H}from"../core/FBOCache.js";import{RenderPassManager as x}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as v}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as M}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as j}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{NavigationDepthCache as K}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as Z}from"./OrderIndependentTransparency.js";import{RenderContext as ee,defaultRenderOccludedMask as te}from"./RenderContext.js";import{RendererBase as se}from"./RendererBase.js";import{setupFeatureDefaults as ie}from"./RenderFeature.js";import{RenderPluginInput as re}from"./RenderPluginInput.js";import{ShadowAccumulator as ae}from"./ShadowAccumulator.js";import{ShadowMap as ne}from"./ShadowMap.js";import he from"./SliceHelper.js";import{MergedRenderer as oe}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as de}from"../parts/renderUtils.js";import{RendererPerformanceInfo as le,PerformanceCategory as me}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as ue,PixelType as _e,ColorAttachment2 as pe,ColorAttachment0 as ce,DrawBufferNone as be}from"../../../webgl/enums.js";const fe=has("disable-feature:async-navigation-3d-depth-readback");let ge=class extends se{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new x,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new he,this.sceneDepthRange=_(J.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("enable-feature:global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new re,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Ne)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new H(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(ie(e.view.qualityProfile));const a=new ne(this._fboCache,e.viewingMode);this._renderContext=new ee(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new le(this._rctx),this._blit=new U(s),this.navigationDepthCache=new K(this._rctx,this._fboCache,s,()=>this._requestRender(0)),this._shadowAccumulator=new ae(this.fboCache,s,e,(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new M(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},m),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;I(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=v,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},u),d(()=>this._bindParameters.clouds.data?.state,()=>r(),u),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},m),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.navigationDepthCache.destroy(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),oe.prune(),T()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ie(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){const e=this._plugins.emissions;return this._hasTransparentGeometry?e:1===e||3===e?1:0}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:ye(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),u)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||G(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Te),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new de(this._pluginInput.get(R.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(O.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(O.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(O.CUTFILL_COLOR),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Oe),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...we),this._renderOverlay(),r.setGLViewport(this._rctx);const m=this._framebuffer,u=m.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(u?.retain(_-1),u?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=u):u?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._shadowAccumulator.fullyRecompute=!i,this._shadowAccumulator.updateCamera(r),this._precompilePrepasses(),this.performanceInfo.advance(me.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),m.bind(),this._bindParameters.mainDepth=m.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),m.update(e=>this._renderNodes(O.CUTFILL_COMPUTATION,e)),this._pluginInput.set(O.FOCUSAREA,this._renderFocusAreaGeometry()),m.update(e=>this._renderNodes(O.TRANSPARENT_ENVIRONMENT,e)),m.update(e=>this._renderNodes(O.VIEWSHED,e)),m.update(e=>this._renderNodes(O.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),m.update(e=>this._renderNodes(O.FOCUSAREA_COLOR,e)),m.update(e=>this._renderNodes(O.CUTFILL_COLOR,e)),this._pluginInput.release(O.FOCUSAREA),this._pluginInput.release(O.GROUND_DEPTH),m.update(e=>this._renderNodes(O.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;m.update(e=>this._renderNodes(R.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),m.update(e=>this._renderNodes(O.ANTIALIASING,e));const b=this._hasTransparentGeometry?2:1,f=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&m.update(e=>this._renderHUD(b,e)),m.update(e=>this._renderNodes(O.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||m.update(e=>this._renderHUD(b,e)),this._bindParameters.emissions=f,m.update(e=>this._renderNodes(O.MAGNIFIER,e)),m.update(e=>this._renderNodes(R.FINAL,e)),i&&(this._blit.toFramebuffer(m.color,this._bindParameters),fe||2!==o&&0!==o||this.navigationDepthCache.update(this._bindParameters,m.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameEmission?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission?.release(),this._bindParameters.reprojection.lastFrameEmission=m.color.obtainAttachment(ue))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),m.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=m.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new de(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,O.OPAQUE_ENVIRONMENT,O.GAUSSIAN_SPLAT,O.OPAQUE_OCCLUSION_QUERY,O.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Ee),t.output=0,this._plugins.precompile(...Ee),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,O.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,O.TRANSPARENT_ENVIRONMENT,O.VIEWSHED,O.CUTFILL_COMPUTATION,O.CUTFILL_COLOR,O.LASERLINES,O.FOCUSAREA_COLOR,O.OCCLUDED,O.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasEmissions,O.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasEmissions,R.COMPOSITE,O.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(O.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(me.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(O.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,O.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(O.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,_e.UNSIGNED_BYTE,t),r.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?me.OPAQUE_EDGES:me.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(me.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(O.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(O.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes();t.finish(e),this._bindParameters.output=s}_renderShadowNodes(){const e=this._bindParameters.shadowMap.renderTarget;e&&(this._renderNodes(O.SHADOWMAP,e),this._pluginInput.set(O.SHADOWMAP,null))}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(O.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(me.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(me.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return J.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(O.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=J.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<j)return void(this.sceneDepthRange.value=J.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...S,O.VIEWSHED,O.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,Ie),this._needsDepth&&this._precompilePlugins(3,Ae)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,O.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5),this._nodes.precompile(!1,O.SHADOWMAP)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,O.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals");i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Ie);const r=this._nodes.optional("normals",...S,O.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(me.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(O.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(me.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){const e=this._bindParameters;if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),e.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const t=this._nodes.produce(O.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=t,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?me.AMBIENT_ILLUMINATION_HIGH_QUALITY:me.AMBIENT_ILLUMINATION),e.globalIllumination}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=n(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=n(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Ee),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ce);this._renderContext.renderOccludedMask=te}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ce),this._renderContext.renderOccludedMask=te}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Se[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillDepth(){this._precompilePlugins(9,De)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...De),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,O.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ae)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...Pe),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...Pe)}_renderTransparentGeometry(){this._plugins.render(...we),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Ee)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Te),this._bindParameters.output=2,this._plugins.precompile(...Te),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Te)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(ue);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?me.HUD_OCCLUDED:me.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(me.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...Re),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){this._shadowAccumulator.updateDepthRange(e);const t=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters)&&this.performanceInfo.advance(me.ACCUMULATED_SHADOWS),this._shadowAccumulator.updateMask(),t&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...we)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",m=this.fboCache.acquire(i,r,l,o).acquireColor(ue,this.hasFloatBlend?7:0,"oit alpha"),u=h.hasEmission&&(0===e||1!==t);u&&m.acquireColor(pe,o,"oit emissive"),s||m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer(Z),u&&this._rctx.clearBuffer(2,Z),a(),m.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");u&&_.acquireColor(ue,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?pe:ue;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-ce,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,m,_,h,p,e,this._fboCache.debugCallback),b?.detachDepth(),s||(u&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),m.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...Pe)||this.plugins.produces(5,...Pe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(O.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(R.OPAQUE,t,e)),this.fboCache.debugCallback?.(R.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(O.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(O.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(O.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(O.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(O.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(O.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(O.VOXEL,e)),this.fboCache.debugCallback?.(O.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(R.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(R.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(O.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(O.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([be,ue]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(me.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=w);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Ge,t.viewMatrix),f(Fe,t.projectionMatrix),g(He,Ge,Fe),g(He,s.viewMatrix,He),g(He,s.projectionMatrix,He),this._reprojectionMatrix=He):this._reprojectionMatrix=w,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(xe,s.viewMatrix,Ge),P(t,xe)):P(t,w)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],ge.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],ge.prototype,"highResolutionAtmosphere",null),e([p()],ge.prototype,"_edgeView",void 0),e([p()],ge.prototype,"updating",null),ge=e([c("esri.views.3d.webgl-engine.lib.Renderer")],ge);const Pe=[0,1,2,3],we=[7,6,4,5],Ee=[7,6],Ie=[0,1,2,4,...Ee],Ae=[3,5],Ce=[2,4,8],Te=[16,12,14,13],Re=[4,5,2,3,0,1,...Ee],Oe=[4,8,5,11],Se={0:[13],1:[12],2:[13,12],3:[13,12]},De=[0,1,...Ee],Ne=["normals","highlights"],Fe=E(),Ge=E(),He=E(),xe=E();function ye(e){return t=>e.immediate.schedule(t)}export{ge as Renderer};
2
+ import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as m,sync as u}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as I}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as T}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as S,InternalRenderCategory as D,AllRenderNodeOutputs as R,AllInternalRenderNodeOutputs as O}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{computeShadowsEnabled as G}from"../../support/sunUtils.js";import{FBOCache as H}from"../core/FBOCache.js";import{RenderPassManager as x}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as v}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as M}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as j}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{NavigationDepthCache as K}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as Z}from"./OrderIndependentTransparency.js";import{RenderContext as ee,defaultRenderOccludedMask as te}from"./RenderContext.js";import{RendererBase as se}from"./RendererBase.js";import{setupFeatureDefaults as ie}from"./RenderFeature.js";import{RenderPluginInput as re}from"./RenderPluginInput.js";import{ShadowAccumulator as ae}from"./ShadowAccumulator.js";import{ShadowMap as ne}from"./ShadowMap.js";import he from"./SliceHelper.js";import{MergedRenderer as oe}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as de}from"../parts/renderUtils.js";import{RendererPerformanceInfo as le,PerformanceCategory as me}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as ue,PixelType as _e,ColorAttachment2 as pe,ColorAttachment0 as ce,DrawBufferNone as be}from"../../../webgl/enums.js";const fe=has("disable-feature:async-navigation-3d-depth-readback");let ge=class extends se{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new x,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new he,this.sceneDepthRange=_(J.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("enable-feature:global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new re,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Ne)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new H(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(ie(e.view.qualityProfile));const a=new ne(this._fboCache,e.viewingMode);this._renderContext=new ee(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new le(this._rctx),this._blit=new U(s),this.navigationDepthCache=new K(this._rctx,this._fboCache,s,()=>this._requestRender(0)),this._shadowAccumulator=new ae(this.fboCache,s,e,(t,s,i,r)=>{const a=e.view.qualitySettings.maximumPixelRatio;this._bindParameters.renderingShadowAnalysisMap=!0,s.start(t.camera,i,r,!0,a),this._renderShadowCascades(5,s),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera),this._bindParameters.renderingShadowAnalysisMap=!1},r),this._nodes=new M(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},m),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;I(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=v,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},u),d(()=>this._bindParameters.clouds.data?.state,()=>r(),u),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},m),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.navigationDepthCache.destroy(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),oe.prune(),T()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ie(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){const e=this._plugins.emissions;return this._hasTransparentGeometry?e:1===e||3===e?1:0}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:ye(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),u)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||G(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Te),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new de(this._pluginInput.get(S.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(D.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(D.CUTFILL_COLOR),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(De),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...we),this._renderOverlay(),r.setGLViewport(this._rctx);const m=this._framebuffer,u=m.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(u?.retain(_-1),u?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=u):u?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._shadowAccumulator.fullyRecompute=!i,this._shadowAccumulator.updateCamera(r),this._precompilePrepasses(),this.performanceInfo.advance(me.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),m.bind(),this._bindParameters.mainDepth=m.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),m.update(e=>this._renderNodes(D.CUTFILL_COMPUTATION,e)),this._pluginInput.set(D.FOCUSAREA,this._renderFocusAreaGeometry()),m.update(e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e)),m.update(e=>this._renderNodes(D.VIEWSHED,e)),m.update(e=>this._renderNodes(D.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),m.update(e=>this._renderNodes(D.FOCUSAREA_COLOR,e)),m.update(e=>this._renderNodes(D.CUTFILL_COLOR,e)),this._pluginInput.release(D.FOCUSAREA),this._pluginInput.release(D.GROUND_DEPTH),m.update(e=>this._renderNodes(D.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;m.update(e=>this._renderNodes(S.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),m.update(e=>this._renderNodes(D.ANTIALIASING,e));const b=this._hasTransparentGeometry?2:1,f=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&m.update(e=>this._renderHUD(b,e)),m.update(e=>this._renderNodes(D.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||m.update(e=>this._renderHUD(b,e)),this._bindParameters.emissions=f,m.update(e=>this._renderNodes(D.MAGNIFIER,e)),m.update(e=>this._renderNodes(S.FINAL,e)),i&&(this._blit.toFramebuffer(m.color,this._bindParameters),fe||2!==o&&0!==o||this.navigationDepthCache.update(this._bindParameters,m.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameEmission?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission?.release(),this._bindParameters.reprojection.lastFrameEmission=m.color.obtainAttachment(ue))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),m.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=m.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new de(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,D.OPAQUE_ENVIRONMENT,D.GAUSSIAN_SPLAT,D.OPAQUE_OCCLUSION_QUERY,D.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Ee),t.output=0,this._plugins.precompile(...Ee),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,D.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,D.TRANSPARENT_ENVIRONMENT,D.VIEWSHED,D.CUTFILL_COMPUTATION,D.CUTFILL_COLOR,D.LASERLINES,D.FOCUSAREA_COLOR,D.OCCLUDED,D.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasEmissions,D.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasEmissions,S.COMPOSITE,D.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(D.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(me.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(D.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,D.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(D.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,_e.UNSIGNED_BYTE,t),r.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?me.OPAQUE_EDGES:me.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(me.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(D.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(D.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes(t.renderTarget);t.finish(e),this._bindParameters.output=s}_renderShadowNodes(e){this._renderInternalNodeCategory(D.SHADOWMAP,e)}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(D.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._renderGaussianSplatPrepassDepth(e),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(me.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._renderGaussianSplatPrepassDepth(i),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(me.DEPTH)}_renderGaussianSplatPrepassDepth(e){this._shadowAccumulator.active&&this._shadowAccumulator.requiresDepth&&this._renderInternalNodeCategory(D.GAUSSIAN_SPLAT_DEPTH,e)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return J.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.union(this._nodes.queryDepthRange(D.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=J.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<j)return void(this.sceneDepthRange.value=J.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...R,D.VIEWSHED,D.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,Ie),this._needsDepth&&this._precompilePlugins(3,Ae)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,D.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5),this._nodes.precompile(!1,D.GAUSSIAN_SPLAT_DEPTH)),(this.shadowsEnabled||this._shadowAccumulator.active)&&this._nodes.precompile(!1,D.SHADOWMAP),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,D.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals");i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Ie);const r=this._nodes.optional("normals",...R,D.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(me.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(me.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){const e=this._bindParameters;if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),e.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const t=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=t,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?me.AMBIENT_ILLUMINATION_HIGH_QUALITY:me.AMBIENT_ILLUMINATION),e.globalIllumination}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=n(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=n(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Ee),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ce);this._renderContext.renderOccludedMask=te}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ce),this._renderContext.renderOccludedMask=te}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Re[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillDepth(){this._precompilePlugins(9,Oe)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Oe),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,D.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ae)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...Pe),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...Pe)}_renderTransparentGeometry(){this._plugins.render(...we),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Ee)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Te),this._bindParameters.output=2,this._plugins.precompile(...Te),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Te)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(ue);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?me.HUD_OCCLUDED:me.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(me.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...O)+this._nodes.optional("highlights",...O)-1),h}_renderHighlightGeometries(){this._plugins.render(...Se),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){this._shadowAccumulator.updateDepthRange(e);const t=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters)&&this.performanceInfo.advance(me.ACCUMULATED_SHADOWS),this._shadowAccumulator.updateMask(),t&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...we)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",m=this.fboCache.acquire(i,r,l,o).acquireColor(ue,this.hasFloatBlend?7:0,"oit alpha"),u=h.hasEmission&&(0===e||1!==t);u&&m.acquireColor(pe,o,"oit emissive"),s||m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer(Z),u&&this._rctx.clearBuffer(2,Z),a(),m.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");u&&_.acquireColor(ue,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?pe:ue;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-ce,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,m,_,h,p,e,this._fboCache.debugCallback),b?.detachDepth(),s||(u&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),m.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...Pe)||this.plugins.produces(5,...Pe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(D.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(S.OPAQUE,t,e)),this.fboCache.debugCallback?.(S.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(D.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(D.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(D.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.VOXEL,e)),this.fboCache.debugCallback?.(D.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(S.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(S.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(D.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(D.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([be,ue]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(me.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_renderInternalNodeCategory(e,t){if(!t)return;const s=t.name;try{this._renderNodes(e,t)}finally{this._pluginInput.set(e,null),t.setName(s)}}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=w);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Ge,t.viewMatrix),f(Fe,t.projectionMatrix),g(He,Ge,Fe),g(He,s.viewMatrix,He),g(He,s.projectionMatrix,He),this._reprojectionMatrix=He):this._reprojectionMatrix=w,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(xe,s.viewMatrix,Ge),P(t,xe)):P(t,w)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],ge.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],ge.prototype,"highResolutionAtmosphere",null),e([p()],ge.prototype,"_edgeView",void 0),e([p()],ge.prototype,"updating",null),ge=e([c("esri.views.3d.webgl-engine.lib.Renderer")],ge);const Pe=[0,1,2,3],we=[7,6,4,5],Ee=[7,6],Ie=[0,1,2,4,...Ee],Ae=[3,5],Ce=[2,4,8],Te=[16,12,14,13],Se=[4,5,2,3,0,1,...Ee],De=[4,8,5,11],Re={0:[13],1:[12],2:[13,12],3:[13,12]},Oe=[0,1,...Ee],Ne=["normals","highlights"],Fe=E(),Ge=E(),He=E(),xe=E();function ye(e){return t=>e.immediate.schedule(t)}export{ge as Renderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import{watch as r,sync as a}from"../../../../core/reactiveUtils.js";import{signal as o}from"../../../../core/signal.js";import{property as n,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{copy as c,equals as u}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as m}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{volumeToVao as _}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as d}from"./BindParameters.js";import{DepthRange as p}from"./DepthRange.js";import{createQuadVAO as f}from"./glUtil3D.js";import{ShadowCastRenderer as g}from"./ShadowCastRenderer.js";import{ShadowMap as b}from"./ShadowMap.js";import{S as v}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as y}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as S}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as w}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as A}from"../shaders/ShadowCastMaskTechnique.js";import{V as x}from"../../../../chunks/VolumeMask.glsl.js";import{PrimitiveType as C,DepthStencilAttachment as R,PixelType as V}from"../../../webgl/enums.js";import{DisposableFramebufferObject as F}from"../../../webgl/FramebufferObject.js";import{noParameters as q}from"../../../webgl/NoParameters.js";let H=class extends t{constructor(e,t,i,s,o){super({}),this._fbos=e,this._techniques=t,this._renderToShadowMap=s,this._requestRender=o,this.fullyRecompute=!1,this._analysisVolumeGeometry=null,this._primarySet=new D(new S(0),()=>this._requestRenderIfEnabled()),this._contextSet=new D(new S(1),()=>this._requestRenderIfEnabled()),this._passParameters=new m,this._maskParameters=new x,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=p.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new d(e.rctx,new b(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=f(e.rctx),this._accumulationRenderer=new g({view:i.view,data:this}),this._tmpReadFbo=new F(e.rctx),this.addHandles([r(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},a),r(()=>this._numActive,()=>this._numActiveChanged(),a)],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._fboHandle=s(this._fboHandle),this._vao=s(this._vao),this._volumeVao=s(this._volumeVao),this._tmpReadFbo=s(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&(this._previewing||this._refining||this.fullyRecompute)}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&this._accumulationSets().some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==p.Zero&&this._accumulationRenderer.isAboveElevationThreshold}get _doneAccumulating(){return this._accumulationSets().every(e=>e.doneAccumulating)}get _numActive(){return this._accumulationSets().reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=s(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const s of this._accumulationSets())s.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:a}=_(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=a}get requiresDepth(){return this.accumulating||null!=this._volumeVao}renderAccumulation(e){if(!this.active)return!1;if(this._bindParameters.contentCamera=e.contentCamera,this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,!this.canAccumulate)return this._bindParameters.depth=null,!1;if(this._renderAreaMask(),!this.accumulating)return this._bindParameters.depth=null,!1;(this._previewing||this.fullyRecompute)&&this._reset(),this._clearBuffersOnAccumulationStart(this._bindParameters);const t=this._accumulateSetsForRenderFrame(this._previewing&&!this.fullyRecompute,this._bindParameters);return this._bindParameters.depth=null,t}_renderAreaMask(){const e=this._techniques.getCompiled(A),t=this._volumeVao,i=this._volumeVertexCount,s=this._fboHandle,r=this._analysisVolume;if(s?.detachDepth(),!e||!t||i<1||!s||!r)return;s.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,s.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(s.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o,q);this._maskParameters.origin=r.origin,c.bindDraw(o,q,this._maskParameters),a.bindVAO(t),a.drawArrays(C.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(e){if(this._accumulationSets().every(e=>0===e.progress))this._clearFramebuffer();else for(const t of this._accumulationSets())0===t.progress&&this._clearFramebufferForSet(this._fboHandle,t,e)}_accumulateSetsForRenderFrame(e,t){let i=!1;for(const s of this._accumulationSets())this._accumulateSet(s,e,t),i=!0;return i&&this._requestRender(),i}_accumulateSet(e,t,i){const s=t?Math.min(j,e.sampleCount)-e.progress:e.sampleCount-e.progress;for(let r=0;r<s;++r)this._accumulateShadow(e,i)}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(y,e.configuration),this._techniques.precompile(w,e.configuration);this._techniques.precompile(A)}}precompile(){this._accumulationRenderer.precompile()}updateMask(){this._accumulationRenderer.setStencilMask(this._fboHandle?.getAttachment(R))}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,V.UNSIGNED_BYTE,P),P[0]/i)}updateCamera(e){if(!this.active)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._isAccumulationValid(e)||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight),this._reset()),this._accumulationRenderer.setOpacityFromElevation(e.relativeElevation)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,s=this._createFBO(t,i);e&&(this._clearFramebuffer(s),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,s.fbo),this._fboHandle.dispose(),this._fboHandle=s,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=s(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t,i){if(!e)return;const s=this._techniques.get(w,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(s,i,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(s.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e,t){this._renderToShadowMap(t,e.lightDirections[e.progress++],this._depthRange);const i=this._techniques.get(y,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(i,t,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_isAccumulationValid(e){return this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([n()],H.prototype,"_refining",null),e([n()],H.prototype,"active",null),e([n()],H.prototype,"_doneAccumulating",null),e([n()],H.prototype,"_numActive",null),e([n()],H.prototype,"_colorFormat",null),e([n()],H.prototype,"_depthRange",void 0),e([n()],H.prototype,"_enabled",void 0),e([n()],H.prototype,"_previewing",void 0),e([n()],H.prototype,"_accumulationRenderer",void 0),H=e([h("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],H);const j=6,P=new Uint8Array(4);class D{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=o(0),this._sampleCount=o(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,s=Math.min(v,e.length);if(!i(t,0,t.length,e,0,s,u)){t.length=s,this._sampleCount.value=s;for(let i=0;i<s;++i)t[i]=c(t[i]??l(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(y,this.configuration),e.precompile(w,this.configuration)}}export{H as ShadowAccumulator};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import{watch as r,sync as a}from"../../../../core/reactiveUtils.js";import{signal as o}from"../../../../core/signal.js";import{property as n,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{copy as c,equals as u}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as m}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{volumeToVao as _}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as d}from"./BindParameters.js";import{DepthRange as p}from"./DepthRange.js";import{createQuadVAO as f}from"./glUtil3D.js";import{ShadowCastRenderer as g}from"./ShadowCastRenderer.js";import{ShadowMap as b}from"./ShadowMap.js";import{S as v}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as y}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as S}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as w}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as A}from"../shaders/ShadowCastMaskTechnique.js";import{V as x}from"../../../../chunks/VolumeMask.glsl.js";import{PrimitiveType as C,DepthStencilAttachment as R,PixelType as V}from"../../../webgl/enums.js";import{DisposableFramebufferObject as F}from"../../../webgl/FramebufferObject.js";import{noParameters as q}from"../../../webgl/NoParameters.js";let H=class extends t{constructor(e,t,i,s,o){super({}),this._fbos=e,this._techniques=t,this._renderToShadowMap=s,this._requestRender=o,this.fullyRecompute=!1,this._analysisVolumeGeometry=null,this._primarySet=new D(new S(0),()=>this._requestRenderIfEnabled()),this._contextSet=new D(new S(1),()=>this._requestRenderIfEnabled()),this._passParameters=new m,this._maskParameters=new x,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=p.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new d(e.rctx,new b(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=f(e.rctx),this._accumulationRenderer=new g({view:i.view,data:this}),this._tmpReadFbo=new F(e.rctx),this.addHandles([r(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},a),r(()=>this._numActive,()=>this._numActiveChanged(),a)],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._fboHandle=s(this._fboHandle),this._vao=s(this._vao),this._volumeVao=s(this._volumeVao),this._tmpReadFbo=s(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&(this._previewing||this._refining||this.fullyRecompute)}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&this._accumulationSets().some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==p.Zero&&this._accumulationRenderer.isAboveElevationThreshold}get _doneAccumulating(){return this._accumulationSets().every(e=>e.doneAccumulating)}get _numActive(){return this._accumulationSets().reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=s(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const s of this._accumulationSets())s.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:a}=_(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=a}get requiresDepth(){return this.accumulating||null!=this._volumeVao}renderAccumulation(e){if(!this.active)return!1;if(this._bindParameters.contentCamera=e.contentCamera,this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,!this.canAccumulate)return this._bindParameters.depth=null,!1;if(this._renderAreaMask(),!this.accumulating)return this._bindParameters.depth=null,!1;(this._previewing||this.fullyRecompute)&&this._reset(),this._clearBuffersOnAccumulationStart(this._bindParameters);const t=this._accumulateSetsForRenderFrame(this._previewing&&!this.fullyRecompute,this._bindParameters);return this._bindParameters.depth=null,t}_renderAreaMask(){const e=this._techniques.getCompiled(A),t=this._volumeVao,i=this._volumeVertexCount,s=this._fboHandle,r=this._analysisVolume;if(s?.detachDepth(),!e||!t||i<1||!s||!r)return;s.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,s.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(s.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o,q);this._maskParameters.origin=r.origin,c.bindDraw(o,q,this._maskParameters),a.bindVAO(t),a.drawArrays(C.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(e){if(this._accumulationSets().every(e=>0===e.progress))this._clearFramebuffer();else for(const t of this._accumulationSets())0===t.progress&&this._clearFramebufferForSet(this._fboHandle,t,e)}_accumulateSetsForRenderFrame(e,t){let i=!1;for(const s of this._accumulationSets())this._accumulateSet(s,e,t),i=!0;return i&&this._requestRender(),i}_accumulateSet(e,t,i){const s=t?Math.min(j,e.sampleCount)-e.progress:e.sampleCount-e.progress;for(let r=0;r<s;++r)this._accumulateShadow(e,i)}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(y,e.configuration),this._techniques.precompile(w,e.configuration);this._techniques.precompile(A)}}precompile(){this._accumulationRenderer.precompile()}updateMask(){this._accumulationRenderer.setStencilMask(this._fboHandle?.getAttachment(R))}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,V.UNSIGNED_BYTE,P),P[0]/i)}updateCamera(e){if(!this.active)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._isAccumulationValid(e)||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight),this._reset()),this._accumulationRenderer.setOpacityFromElevation(e.relativeElevation)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,s=this._createFBO(t,i);e&&(this._clearFramebuffer(s),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,s.fbo),this._fboHandle.dispose(),this._fboHandle=s,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=s(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t,i){if(!e)return;const s=this._techniques.get(w,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(s,i,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(s.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e,t){this._renderToShadowMap(t,t.shadowMap,e.lightDirections[e.progress++],this._depthRange);const i=this._techniques.get(y,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(i,t,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_isAccumulationValid(e){return this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([n()],H.prototype,"_refining",null),e([n()],H.prototype,"active",null),e([n()],H.prototype,"_doneAccumulating",null),e([n()],H.prototype,"_numActive",null),e([n()],H.prototype,"_colorFormat",null),e([n()],H.prototype,"_depthRange",void 0),e([n()],H.prototype,"_enabled",void 0),e([n()],H.prototype,"_previewing",void 0),e([n()],H.prototype,"_accumulationRenderer",void 0),H=e([h("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],H);const j=6,P=new Uint8Array(4);class D{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=o(0),this._sampleCount=o(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,s=Math.min(v,e.length);if(!i(t,0,t.length,e,0,s,u)){t.length=s,this._sampleCount.value=s;for(let i=0;i<s;++i)t[i]=c(t[i]??l(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(y,this.configuration),e.precompile(w,this.configuration)}}export{H as ShadowAccumulator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{createScreenPointArray as t,createRenderScreenPointArray3 as n}from"../../../../core/screenUtils.js";import{copy as r,set as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i,intersects as s,containsPoint as u,create as f}from"../../../../geometry/support/aaBoundingRect.js";import{create as c,distance2 as p,fromPoints as m}from"../../../../geometry/support/lineSegment.js";import{signedDistance as a,intersectLineSegment as l}from"../../../../geometry/support/plane.js";import{containsPoint2dFromValues as h}from"../../../../geometry/support/triangle.js";function g(t,n){return t.isRectangle?u(t.bounds,n):v(n,t.points)}function M(t,n,r){const o=n[0]-r,e=n[1]-r,u=n[0]+r,f=n[1]+r;if(!s(t.bounds,i(o,e,u,f,A)))return!1;if(g(t,n))return!0;const c=r*r;for(const i of t.points){const t=i[0]-n[0],r=i[1]-n[1];if(t*t+r*r<=c)return!0}for(let i=0;i<t.points.length;i++){if(k(n,t.points[i],t.points[(i+1)%t.points.length])<=c)return!0}return!1}function j(t,n){if(!s(t.bounds,n))return!1;if(t.isRectangle)return!0;for(const r of t.points)if(u(n,r))return!0;for(let r=0;r<4;r++)if(v(z(C,n,r),t.points))return!0;for(let r=0;r<t.points.length;r++){const o=t.points[r],e=r===t.points.length-1?t.points[0]:t.points[r+1];for(let t=0;t<4;t++){if(B(o,e,z(C,n,t),z(D,n,(t+1)%4)))return!0}}return!1}function x(t,n,r,o){const e=Math.min(n[0],r[0],o[0]),s=Math.min(n[1],r[1],o[1]),u=Math.max(n[0],r[0],o[0]),f=Math.max(n[1],r[1],o[1]);if(!j(t,i(e,s,u,f,A)))return!1;if(g(t,n)||g(t,r)||g(t,o))return!0;for(const i of t.points)if(h(n,r,o,i,K))return!0;for(let i=0;i<t.points.length;i++){const e=t.points[i],s=t.points[(i+1)%t.points.length];if(B(n,r,e,s)||B(r,o,e,s)||B(o,n,e,s))return!0}return!1}function d(t,n,r,o){const e=Math.min(n[0],r[0])-o,u=Math.min(n[1],r[1])-o,f=Math.max(n[0],r[0])+o,c=Math.max(n[1],r[1])+o;if(!s(t.bounds,i(e,u,f,c,A)))return!1;if(g(t,n)||g(t,r))return!0;const p=o*o;for(const i of t.points)if(k(i,n,r)<=p)return!0;for(let i=0;i<t.points.length;i++){const o=t.points[i],e=t.points[(i+1)%t.points.length];if(B(n,r,o,e)||U(n,r,o,e)<=p)return!0}return!1}function b(t,n,o,e,i){r(G,n),r(H,o);const s=t.projectToRenderScreen(G,E),u=t.projectToRenderScreen(H,F);if(null==s||null==u)return!1;const f=R(t,G),c=R(t,H);if(f&&c)return!1;if(f!==c){const n=f?G:H,r=f?s:u;if(!S(t,n,f?H:G))return!1;if(!t.projectToRenderScreen(n,r))return!1}return e[0]=s[0],e[1]=s[1],e[2]=0,i[0]=u[0],i[1]=u[1],i[2]=0,!0}function R(t,n){return y(t,n)>0}function y(t,n){return a(t.frustum[4],n)}function S(t,n,r){return T(t,n,r,n)}function T(t,n,r,o){return l(t.frustum[4],m(n,r,J),o)}function v(t,n){let r=!1;for(let o=0,e=n.length-1;o<n.length;e=o++){const i=n[o],s=n[e];if(!(i[1]>t[1]!=s[1]>t[1]))continue;const u=(s[0]-i[0])*(t[1]-i[1])/(s[1]-i[1])+i[0];t[0]<u&&(r=!r)}return r}function B(t,n,r,o){const e=q(t,n,r),i=q(t,n,o),s=q(r,o,t),u=q(r,o,n);return e!==i&&s!==u||(0===e&&w(t,n,r)||0===i&&w(t,n,o)||0===s&&w(r,o,t)||0===u&&w(r,o,n))}function U(t,n,r,o){return B(t,n,r,o)?0:Math.min(k(t,r,o),k(n,r,o),k(r,t,n),k(o,t,n))}function k(t,n,r){return p(m(o(G,n[0],n[1],0),o(H,r[0],r[1],0),J),o(I,t[0],t[1],0))}function q(t,n,r){const o=(n[1]-t[1])*(r[0]-n[0])-(n[0]-t[0])*(r[1]-n[1]);return Math.abs(o)<=K?0:Math.sign(o)}function w(t,n,r){return r[0]>=Math.min(t[0],n[0])-K&&r[0]<=Math.max(t[0],n[0])+K&&r[1]>=Math.min(t[1],n[1])-K&&r[1]<=Math.max(t[1],n[1])+K}function z(t,n,r){return t[0]=0===r||3===r?n[0]:n[2],t[1]=r<2?n[1]:n[3],t}const A=f(),C=t(),D=t(),E=n(),F=n(),G=e(),H=e(),I=e(),J=c(),K=1e-9;export{R as isBehindNearPlane,b as projectWorldLineSegmentToRenderScreen,g as screenPolygonContainsPoint,j as screenPolygonIntersectsBounds,d as screenPolygonIntersectsBufferedSegment,M as screenPolygonIntersectsCircle,x as screenPolygonIntersectsTriangle};
2
+ import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as n,set as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as e,intersects as i,containsPoint as u,create as s,containsXY as f}from"../../../../geometry/support/aaBoundingRect.js";import{create as c,distance2 as p,fromPoints as m}from"../../../../geometry/support/lineSegment.js";import{signedDistance as a,intersectLineSegment as l}from"../../../../geometry/support/plane.js";import{containsPoint2dFromValues as h}from"../../../../geometry/support/triangle.js";function g(t,n){return t.isRectangle?u(t.bounds,n):v(n,t.points)}function M(t,n,r){const o=n[0]-r,u=n[1]-r,s=n[0]+r,f=n[1]+r;if(!i(t.bounds,e(o,u,s,f,F)))return!1;if(g(t,n))return!0;const c=r*r;for(const e of t.points){const t=e[0]-n[0],r=e[1]-n[1];if(t*t+r*r<=c)return!0}for(let e=0;e<t.points.length;e++){if(A(n,t.points[e],t.points[(e+1)%t.points.length])<=c)return!0}return!1}function j(t,n){if(!i(t.bounds,n))return!1;if(t.isRectangle)return!0;for(const r of t.points)if(u(n,r))return!0;if(U(n,t.points))return!0;for(let r=0;r<t.points.length;r++){if(k(t.points[r],r===t.points.length-1?t.points[0]:t.points[r+1],n))return!0}return!1}function x(t,n,r,o){const i=Math.min(n[0],r[0],o[0]),u=Math.min(n[1],r[1],o[1]),s=Math.max(n[0],r[0],o[0]),f=Math.max(n[1],r[1],o[1]);if(!j(t,e(i,u,s,f,F)))return!1;if(g(t,n)||g(t,r)||g(t,o))return!0;for(const e of t.points)if(h(n,r,o,e,N))return!0;for(let e=0;e<t.points.length;e++){const i=t.points[e],u=t.points[(e+1)%t.points.length];if(w(n,r,i,u)||w(r,o,i,u)||w(o,n,i,u))return!0}return!1}function d(t,n,r,o){const u=Math.min(n[0],r[0])-o,s=Math.min(n[1],r[1])-o,f=Math.max(n[0],r[0])+o,c=Math.max(n[1],r[1])+o;if(!i(t.bounds,e(u,s,f,c,F)))return!1;if(g(t,n)||g(t,r))return!0;const p=o*o;for(const e of t.points)if(A(e,n,r)<=p)return!0;for(let e=0;e<t.points.length;e++){const o=t.points[e],i=t.points[(e+1)%t.points.length];if(w(n,r,o,i)||z(n,r,o,i)<=p)return!0}return!1}function b(t,r,o,e,i){n(I,r),n(J,o);const u=t.projectToRenderScreen(I,G),s=t.projectToRenderScreen(J,H);if(null==u||null==s)return!1;const f=R(t,I),c=R(t,J);if(f&&c)return!1;if(f!==c){const n=f?I:J,r=f?u:s;if(!S(t,n,f?J:I))return!1;if(!t.projectToRenderScreen(n,r))return!1}return e[0]=u[0],e[1]=u[1],e[2]=0,i[0]=s[0],i[1]=s[1],i[2]=0,!0}function R(t,n){return y(t,n)>0}function y(t,n){return a(t.frustum[4],n)}function S(t,n,r){return T(t,n,r,n)}function T(t,n,r,o){return l(t.frustum[4],m(n,r,L),o)}function v(t,n){return B(t[0],t[1],n)}function B(t,n,r){let o=!1;for(let e=0,i=r.length-1;e<r.length;i=e++){const u=r[e],s=r[i];if(!(u[1]>n!=s[1]>n))continue;t<(s[0]-u[0])*(n-u[1])/(s[1]-u[1])+u[0]&&(o=!o)}return o}function U(t,n){const r=t[0],o=t[1],e=t[2],i=t[3];return B(r,o,n)||B(e,o,n)||B(e,i,n)||B(r,i,n)}function k(t,n,r){const o=r[0],e=r[1],i=r[2],u=r[3],s=t[0],c=t[1],p=n[0],m=n[1];return!(s<o&&p<o||s>i&&p>i||c<e&&m<e||c>u&&m>u)&&(!(!f(r,s,c)&&!f(r,p,m))||(q(t,n,o,e,i,e)||q(t,n,i,e,i,u)||q(t,n,i,u,o,u)||q(t,n,o,u,o,e)))}function q(t,n,r,o,e,i){const u=C(t[0],t[1],n[0],n[1],r,o),s=C(t[0],t[1],n[0],n[1],e,i),f=C(r,o,e,i,t[0],t[1]),c=C(r,o,e,i,n[0],n[1]);return u!==s&&f!==c||(0===u&&D(t,n,r,o)||0===s&&D(t,n,e,i)||0===f&&E(r,o,e,i,t[0],t[1])||0===c&&E(r,o,e,i,n[0],n[1]))}function w(t,n,r,o){return q(t,n,r[0],r[1],o[0],o[1])}function z(t,n,r,o){return w(t,n,r,o)?0:Math.min(A(t,r,o),A(n,r,o),A(r,t,n),A(o,t,n))}function A(t,n,o){return p(m(r(I,n[0],n[1],0),r(J,o[0],o[1],0),L),r(K,t[0],t[1],0))}function C(t,n,r,o,e,i){const u=(o-n)*(e-r)-(r-t)*(i-o);return Math.abs(u)<=N?0:Math.sign(u)}function D(t,n,r,o){return E(t[0],t[1],n[0],n[1],r,o)}function E(t,n,r,o,e,i){return e>=Math.min(t,r)-N&&e<=Math.max(t,r)+N&&i>=Math.min(n,o)-N&&i<=Math.max(n,o)+N}const F=s(),G=t(),H=t(),I=o(),J=o(),K=o(),L=c(),N=1e-9;export{R as isBehindNearPlane,b as projectWorldLineSegmentToRenderScreen,g as screenPolygonContainsPoint,j as screenPolygonIntersectsBounds,d as screenPolygonIntersectsBufferedSegment,M as screenPolygonIntersectsCircle,x as screenPolygonIntersectsTriangle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import"../core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DUintPassUniform.js";import"./GaussianSplatTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplat.glsl.js";
2
+ import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplat.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplatDepth.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ const a=.25,t=80*15259e-9,e={direct:{alphaCutoff:a,depthBias:t},analysis:{alphaCutoff:.5,depthBias:4*t}};export{e as gaussianSplatDepthPolicy,a as gaussianSplatFirstHitAlpha};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{G as i}from"../../../../chunks/GaussianSplatDepth.glsl.js";import{makePipelineState as o,defaultDepthWrite as a}from"../../../webgl/renderState.js";let p=class extends t{constructor(){super(...arguments),this.shader=new s(i,()=>import("./GaussianSplatDepth.glsl.js"))}initializePipeline(){return o({colorWrite:null,depthTest:{func:515},depthWrite:a})}};p=e([r("esri.views.3d.webgl-engine.shaders.GaussianSplatDepthTechnique")],p);export{p as GaussianSplatDepthTechnique};
@@ -0,0 +1,97 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{set as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{RejectBySlicePass as i}from"../core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as n}from"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as t}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as o}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as r}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as s}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as c}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as l}from"../core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as u}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as d}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as m}from"../core/shaderModules/FloatPassUniform.js";import{glsl as f,If as p}from"../core/shaderModules/glsl.js";import{Matrix4BindUniform as v}from"../core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as g}from"../core/shaderModules/Texture2DUintPassUniform.js";function x(a,n){const{clippingEnabled:u,needsFragmentPosition:p}=n,{fragment:x,varyings:P,vertex:h}=a;P.add("conic","vec3"),P.add("gaussianLogAlphaCutoff","float"),P.add("offsetFromCenter","vec2"),p&&P.add("fragmentPositionCameraRelative","vec3"),h.uniforms.add(new g("splatOrderTexture",e=>e.splatOrder),new g("splatAtlasTexture",e=>e.splatAtlas),new g("splatHeaderTexture",e=>e.splatHeader),new m("minSplatRadius",e=>e.minSplatRadius),new l("inverseScreenSize",({camera:a})=>e(F,1/a.fullWidth,1/a.fullHeight)),new v("proj",e=>e.camera.projectionMatrix),new v("view",e=>e.camera.viewMatrix),new l("nearFar",e=>e.camera.nearFar)),u&&(h.uniforms.add(new d("clipMin",e=>e.clipMinCameraRelative),new d("clipMax",e=>e.clipMaxCameraRelative)),p&&x.uniforms.add(new d("clipMin",e=>e.clipMinCameraRelative),new d("clipMax",e=>e.clipMaxCameraRelative))),h.include(s),h.include(r),h.include(c),h.include(t),h.include(o),h.include(i,n),x.include(o),p&&x.include(i,n),x.main.add(f`
3
+ ${j(n)}
4
+ `)}function P(e,a){e.include(x,a),e.vertex.uniforms.add(new m("focalLength",e=>e.focalLength),new u("tanFov",e=>e.tanFov))}function h(e){e.uniforms.add(new g("splatFadingTexture",e=>e.splatFading)),e.code.add(f`float applyGaussianSplatFading(float opacity, uint gaussianIndex) {
5
+ uint pageIndex = fetchGaussianPageIndex(gaussianIndex);
6
+ uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);
7
+ uint fadeX = pageIndex % fadingTextureWidth;
8
+ uint fadeY = pageIndex / fadingTextureWidth;
9
+ uint opacityModifier = texelFetch(splatFadingTexture, ivec2(fadeX, fadeY), 0).r;
10
+ return opacity * float(opacityModifier) / 255.0;
11
+ }`)}function y(e,a){const{clippingEnabled:i,hasSlicePlane:t}=e;return f`
12
+ gl_Position = ${n};
13
+
14
+ if (opacity < ${a}) {
15
+ return;
16
+ }
17
+
18
+ vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);
19
+
20
+ ${p(i,f`
21
+ if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||
22
+ cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {
23
+ return;
24
+ }
25
+ `)}
26
+
27
+ ${p(t,f`
28
+ if (rejectBySlice(cameraRelativePosition)) {
29
+ return;
30
+ }
31
+ `)}
32
+
33
+ vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);
34
+
35
+ if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
36
+ return;
37
+ }
38
+ `}const M=f`vec3 covarianceA;
39
+ vec3 covarianceB;
40
+ computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);
41
+ float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);`;function C(e){return f`
42
+ float determinant = computeGaussianCovarianceDeterminant(covariance2D);
43
+ if (determinant <= 0.0) {
44
+ return;
45
+ }
46
+
47
+ vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);
48
+ gaussianLogAlphaCutoff = ${e};
49
+ float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);
50
+ vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);
51
+ float maxRadius = max(axisLengths.x, axisLengths.y);
52
+
53
+ if (rejectGaussianByMinimumRadius(maxRadius, opacity, minSplatRadius)) {
54
+ return;
55
+ }
56
+ `}const R=f`vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
57
+ if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {
58
+ return;
59
+ }
60
+ offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);
61
+ conic = computeGaussianConic(covariance2D, determinant);`;function S(e,a){return f`
62
+ ${y(e,f.float(a))}
63
+
64
+ ${M}
65
+ vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);
66
+
67
+ ${C(`${f.float(Math.log(a))} - log(opacity)`)}
68
+
69
+ ${w(e)}
70
+ `}function w(e){return f`
71
+ vec4 projPos = proj * viewPos;
72
+ float invW = 1.0 / (projPos.w + 1e-7);
73
+ vec3 ndcPos = projPos.xyz * invW;
74
+ ${R}
75
+
76
+ ${p(e.needsFragmentPosition,f`
77
+ float viewSpacePixelScale = -viewPos.z / focalLength;
78
+ vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);
79
+ fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;
80
+ `)}
81
+
82
+ vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
83
+ gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);
84
+ `}function j(e){const{clippingEnabled:a,needsFragmentPosition:i,hasSlicePlane:n}=e;return f`
85
+ ${p(i&&a,f`
86
+ if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||
87
+ fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {
88
+ discard;
89
+ }
90
+ `)}
91
+ ${p(i&&n,f`if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }`)}
92
+
93
+ float gaussianExponent = evaluateGaussianExponent(conic, offsetFromCenter);
94
+ if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {
95
+ discard;
96
+ }
97
+ `}const F=a();export{h as GaussianSplatFading,x as GaussianSplatPass,P as GaussianSplatPerspectivePass,C as gaussianSplatComputeEllipse,R as gaussianSplatComputeQuad,y as gaussianSplatCullAndTransformVertex,S as gaussianSplatPerspectiveVertex,M as gaussianSplatUnpackCovariance3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DUintPassUniform.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/GaussianSplatShadow.glsl.js";
2
+ import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./GaussianSplatDepthPolicy.js";import"./GaussianSplatPass.glsl.js";import"./GaussianSplatPassParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatShadowPassParameters,b as build}from"../../../../chunks/GaussianSplatShadow.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{G as t}from"../../../../chunks/GaussianSplatShadow.glsl.js";import{makePipelineState as i,defaultDepthWrite as a}from"../../../webgl/renderState.js";let l=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./GaussianSplatShadow.glsl.js"))}initializePipeline(){return i({colorWrite:null,depthTest:{func:515},depthWrite:a})}};l=e([r("esri.views.3d.webgl-engine.shaders.GaussianSplatShadowTechnique")],l);export{l as GaussianSplatShadowTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../chunks/GaussianSplatShadow.glsl.js";import{makePipelineState as a,defaultDepthWrite as i}from"../../../webgl/renderState.js";let l=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./GaussianSplatShadow.glsl.js"))}initializePipeline(){return a({colorWrite:null,depthTest:{func:515},depthWrite:i})}};l=e([r("esri.views.3d.webgl-engine.shaders.GaussianSplatShadowTechnique")],l);export{l as GaussianSplatShadowTechnique};