@arcgis/core 5.1.0-next.70 → 5.1.0-next.72
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.
- package/PopupTemplate.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/addToLivestreamVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer32.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer32.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture16.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture24.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture32.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12316.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12324.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12332.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/busTravelMode16.json +1 -0
- package/assets/components/assets/icon/busTravelMode16F.json +1 -0
- package/assets/components/assets/icon/busTravelMode24.json +1 -0
- package/assets/components/assets/icon/busTravelMode24F.json +1 -0
- package/assets/components/assets/icon/busTravelMode32.json +1 -0
- package/assets/components/assets/icon/busTravelMode32F.json +1 -0
- package/assets/components/assets/icon/carTravelMode16.json +1 -0
- package/assets/components/assets/icon/carTravelMode16F.json +1 -0
- package/assets/components/assets/icon/carTravelMode24.json +1 -0
- package/assets/components/assets/icon/carTravelMode24F.json +1 -0
- package/assets/components/assets/icon/carTravelMode32.json +1 -0
- package/assets/components/assets/icon/carTravelMode32F.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown16.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown24.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown32.json +1 -0
- package/assets/components/assets/icon/emergency16.json +1 -0
- package/assets/components/assets/icon/emergency16F.json +1 -0
- package/assets/components/assets/icon/emergency24.json +1 -0
- package/assets/components/assets/icon/emergency24F.json +1 -0
- package/assets/components/assets/icon/emergency32.json +1 -0
- package/assets/components/assets/icon/emergency32F.json +1 -0
- package/assets/components/assets/icon/eyedropper16.json +1 -1
- package/assets/components/assets/icon/eyedropper24.json +1 -1
- package/assets/components/assets/icon/eyedropper32.json +1 -1
- package/assets/components/assets/icon/featureDetailsSet16.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet24.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet32.json +1 -0
- package/assets/components/assets/icon/fileBim16.json +1 -0
- package/assets/components/assets/icon/fileBim24.json +1 -0
- package/assets/components/assets/icon/fileBim32.json +1 -0
- package/assets/components/assets/icon/fileDwg16.json +1 -0
- package/assets/components/assets/icon/fileDwg24.json +1 -0
- package/assets/components/assets/icon/fileDwg32.json +1 -0
- package/assets/components/assets/icon/fileRvt16.json +1 -0
- package/assets/components/assets/icon/fileRvt24.json +1 -0
- package/assets/components/assets/icon/fileRvt32.json +1 -0
- package/assets/components/assets/icon/gradient16.json +1 -0
- package/assets/components/assets/icon/gradient24.json +1 -0
- package/assets/components/assets/icon/gradient32.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting16.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting24.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/publish16.json +1 -0
- package/assets/components/assets/icon/publish24.json +1 -0
- package/assets/components/assets/icon/publish32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32F.json +1 -0
- package/assets/components/assets/icon/velocityServer16.json +1 -0
- package/assets/components/assets/icon/velocityServer24.json +1 -0
- package/assets/components/assets/icon/velocityServer32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
- package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
- package/assets/esri/core/workers/chunks/026d3fa331caec1ea3d2.js +1 -0
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
- package/assets/esri/core/workers/chunks/{81b2985b83be8f8f1090.js → 02876e434dc91c42b2f4.js} +1 -1
- package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
- package/assets/esri/core/workers/chunks/0783890816bac45277b9.js +1 -0
- package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
- package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +2 -0
- package/assets/esri/core/workers/chunks/{d82b543c96f09ded3bf9.js.LICENSE.txt → 0b1454a77a6a682541dc.js.LICENSE.txt} +6 -1
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
- package/assets/esri/core/workers/chunks/{478879ba965798f61bf3.js → 0d96e39380fd84cea9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
- package/assets/esri/core/workers/chunks/{03e20ac54d6f141b5001.js → 11241781baaed346af52.js} +1 -1
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
- package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
- package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
- package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
- package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
- package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
- package/assets/esri/core/workers/chunks/1c7183551f5269bdcf13.js +30 -0
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +1 -0
- package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
- package/assets/esri/core/workers/chunks/{b364ec104dd59faa41b6.js → 1f82a0f134ea912fc686.js} +1 -1
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +1 -0
- package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
- package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
- package/assets/esri/core/workers/chunks/266ba61b72a278d93a26.js +1 -0
- package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
- package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
- package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
- package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
- package/assets/esri/core/workers/chunks/30e710ec4d22c43d4e7e.js +1 -0
- package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +1 -0
- package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +1 -0
- package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
- package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
- package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
- package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +1 -0
- package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
- package/assets/esri/core/workers/chunks/427dec43ef2d67467699.js +1 -0
- package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
- package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
- package/assets/esri/core/workers/chunks/{746b3e98bad32c366a27.js → 444f0f51b3ee0b9845a5.js} +1 -1
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
- package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
- package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
- package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
- package/assets/esri/core/workers/chunks/{f209a7076d67cbf4d205.js → 4e676e888a935c507d90.js} +1 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
- package/assets/esri/core/workers/chunks/50d5d6654ada9f28345d.js +1 -0
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +1 -0
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +1 -0
- package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
- package/assets/esri/core/workers/chunks/55369c5bd65bcaf78da1.js +1 -0
- package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +1 -0
- package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
- package/assets/esri/core/workers/chunks/5a4d7ba6dc1d4b41d80d.js +1 -0
- package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
- package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
- package/assets/esri/core/workers/chunks/5ef37f37e405b3bb5450.js +1 -0
- package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
- package/assets/esri/core/workers/chunks/61ef14e42bc09b787d89.js +1 -0
- package/assets/esri/core/workers/chunks/628f56c09838eb9c573b.js +1 -0
- package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
- package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
- package/assets/esri/core/workers/chunks/6a0352d20596ca3f4b64.js +1 -0
- package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +1 -0
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +1 -0
- package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
- package/assets/esri/core/workers/chunks/6f67c9f68101a084b683.js +30 -0
- package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
- package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
- package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +1 -0
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
- package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
- package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +2 -0
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +1 -0
- package/assets/esri/core/workers/chunks/7e6ccf9f3e756186e93e.js +1 -0
- package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
- package/assets/esri/core/workers/chunks/824051af00e7a1f05ed0.js +1 -0
- package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
- package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +2 -0
- package/assets/esri/core/workers/chunks/{2d2c10c31cc1460dd96a.js → 88827e23f8938342781c.js} +1 -1
- package/assets/esri/core/workers/chunks/88b480a1d1fb01778798.js +267 -0
- package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
- package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
- package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
- package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +1 -0
- package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
- package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
- package/assets/esri/core/workers/chunks/8acee3fba488f202f82f.js +1 -0
- package/assets/esri/core/workers/chunks/8b73f4d2f99c0b54cced.js +1 -0
- package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
- package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +1 -0
- package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
- package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a63b5861e8c975097e.js → 9aaf78b831f8739bc127.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d378d4e021a33b0047e.js → 9be4438ce2c7180adadf.js} +1 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
- package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
- package/assets/esri/core/workers/chunks/a169d9fe66b5865911d9.js +1 -0
- package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
- package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +1 -0
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +1 -0
- package/assets/esri/core/workers/chunks/a65d576e90179a2b5400.js +1 -0
- package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
- package/assets/esri/core/workers/chunks/{678c9f15712cf3d3bb9e.js → aa1a3a849aba84cf585b.js} +1 -1
- package/assets/esri/core/workers/chunks/abc06d10c7ac8ba5b0e4.js +1 -0
- package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
- package/assets/esri/core/workers/chunks/ae0a572cbbdd9815ee2e.js +1 -0
- package/assets/esri/core/workers/chunks/af5db0372d526e592fcc.js +1 -0
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +1 -0
- package/assets/esri/core/workers/chunks/b2983f521d8c96becd8a.js +1 -0
- package/assets/esri/core/workers/chunks/{915a5e8aecf25f3bc72b.js → b475f5492c6e3fd4cca8.js} +1 -1
- package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ea0d3de93ec0392af.js → b54b7cc6b23a70fed700.js} +1 -1
- package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
- package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
- package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
- package/assets/esri/core/workers/chunks/b92794def31592a6a25f.js +1 -0
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +1 -0
- package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
- package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
- package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
- package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
- package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +1 -0
- package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +1 -0
- package/assets/esri/core/workers/chunks/c9065cee85eb8dde6a42.js +1 -0
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +1 -0
- package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
- package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +1 -0
- package/assets/esri/core/workers/chunks/ce2aa75e084ee56f5e29.js +1 -0
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +1 -0
- package/assets/esri/core/workers/chunks/d05a7ce6c1d4b883ed4c.js +30 -0
- package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
- package/assets/esri/core/workers/chunks/d2aa75816e84b1e7fd25.js +1 -0
- package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +2 -0
- package/assets/esri/core/workers/chunks/{8ccf2f65d8ed3c48ffff.js → d950d5c2844206502ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
- package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
- package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +1 -0
- package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
- package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +1140 -0
- package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
- package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +1 -0
- package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +1 -0
- package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
- package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
- package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
- package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +1 -0
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +2 -0
- package/assets/esri/core/workers/chunks/f1673e723b336204ad77.js +1 -0
- package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
- package/assets/esri/core/workers/chunks/f52443cd203e687551da.js +1 -0
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/assets/esri/core/workers/chunks/ffcd4fca7f67e1f943f1.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +3 -5
- package/chunks/ColorMaterial.glsl.js +4 -6
- package/chunks/ComponentShader.glsl.js +42 -44
- package/chunks/DefaultMaterial.glsl.js +21 -23
- package/chunks/EdgeShader.glsl.js +9 -11
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/ImageMaterial.glsl.js +5 -7
- package/chunks/LineCallout.glsl.js +9 -12
- package/chunks/LineMarker.glsl.js +24 -26
- package/chunks/OITDim.glsl.js +3 -4
- package/chunks/Path.glsl.js +15 -17
- package/chunks/Pattern.glsl.js +25 -27
- package/chunks/RealisticTree.glsl.js +11 -13
- package/chunks/RibbonLine.glsl.js +42 -45
- package/chunks/ShadedColorMaterial.glsl.js +8 -9
- package/chunks/Water.glsl.js +18 -20
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/triangulationUtilsDeprecated.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/FlatFeature.js +1 -1
- package/layers/graphics/FlatFeatureSet.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +2 -0
- package/popup/Feature.js +1 -1
- package/popup/actions.js +1 -1
- package/popupTemplateUtils.js +2 -0
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/support/OutDistance.js +2 -0
- package/rest/support/Query.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SamplerRepository.js +2 -0
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/ViewAnimation.d.ts +2 -21
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/rasterHitTestUtils.js +2 -0
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/Sampler.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +15 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +0 -1
- package/assets/esri/core/workers/chunks/0dd12d6af0cf7707109c.js +0 -2
- package/assets/esri/core/workers/chunks/0e2e4cb34ac6aac88ebf.js +0 -1
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +0 -1
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +0 -1
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +0 -1
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +0 -1
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +0 -1
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +0 -1
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +0 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +0 -1
- package/assets/esri/core/workers/chunks/1c742bfe3b0aa51823d1.js +0 -1
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +0 -1
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +0 -1
- package/assets/esri/core/workers/chunks/205e957ffd7e95f530f7.js +0 -1
- package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
- package/assets/esri/core/workers/chunks/210629f3c28d4339c655.js +0 -1
- package/assets/esri/core/workers/chunks/21a8e2a11ffacc226e2b.js +0 -1
- package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +0 -1
- package/assets/esri/core/workers/chunks/29b1a4ce7646b403008e.js +0 -1
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +0 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +0 -1
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
- package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
- package/assets/esri/core/workers/chunks/35217befc8f9882d139e.js +0 -1
- package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +0 -1
- package/assets/esri/core/workers/chunks/3a2ecb883fdb5c598544.js +0 -30
- package/assets/esri/core/workers/chunks/3eef3c2e94aa2a00d76a.js +0 -1
- package/assets/esri/core/workers/chunks/40d6ad030614099155cd.js +0 -1414
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +0 -1
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +0 -1
- package/assets/esri/core/workers/chunks/453280ea87a696a4df81.js +0 -1
- package/assets/esri/core/workers/chunks/499b899bf88aaf29230d.js +0 -1
- package/assets/esri/core/workers/chunks/4b0d6309abf273f1f79f.js +0 -1
- package/assets/esri/core/workers/chunks/4e07827ab870c65377d3.js +0 -1
- package/assets/esri/core/workers/chunks/51852ef71ac04954fdae.js +0 -1
- package/assets/esri/core/workers/chunks/53b797e384be9628fc94.js +0 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +0 -1
- package/assets/esri/core/workers/chunks/54c0306082d30d59cba2.js +0 -1
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +0 -1
- package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +0 -1
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +0 -1
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +0 -1
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
- package/assets/esri/core/workers/chunks/60d0f8a949b130baff81.js +0 -1
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +0 -1
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +0 -1
- package/assets/esri/core/workers/chunks/621ea864e2774f160d1c.js +0 -1
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +0 -1
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +0 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +0 -1
- package/assets/esri/core/workers/chunks/6a567755b67c06d16f21.js +0 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +0 -1
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +0 -1
- package/assets/esri/core/workers/chunks/71326d16b5cc35c3ff7f.js +0 -1
- package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
- package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +0 -1
- package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
- package/assets/esri/core/workers/chunks/78fbfc03d9b827c3f767.js +0 -1
- package/assets/esri/core/workers/chunks/7d0350f459844162d3a7.js +0 -1
- package/assets/esri/core/workers/chunks/7e39e9d4d68843b60e4c.js +0 -1
- package/assets/esri/core/workers/chunks/823127b23bec07e1f9d0.js +0 -2
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +0 -1
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
- package/assets/esri/core/workers/chunks/888f6387e795d45a7ad3.js +0 -2
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +0 -1
- package/assets/esri/core/workers/chunks/8969788c57bcc11bf77b.js +0 -1
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +0 -1
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +0 -1
- package/assets/esri/core/workers/chunks/8fb336c2066113300d0d.js +0 -1
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +0 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +0 -1
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +0 -1
- package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +0 -1
- package/assets/esri/core/workers/chunks/9d7ffd83f69d6e639f09.js +0 -1
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +0 -1
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +0 -1
- package/assets/esri/core/workers/chunks/a061a17b62686f945e81.js +0 -1
- package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +0 -1
- package/assets/esri/core/workers/chunks/a43decc8ede8b4910553.js +0 -1
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +0 -1
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +0 -1
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +0 -1
- package/assets/esri/core/workers/chunks/a73e8b80760dc88f926f.js +0 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
- package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
- package/assets/esri/core/workers/chunks/b014f0b2385dc82dc683.js +0 -2
- package/assets/esri/core/workers/chunks/b2120c4c56656be941ae.js +0 -1
- package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
- package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
- package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +0 -1
- package/assets/esri/core/workers/chunks/b85c9ceeece1bae67a16.js +0 -1
- package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +0 -1
- package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
- package/assets/esri/core/workers/chunks/bbdf27bc34fadbe8e6fe.js +0 -1
- package/assets/esri/core/workers/chunks/bc2c7cb99e227ddbd3a6.js +0 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +0 -1
- package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +0 -1
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +0 -1
- package/assets/esri/core/workers/chunks/be61ea8e1883b915bbb1.js +0 -1
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +0 -1
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +0 -1
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +0 -1
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +0 -1
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +0 -1
- package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
- package/assets/esri/core/workers/chunks/c7ca47f5d4b2f3885239.js +0 -1
- package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
- package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +0 -1
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +0 -1
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
- package/assets/esri/core/workers/chunks/d4e55eb75fa4d3ac1e84.js +0 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +0 -1
- package/assets/esri/core/workers/chunks/d635f97b7b82a37482d6.js +0 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +0 -1
- package/assets/esri/core/workers/chunks/d816d1a4220d827faf63.js +0 -1
- package/assets/esri/core/workers/chunks/d82b543c96f09ded3bf9.js +0 -2
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +0 -1
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +0 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +0 -1
- package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +0 -1
- package/assets/esri/core/workers/chunks/e5801b0f3893d4d4f5b0.js +0 -1
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +0 -1
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +0 -1
- package/assets/esri/core/workers/chunks/e62d08f5488a74cbda82.js +0 -1
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +0 -1
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +0 -1
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +0 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +0 -1
- package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +0 -1
- package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
- package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +0 -1
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +0 -1
- package/assets/esri/core/workers/chunks/f9cde38cb56c547e87e5.js +0 -1
- package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
- package/assets/esri/core/workers/chunks/fc64ae69581e4c38fa8a.js +0 -1
- package/assets/esri/core/workers/chunks/fd6bbe47773bbd9f7dd9.js +0 -1
- package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +0 -1
- package/chunks/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
- /package/assets/esri/core/workers/chunks/{0dd12d6af0cf7707109c.js.LICENSE.txt → 7bacdd65a6cc4d284e0a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{823127b23bec07e1f9d0.js.LICENSE.txt → 85edbb072a2ce6c1bb30.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{888f6387e795d45a7ad3.js.LICENSE.txt → d4a9eb4470cc6a1f67fc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b014f0b2385dc82dc683.js.LICENSE.txt → f09a41ad239d467d9438.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,1140 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951,5647],{28491(e,t,r){r.d(t,{D:()=>L,b:()=>V});var o=r(32680),n=r(49255),a=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),m=r(53466),h=r(92700),f=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(71651),b=r(9312),w=r(98619),y=r(62602),M=r(22393),T=r(59469),S=r(32482),C=r(51406),_=r(43259),z=r(58614),I=r(27950),P=r(77949),O=r(33079),F=r(71988),H=r(20304),E=r(31821),R=r(63761),j=r(27832),N=r(43616),D=r(73541),A=r(14113),B=r(49788);function V(e){const t=new A.N5,{attributes:r,vertex:V,fragment:L,varyings:G}=t,{output:W,normalType:k,offsetBackfaces:U,spherical:q,snowCover:Z,pbrMode:$,textureAlphaPremultiplied:Y,instancedDoublePrecision:J,hasVertexColors:K,hasVertexTangents:X,hasColorTexture:Q,hasNormalTexture:ee,hasNormalTextureTransform:te,hasColorTextureTransform:re}=e;if((0,P.NB)(V,e),r.add("position","vec3"),V.inputs.add("position",()=>"position"),G.add("vpos","vec3",{invariant:!0}),t.include(_.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(C.q2,e),!(0,n._o)(W))return t.include(v.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,P.yu)(V,e),t.include(u.Y,e),t.include(i.d);const oe=0===k||1===k;return oe&&U&&t.include(o.M),t.include(g.J,e),t.include(f.Mh,e),t.include(s.v,e),G.add("vPositionLocal","vec3"),t.include(m.U,e),t.include(d.K,e),t.include(h.c,e),V.uniforms.add(new F.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),G.add("vcolorExt","vec4"),V.include(c.WD),V.include(c.oF),t.include(J?S.QH:S.LA,e),V.main.add(E.H`
|
|
2
|
+
forwardVertexColor();
|
|
3
|
+
|
|
4
|
+
MaskedColor maskedColor =
|
|
5
|
+
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
6
|
+
|
|
7
|
+
vcolorExt = maskedColor.color;
|
|
8
|
+
forwardColorMixMode(maskedColor.mask);
|
|
9
|
+
|
|
10
|
+
vpos = getVertexInLocalOriginSpace();
|
|
11
|
+
vPositionLocal = vpos - view[3].xyz;
|
|
12
|
+
vpos = subtractOrigin(vpos);
|
|
13
|
+
${(0,E.If)(oe,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
14
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
15
|
+
${(0,E.If)(X,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
16
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
17
|
+
${(0,E.If)(oe&&U,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
18
|
+
|
|
19
|
+
forwardTextureCoordinates();
|
|
20
|
+
forwardColorUV();
|
|
21
|
+
forwardNormalUV();
|
|
22
|
+
forwardEmissiveUV();
|
|
23
|
+
forwardOcclusionUV();
|
|
24
|
+
forwardMetallicRoughnessUV();
|
|
25
|
+
|
|
26
|
+
if (opacityMixMode != ${E.H.int(N.Um.ignore)} && vcolorExt.a < ${E.H.float(B.Q)}) {
|
|
27
|
+
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
28
|
+
}
|
|
29
|
+
forwardLinearDepthToReadShadowMap();
|
|
30
|
+
`),L.include(b.kA,e),L.include(x.n,e),t.include(z.S,e),L.include(a.HQ,e),t.include(D.D,e),(0,P.yu)(L,e),L.uniforms.add(V.uniforms.get("localOrigin"),new O.t("ambient",e=>e.ambient),new O.t("diffuse",e=>e.diffuse),new H.m("opacity",e=>e.opacity),new H.m("layerOpacity",e=>e.layerOpacity)),Q&&L.uniforms.add(new R.N("tex",e=>e.texture)),t.include(T._,e),L.include(M.c,e),L.include(I.N),t.include(y.r,e),L.include(j.b,e),(0,b.a8)(L),(0,b.eU)(L),(0,w.O4)(L),L.main.add(E.H`
|
|
31
|
+
discardBySlice(vpos);
|
|
32
|
+
${Q?E.H`
|
|
33
|
+
vec4 texColor = texture(tex, ${re?"colorUV":"vuv0"});
|
|
34
|
+
${(0,E.If)(Y,"texColor.rgb /= texColor.a;")}
|
|
35
|
+
discardOrAdjustAlpha(texColor);`:E.H`vec4 texColor = vec4(1.0);`}
|
|
36
|
+
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
37
|
+
${2===k?E.H`vec3 normal = screenDerivativeNormal(vPositionLocal);`:E.H`shadingParams.normalView = vNormalWorld;
|
|
38
|
+
vec3 normal = shadingNormal(shadingParams);`}
|
|
39
|
+
applyPBRFactors();
|
|
40
|
+
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
41
|
+
|
|
42
|
+
vec3 posWorld = vpos + localOrigin;
|
|
43
|
+
|
|
44
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
45
|
+
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
46
|
+
|
|
47
|
+
vec3 matColor = max(ambient, diffuse);
|
|
48
|
+
vec3 albedo = mixExternalColor(${(0,E.If)(K,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
49
|
+
float opacity_ = layerOpacity * mixExternalOpacity(${(0,E.If)(K,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, opacityMixMode);
|
|
50
|
+
|
|
51
|
+
${ee?`mat3 tangentSpace = computeTangentSpace(${X?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${te?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
52
|
+
vec3 normalGround = ${q?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
53
|
+
|
|
54
|
+
${(0,E.If)(Z,E.H`
|
|
55
|
+
float snow = getSnow(normal, normalGround);
|
|
56
|
+
albedo = mix(albedo, vec3(1), snow);
|
|
57
|
+
shadingNormal = mix(shadingNormal, normal, snow);
|
|
58
|
+
ssao = mix(ssao, 1.0, snow);`)}
|
|
59
|
+
|
|
60
|
+
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
61
|
+
|
|
62
|
+
${1===$||2===$?E.H`
|
|
63
|
+
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
64
|
+
${(0,E.If)(Z,"mrr = applySnowToMRR(mrr, snow);")}
|
|
65
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:E.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
66
|
+
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
67
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,E.If)(Z,", snow")});
|
|
68
|
+
`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:V},Symbol.toStringTag,{value:"Module"}))},587(e,t,r){r.d(t,{G:()=>v,a:()=>x,b:()=>g});var o=r(82048),n=r(92573),a=r(8578),i=r(98619),s=r(96608),l=r(34845),c=r(20304),u=r(31821),d=r(58029),m=r(12791),h=r(63761),f=r(65786),p=r(14113);class v extends f.Y{constructor(){super(...arguments),this.projScale=1,this.frameCount=0}}function g(e){const t=new p.N5,r=t.fragment;return t.include(o.c),t.include(l.Ir),(0,i.Gc)(r),r.include(n.V),t.include(s.t,{highStepCount:!1,screenSpaceReflections:!0}),r.include(a.k),r.uniforms.add(new h.N("normalMap",e=>e.normalTexture),new h.N("depthMap",e=>e.depthTexture),new h.N("lastFrameDepthTexture",(e,t)=>t.reprojection.lastFrameDepth?.attachment),new m.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new d.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new d.F("view",e=>e.camera.viewMatrix),new c.m("frameCount",e=>e.frameCount),new h.N("blueNoiseTex",e=>e.noiseTexture)),e.hasEmission&&r.uniforms.add(new h.N("lastFrameEmissionTexture",(e,t)=>t.reprojection.lastFrameEmission?.attachment)),r.constants.add("timeSamplesSize","float",64),r.constants.add("blueNoiseGridSize","float",8),r.code.add(u.H`vec4 randomDirection(float index) {
|
|
69
|
+
vec2 textureOffset = vec2(mod(index, blueNoiseGridSize), floor(index / blueNoiseGridSize)) * timeSamplesSize;
|
|
70
|
+
ivec2 iuv = ivec2(textureOffset + mod(gl_FragCoord.xy, vec2(timeSamplesSize)));
|
|
71
|
+
vec4 blueNoiseValue = texelFetch(blueNoiseTex, iuv, 0);
|
|
72
|
+
return 2.0 * blueNoiseValue - 1.0;
|
|
73
|
+
}
|
|
74
|
+
vec3 sampleCosineHemisphere(vec2 u) {
|
|
75
|
+
float phi = 6.28318530718 * u.x;
|
|
76
|
+
float radius = sqrt(u.y);
|
|
77
|
+
float x = radius * cos(phi);
|
|
78
|
+
float y = radius * sin(phi);
|
|
79
|
+
float z = sqrt(max(0.0, 1.0 - u.y));
|
|
80
|
+
return vec3(x, y, z);
|
|
81
|
+
}
|
|
82
|
+
mat3 basisFromNormal(vec3 n) {
|
|
83
|
+
vec3 up = abs(n.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
|
|
84
|
+
vec3 tangent = normalize(cross(up, n));
|
|
85
|
+
vec3 bitangent = cross(n, tangent);
|
|
86
|
+
return mat3(tangent, bitangent, n);
|
|
87
|
+
}`),r.main.add(u.H`
|
|
88
|
+
float depth = depthFromTexture(depthMap, uv);
|
|
89
|
+
|
|
90
|
+
// Early out if depth is out of range, such as in the sky
|
|
91
|
+
if (depth >= 1.0 || depth <= 0.0) {
|
|
92
|
+
fragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Get the normal of current fragment
|
|
97
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
98
|
+
vec4 normal4 = texelFetch(normalMap, iuv, 0);
|
|
99
|
+
if(normal4.a != 1.0) {
|
|
100
|
+
fragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
vec3 normal = normalize(normal4.xyz * 2.0 - 1.0);
|
|
104
|
+
|
|
105
|
+
// Reconstruct view space position of current fragment
|
|
106
|
+
float currentPixelDepth = linearizeDepth(depth);
|
|
107
|
+
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
108
|
+
vec4 viewPos = vec4(currentPixelPos, 1.0);
|
|
109
|
+
|
|
110
|
+
// Reproject current view position to last frame
|
|
111
|
+
vec4 reprojectedViewPos = reprojectionViewMatrix * viewPos;
|
|
112
|
+
vec4 reprojectedCoordinate = applyProjectionMat(proj, reprojectedViewPos.xyz);
|
|
113
|
+
|
|
114
|
+
// Read last frame reprojected depth and GI value.
|
|
115
|
+
float lastFrameDepthViewPos = -linearDepthFromTextureLastFrame(lastFrameDepthTexture, reprojectedCoordinate.xy);
|
|
116
|
+
vec4 lastFrameGlobalIllumination = texture(lastFrameGlobalIlluminationTexture, reprojectedCoordinate.xy);
|
|
117
|
+
|
|
118
|
+
int steps;
|
|
119
|
+
float weightOcclusion;
|
|
120
|
+
float weightEmission;
|
|
121
|
+
|
|
122
|
+
// Heuristic to determine blending weights and number of steps for occlusion and emission
|
|
123
|
+
if (abs((lastFrameDepthViewPos + reprojectedViewPos.z)/max(lastFrameDepthViewPos, reprojectedViewPos.z)) > 0.01) {
|
|
124
|
+
steps = 6;
|
|
125
|
+
weightOcclusion = 1.0;
|
|
126
|
+
weightEmission = 1.0;
|
|
127
|
+
} else {
|
|
128
|
+
steps = 1;
|
|
129
|
+
if (lastFrameGlobalIllumination.b > 0.5) {
|
|
130
|
+
weightOcclusion = 0.15;
|
|
131
|
+
weightEmission = 0.008;
|
|
132
|
+
} else if (lastFrameGlobalIllumination.b > 0.02) {
|
|
133
|
+
weightOcclusion = lastFrameGlobalIllumination.b - 0.005;
|
|
134
|
+
weightEmission = 0.008;
|
|
135
|
+
} else {
|
|
136
|
+
weightOcclusion = 0.016;
|
|
137
|
+
weightEmission = 0.008;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
vec4 randomDirectionSample;
|
|
142
|
+
mat3 normalBasis = basisFromNormal(normal);
|
|
143
|
+
|
|
144
|
+
// For each ray determine if it hits geometry and calculate occlusion and emission values
|
|
145
|
+
float stepSize = 1.0 / float(steps);
|
|
146
|
+
for (int i = 0; i < steps; ++i) {
|
|
147
|
+
float index = float(i * min(64/steps, 6) + int(mod(frameCount, float(64/steps))));
|
|
148
|
+
randomDirectionSample = randomDirection(index);
|
|
149
|
+
vec2 hemisphereSample = randomDirectionSample.rg * 0.5 + 0.5;
|
|
150
|
+
vec3 rayDirection = normalBasis * sampleCosineHemisphere(hemisphereSample);
|
|
151
|
+
vec3 hit = screenSpaceIntersection(rayDirection, viewPos.xyz, normalize(viewPos.xyz), normal, randomDirectionSample.a * 0.5 + 0.5, true);
|
|
152
|
+
|
|
153
|
+
if (hit.z > 0.0) {
|
|
154
|
+
// Emission - reproject to get and accumulate emission from last frame
|
|
155
|
+
vec2 hitReprojectedCoordinate = reprojectionCoordinate(hit);
|
|
156
|
+
vec3 emissionColor = ${(0,u.If)(e.hasEmission,"texture(lastFrameEmissionTexture, hitReprojectedCoordinate).xyz","vec3(0.0)")};
|
|
157
|
+
fragColor += vec4(emissionColor * vec3(stepSize), 0.0);
|
|
158
|
+
} else {
|
|
159
|
+
// Occlusion - heuristic modulating sky intensity based on angle to main light
|
|
160
|
+
vec4 viewMainLightDirection = view * vec4(mainLightDirection, 0.0);
|
|
161
|
+
float skyModulation = pow(max(dot(rayDirection, viewMainLightDirection.xyz), 0.0), 3.0) * 5.5;
|
|
162
|
+
float weight = clamp(3.5 * dot(viewMainLightDirection.xyz, normal), 0.0, 1.0);
|
|
163
|
+
skyModulation = mix(1.0, skyModulation * 0.2 + 0.8, weight);
|
|
164
|
+
fragColor += skyModulation * vec4(vec3(0.0), stepSize);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Rendering trick add noise to reduce accumulation artifacts
|
|
169
|
+
float ditheringNoise = weightOcclusion < 1. ? randomDirectionSample.b * 0.0039 : 0.0;
|
|
170
|
+
|
|
171
|
+
// Accumulate occlusion
|
|
172
|
+
fragColor.a = mix(lastFrameGlobalIllumination.a + ditheringNoise, fragColor.a, weightOcclusion);
|
|
173
|
+
|
|
174
|
+
// Accumulate emission
|
|
175
|
+
vec3 lastFrameEmission = decodeVec2ToRGB(lastFrameGlobalIllumination.rg);
|
|
176
|
+
fragColor.rgb = mix(lastFrameEmission + ditheringNoise, fragColor.rgb, weightEmission);
|
|
177
|
+
|
|
178
|
+
// Encode emission and occlusion into output
|
|
179
|
+
vec2 encodedColor = encodeRGBtoVec2(fragColor.rgb);
|
|
180
|
+
fragColor.r = encodedColor.x;
|
|
181
|
+
fragColor.g = encodedColor.y;
|
|
182
|
+
fragColor.b = weightOcclusion;
|
|
183
|
+
`),t}const x=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:v,build:g},Symbol.toStringTag,{value:"Module"}))},52516(e,t,r){r.d(t,{G:()=>p,a:()=>g,b:()=>v});var o=r(48163),n=r(82048),a=r(52540),i=r(8578),s=r(34845),l=r(68259),c=r(20304),u=r(31821),d=r(15976),m=r(63761),h=r(65786),f=r(14113);class p extends h.Y{constructor(){super(...arguments),this.blurSize=(0,o.vt)()}}function v(){const e=new f.N5,t=e.fragment;e.include(n.c),e.include(s.Ir),t.include(i.k);return t.include(a.E),t.uniforms.add(new m.N("depthMap",e=>e.depthTexture),new m.N("normalMap",e=>e.normalTexture),new d.o("tex",e=>e.colorTexture),new l.t("blurSize",e=>e.blurSize),new c.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(u.H`
|
|
184
|
+
void accumulateBlurSample(
|
|
185
|
+
vec2 sampleUv,
|
|
186
|
+
float sampleOffset,
|
|
187
|
+
float centerDepth,
|
|
188
|
+
vec3 centerNormal,
|
|
189
|
+
float depthSharpness,
|
|
190
|
+
inout float emissionWeightSum,
|
|
191
|
+
inout vec3 emissionSum,
|
|
192
|
+
inout float occlusionWeightSum,
|
|
193
|
+
inout float occlusionSum,
|
|
194
|
+
float centerOcclusionWeight
|
|
195
|
+
) {
|
|
196
|
+
vec4 globalIllumination = texture(tex, sampleUv);
|
|
197
|
+
vec3 sampleNormal = texture(normalMap, sampleUv).rgb;
|
|
198
|
+
float sampleDepth = linearDepthFromTexture(depthMap, sampleUv);
|
|
199
|
+
|
|
200
|
+
float depthDelta = sampleDepth - centerDepth;
|
|
201
|
+
float normalWeight = clamp(1.0 - ${u.H.float(15.3)} * length(sampleNormal - centerNormal), 0.0, 1.0);
|
|
202
|
+
vec3 decodedEmission = decodeVec2ToRGB(globalIllumination.rg);
|
|
203
|
+
|
|
204
|
+
float emissionWeight = exp(-sampleOffset * sampleOffset * ${u.H.float(1/24.5)} * ${u.H.float(.1)} - depthDelta * depthDelta * depthSharpness);
|
|
205
|
+
emissionWeight *= normalWeight;
|
|
206
|
+
emissionWeightSum += emissionWeight;
|
|
207
|
+
emissionSum += emissionWeight * decodedEmission;
|
|
208
|
+
|
|
209
|
+
float occlusionKernelScale = centerOcclusionWeight > ${u.H.float(.03)}
|
|
210
|
+
? ${u.H.float(.08)}
|
|
211
|
+
: ${u.H.float(1.5)};
|
|
212
|
+
float occlusionWeight = exp(-sampleOffset * sampleOffset * occlusionKernelScale - depthDelta * depthDelta * depthSharpness);
|
|
213
|
+
occlusionWeight *= normalWeight;
|
|
214
|
+
occlusionWeightSum += occlusionWeight;
|
|
215
|
+
occlusionSum += occlusionWeight * globalIllumination.a;
|
|
216
|
+
}
|
|
217
|
+
`),t.main.add(u.H`
|
|
218
|
+
vec3 emissionSum = vec3(0.0);
|
|
219
|
+
float emissionWeightSum = 0.0;
|
|
220
|
+
|
|
221
|
+
float centerDepth = linearDepthFromTexture(depthMap, uv);
|
|
222
|
+
vec3 centerNormal = texture(normalMap, uv).rgb;
|
|
223
|
+
float occlusionSum = 0.0;
|
|
224
|
+
float occlusionWeightSum = 0.0;
|
|
225
|
+
float centerOcclusionWeight = texture(tex, uv).b;
|
|
226
|
+
|
|
227
|
+
float depthSharpness = ${u.H.float(-.05)} * projScale / centerDepth;
|
|
228
|
+
for (int sampleOffset = -${u.H.int(4)}; sampleOffset <= ${u.H.int(4)}; ++sampleOffset) {
|
|
229
|
+
float sampleOffsetFloat = float(sampleOffset);
|
|
230
|
+
vec2 sampleUv = uv + sampleOffsetFloat * blurSize;
|
|
231
|
+
accumulateBlurSample(
|
|
232
|
+
sampleUv,
|
|
233
|
+
sampleOffsetFloat,
|
|
234
|
+
centerDepth,
|
|
235
|
+
centerNormal,
|
|
236
|
+
depthSharpness,
|
|
237
|
+
emissionWeightSum,
|
|
238
|
+
emissionSum,
|
|
239
|
+
occlusionWeightSum,
|
|
240
|
+
occlusionSum,
|
|
241
|
+
centerOcclusionWeight
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
vec3 blurredEmission = (emissionSum / emissionWeightSum).rgb;
|
|
246
|
+
vec2 encodedEmission = encodeRGBtoVec2(blurredEmission.rgb);
|
|
247
|
+
float occlusion = occlusionSum / occlusionWeightSum;
|
|
248
|
+
fragColor = vec4(vec3(encodedEmission.x, encodedEmission.y, centerOcclusionWeight), occlusion);
|
|
249
|
+
`),e}const g=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:p,build:v},Symbol.toStringTag,{value:"Module"}))},57323(e,t,r){r.d(t,{R:()=>D,b:()=>N});var o=r(32680),n=r(49255),a=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),m=r(53466),h=r(92700),f=r(35640),p=r(40261),v=r(71651),g=r(9312),x=r(98619),b=r(22393),w=r(59469),y=r(32482),M=r(43259),T=r(58614),S=r(27950),C=r(77949),_=r(33079),z=r(71988),I=r(20304),P=r(31821),O=r(63761),F=r(27832),H=r(43616),E=r(26934),R=r(73541),j=r(14113);function N(e){const t=new j.N5,{attributes:r,vertex:N,fragment:D,varyings:A}=t,{output:B,offsetBackfaces:V,pbrMode:L,snowCover:G,spherical:W}=e,k=1===L||2===L;if((0,C.NB)(N,e),r.add("position","vec3"),N.inputs.add("position",()=>"position"),A.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(f.Ge,e),!(0,n._o)(B))return t.include(p.E,e),t;(0,C.yu)(t.vertex,e),t.include(u.Y,e),t.include(i.d),V&&t.include(o.M),A.add("vNormalWorld","vec3"),A.add("localvpos","vec3",{invariant:!0}),t.include(m.U,e),t.include(d.K,e),t.include(s.v,e),t.include(h.c,e),N.include(c.WD),N.include(c.oF),N.uniforms.add(new z.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),A.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?y.QH:y.LA,e),N.include(E.Q),N.main.add(P.H`
|
|
250
|
+
forwardVertexColor();
|
|
251
|
+
|
|
252
|
+
MaskedColor maskedColorExt =
|
|
253
|
+
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
254
|
+
|
|
255
|
+
vcolorExt = maskedColorExt.color;
|
|
256
|
+
forwardColorMixMode(maskedColorExt.mask);
|
|
257
|
+
|
|
258
|
+
bool alphaCut = opacityMixMode != ${P.H.int(H.Um.ignore)} && vcolorExt.a < alphaCutoff;
|
|
259
|
+
vpos = getVertexInLocalOriginSpace();
|
|
260
|
+
|
|
261
|
+
localvpos = vpos - view[3].xyz;
|
|
262
|
+
vpos = subtractOrigin(vpos);
|
|
263
|
+
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
264
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
265
|
+
vec4 basePosition = transformPosition(proj, view, vpos);
|
|
266
|
+
|
|
267
|
+
forwardTextureCoordinates();
|
|
268
|
+
forwardLinearDepthToReadShadowMap();
|
|
269
|
+
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
270
|
+
${(0,P.If)(V,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
271
|
+
`);const{hasColorTexture:U,hasColorTextureTransform:q}=e;return D.include(g.kA,e),D.include(v.n,e),t.include(T.S,e),D.include(a.HQ,e),t.include(R.D,e),(0,C.yu)(D,e),(0,x.Gc)(D),(0,g.a8)(D),(0,g.eU)(D),D.uniforms.add(N.uniforms.get("localOrigin"),N.uniforms.get("view"),new _.t("ambient",e=>e.ambient),new _.t("diffuse",e=>e.diffuse),new I.m("opacity",e=>e.opacity),new I.m("layerOpacity",e=>e.layerOpacity)),U&&D.uniforms.add(new O.N("tex",e=>e.texture)),t.include(w._,e),D.include(b.c,e),D.include(S.N),D.include(F.b,e),(0,x.O4)(D),D.main.add(P.H`
|
|
272
|
+
discardBySlice(vpos);
|
|
273
|
+
vec4 texColor = ${U?`texture(tex, ${q?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
274
|
+
${(0,P.If)(U,`${(0,P.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
275
|
+
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
276
|
+
applyPBRFactors();
|
|
277
|
+
float ssao = evaluateAmbientOcclusionInverse();
|
|
278
|
+
ssao *= getBakedOcclusion();
|
|
279
|
+
|
|
280
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
|
|
281
|
+
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
282
|
+
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
283
|
+
vec3 matColor = max(ambient, diffuse);
|
|
284
|
+
${e.hasVertexColors?P.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
285
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:P.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
286
|
+
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, opacityMixMode);`}
|
|
287
|
+
|
|
288
|
+
vec3 shadingNormal = normalize(vNormalWorld);
|
|
289
|
+
vec3 groundNormal = ${W?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
290
|
+
|
|
291
|
+
${(0,P.If)(G,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
292
|
+
|
|
293
|
+
${P.H`albedo *= 1.2;
|
|
294
|
+
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
295
|
+
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
296
|
+
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
297
|
+
float treeRadialFalloff = vColor.r;
|
|
298
|
+
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
299
|
+
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
300
|
+
|
|
301
|
+
${k?P.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
302
|
+
${(0,P.If)(G,"mrr = applySnowToMRR(mrr, snow);")}
|
|
303
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:P.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
304
|
+
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
305
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,P.If)(G,", 1.0")});`),t}const D=Object.freeze(Object.defineProperty({__proto__:null,build:N},Symbol.toStringTag,{value:"Module"}))},15581(e,t,r){r.d(t,{S:()=>b,b:()=>v,g:()=>g});var o=r(37585),n=r(48163),a=r(82048),i=r(52540),s=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),m=r(20304),h=r(31821),f=r(63761),p=r(14113);function v(){const e=new p.N5,t=e.fragment;return e.include(a.c),e.include(l.Ir),t.include(i.E),t.include(s.C),t.uniforms.add(new d.U("radius",e=>g(e.camera))).code.add(h.H`vec3 sphere[16] = vec3[16](
|
|
306
|
+
vec3(0.186937, 0.0, 0.0),
|
|
307
|
+
vec3(0.700542, 0.0, 0.0),
|
|
308
|
+
vec3(-0.864858, -0.481795, -0.111713),
|
|
309
|
+
vec3(-0.624773, 0.102853, -0.730153),
|
|
310
|
+
vec3(-0.387172, 0.260319, 0.007229),
|
|
311
|
+
vec3(-0.222367, -0.642631, -0.707697),
|
|
312
|
+
vec3(-0.01336, -0.014956, 0.169662),
|
|
313
|
+
vec3(0.122575, 0.1544, -0.456944),
|
|
314
|
+
vec3(-0.177141, 0.85997, -0.42346),
|
|
315
|
+
vec3(-0.131631, 0.814545, 0.524355),
|
|
316
|
+
vec3(-0.779469, 0.007991, 0.624833),
|
|
317
|
+
vec3(0.308092, 0.209288,0.35969),
|
|
318
|
+
vec3(0.359331, -0.184533, -0.377458),
|
|
319
|
+
vec3(0.192633, -0.482999, -0.065284),
|
|
320
|
+
vec3(0.233538, 0.293706, -0.055139),
|
|
321
|
+
vec3(0.417709, -0.386701, 0.442449)
|
|
322
|
+
);
|
|
323
|
+
float fallOffFunction(float vv, float vn, float bias) {
|
|
324
|
+
float f = max(radius * radius - vv, 0.0);
|
|
325
|
+
return f * f * f * max(vn - bias, 0.0);
|
|
326
|
+
}`),t.code.add(h.H`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) {
|
|
327
|
+
vec3 v = Q - C;
|
|
328
|
+
float vv = dot(v, v);
|
|
329
|
+
float vn = dot(normalize(v), n_C);
|
|
330
|
+
return fallOffFunction(vv, vn, 0.1);
|
|
331
|
+
}`),e.outputs.add("fragOcclusion","float"),t.uniforms.add(new f.N("normalMap",e=>e.normalTexture),new f.N("depthMap",e=>e.depthTexture),new m.m("projScale",e=>e.projScale),new f.N("rnm",e=>e.noiseTexture),new u.G("rnmScale",(e,t)=>(0,o.hZ)(x,t.camera.fullWidth/e.noiseTexture.descriptor.width,t.camera.fullHeight/e.noiseTexture.descriptor.height)),new m.m("intensity",e=>e.intensity),new c.E("screenSize",e=>(0,o.hZ)(x,e.camera.fullWidth,e.camera.fullHeight))).main.add(h.H`
|
|
332
|
+
float depth = depthFromTexture(depthMap, uv);
|
|
333
|
+
|
|
334
|
+
// Early out if depth is out of range, such as in the sky
|
|
335
|
+
if (depth >= 1.0 || depth <= 0.0) {
|
|
336
|
+
fragOcclusion = 1.0;
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// get the normal of current fragment
|
|
341
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
342
|
+
vec4 norm4 = texelFetch(normalMap, iuv, 0);
|
|
343
|
+
if(norm4.a != 1.0) {
|
|
344
|
+
fragOcclusion = 1.0;
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
vec3 norm = normalize(norm4.xyz * 2.0 - 1.0);
|
|
348
|
+
|
|
349
|
+
float currentPixelDepth = linearizeDepth(depth);
|
|
350
|
+
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
351
|
+
|
|
352
|
+
float sum = 0.0;
|
|
353
|
+
vec3 tapPixelPos;
|
|
354
|
+
|
|
355
|
+
vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0);
|
|
356
|
+
|
|
357
|
+
// note: the factor 2.0 should not be necessary, but makes ssao much nicer.
|
|
358
|
+
// bug or deviation from CE somewhere else?
|
|
359
|
+
float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y);
|
|
360
|
+
|
|
361
|
+
for(int i = 0; i < ${h.H.int(16)}; ++i) {
|
|
362
|
+
vec2 unitOffset = reflect(sphere[i], fres).xy;
|
|
363
|
+
vec2 offset = vec2(-unitOffset * radius * ps);
|
|
364
|
+
|
|
365
|
+
// don't use current or very nearby samples
|
|
366
|
+
if( abs(offset.x) < 2.0 || abs(offset.y) < 2.0){
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
vec2 tc = vec2(gl_FragCoord.xy + offset);
|
|
371
|
+
if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenSize.x || tc.y > screenSize.y) continue;
|
|
372
|
+
vec2 tcTap = tc / screenSize;
|
|
373
|
+
float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap);
|
|
374
|
+
|
|
375
|
+
tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
|
|
376
|
+
|
|
377
|
+
sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// output the result
|
|
381
|
+
float A = max(1.0 - sum * intensity / float(${h.H.int(16)}), 0.0);
|
|
382
|
+
|
|
383
|
+
// Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
|
|
384
|
+
A = (pow(A, 0.2) + 1.2 * pow(A, 4.0)) * INV_GAMMA;
|
|
385
|
+
|
|
386
|
+
fragOcclusion = A;
|
|
387
|
+
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const x=(0,n.vt)(),b=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},95774(e,t,r){r.d(t,{S:()=>m,b:()=>d});var o=r(82048),n=r(52540),a=r(68259),i=r(20304),s=r(31821),l=r(15976),c=r(63761),u=r(14113);function d(){const e=new u.N5,t=e.fragment;return e.include(o.c),t.include(n.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new a.t("blurSize",e=>e.blurSize),new i.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(s.H`
|
|
388
|
+
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
389
|
+
float c = texture(tex, uv).r;
|
|
390
|
+
float d = linearDepthFromTexture(depthMap, uv);
|
|
391
|
+
|
|
392
|
+
float ddiff = d - center_d;
|
|
393
|
+
|
|
394
|
+
float w = exp(-r * r * ${s.H.float(.08)} - ddiff * ddiff * sharpness);
|
|
395
|
+
wTotal += w;
|
|
396
|
+
bTotal += w * c;
|
|
397
|
+
}
|
|
398
|
+
`),e.outputs.add("fragBlur","float"),t.main.add(s.H`
|
|
399
|
+
float b = 0.0;
|
|
400
|
+
float w_total = 0.0;
|
|
401
|
+
|
|
402
|
+
float center_d = linearDepthFromTexture(depthMap, uv);
|
|
403
|
+
|
|
404
|
+
float sharpness = -0.05 * projScale / center_d;
|
|
405
|
+
for (int r = -${s.H.int(4)}; r <= ${s.H.int(4)}; ++r) {
|
|
406
|
+
float rf = float(r);
|
|
407
|
+
vec2 uvOffset = uv + rf * blurSize;
|
|
408
|
+
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
409
|
+
}
|
|
410
|
+
fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>a,f:()=>i,n:()=>n});var o=r(34275);function n(e,t){a(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r=2,n=r){const a=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<a;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=n;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<a;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=n;else for(let o=0;o<a;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=n}function i(e,t,r,o){const n=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)n[s]=t,n[s+1]=r,s+=a}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:a,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>m,b:()=>l,c:()=>s,d:()=>a,e:()=>h,f:()=>d,l:()=>u,n:()=>f,t:()=>i});var o=r(40876),n=(r(44208),r(72727));function a(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[4],h=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],w=r[14];let y=0,M=0;for(let r=0;r<l;r++){const r=t[y],n=t[y+1],i=t[y+2];e[M]=c*r+m*n+p*i+x,e[M+1]=u*r+h*n+v*i+b,e[M+2]=d*r+f*n+g*i+w,y+=a,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[3],h=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],n=t[x+1],i=t[x+2];e[b]=c*r+m*n+p*i,e[b+1]=u*r+h*n+v*i,e[b+2]=d*r+f*n+g*i,x+=a,b+=o}}function c(e,t,r,o=3,n=o){const a=Math.min(e.length/o,t.length/n);let i=0,s=0;for(let l=0;l<a;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=n,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,n,a=3,i=a){const s=Math.min(e.length/a,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=n*(r*t[l])**u,e[c+1]=n*(r*t[l+1])**u,e[c+2]=n*(r*t[l+2])**u,l+=i,c+=a}function m(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s);let c=0,u=0;for(let n=0;n<l;n++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=a,u+=o;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const n=Math.min(e.length/r,t.length/o);let a=0,i=0;for(let s=0;s<n;s++){const n=t[a],s=t[a+1],l=t[a+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*n,e[i+1]=t*s,e[i+2]=t*l}a+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:h,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)n[c]=i[l]>>r,n[c+1]=i[l+1]>>r,n[c+2]=i[l+2]>>r,l+=s,c+=a},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:a,translate:m},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>l,uC:()=>s});var o=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,o,n=0,a=!1){return(o-=n)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),a&&o===r&&(o=t),o+n}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},46140(e,t,r){r.d(t,{A:()=>n});var o=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,a]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!a?.match||!i.test(a))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(a,10);return new n(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>o});const a=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,a,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>n,vt:()=>o,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return o()}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>o});const c=a(),u=i(),d=s(),m=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:m,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:n,ones:i,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function n(e){return[e[0],e[1]]}function a(e,t){return[e,t]}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>c,fA:()=>a,o8:()=>n,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:n,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function n(e,t,r,o){return[e,t,r,o]}function a(e,t,r,o){return[e,t,r,o]}function i(){return n(1,1,1,1)}function s(){return n(1,0,0,0)}function l(){return n(0,1,0,0)}function c(){return n(0,0,1,0)}function u(){return n(0,0,0,1)}r.d(t,{CN:()=>a,Un:()=>m,fA:()=>n,uY:()=>d,vt:()=>o});const d=[0,0,0,0],m=i(),h=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_W:v,UNIT_X:h,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:a,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>n,Cc:()=>w,LI:()=>m,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>y,aI:()=>T,hG:()=>p,hZ:()=>a,hs:()=>h,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,r,o,n){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function m(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+o*o+n*n+a*a)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+o*o+n*n+a*a}function v(e){const t=e[0],r=e[1],o=e[2],n=e[3];return Math.sqrt(t*t+r*r+o*o+n*n)}function g(e){const t=e[0],r=e[1],o=e[2],n=e[3];return t*t+r*r+o*o+n*n}function x(e,t){const r=t[0],o=t[1],n=t[2],a=t[3];let i=r*r+o*o+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=n*i,e[3]=a*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,o){const n=t[0],a=t[1],i=t[2],s=t[3];return e[0]=n+o*(r[0]-n),e[1]=a+o*(r[1]-a),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function y(e,t,r){const o=t[0],n=t[1],a=t[2],i=t[3];return e[0]=r[0]*o+r[4]*n+r[8]*a+r[12]*i,e[1]=r[1]*o+r[5]*n+r[9]*a+r[13]*i,e[2]=r[2]*o+r[6]*n+r[10]*a+r[14]*i,e[3]=r[3]*o+r[7]*n+r[11]*a+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function T(e,t){const r=e[0],n=e[1],a=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-l)<=d*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(a-c)<=d*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const S=s,C=l,_=c,z=f,I=p,P=v,O=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:z,distance:f,div:_,divide:c,dot:b,equals:T,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:v,lerp:w,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let n,a,i,s,l,c;do{n=2*r()-1,a=2*r()-1,l=n*n+a*a}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*n,e[1]=t*a,e[2]=t*i*u,e[3]=t*s*u,e},round:m,scale:h,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:a,sqrDist:I,sqrLen:O,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:s,transformMat4:y,transformQuat:function(e,t,r){const o=t[0],n=t[1],a=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*a-l*n,d=c*n+l*o-i*a,m=c*a+i*n-s*o,h=-i*o-s*n-l*a;return e[0]=u*c+h*-i+d*-l-m*-s,e[1]=d*c+h*-s+m*-i-u*-l,e[2]=m*c+h*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>n,Ul:()=>h,i5:()=>m,lM:()=>a,qK:()=>u});var o=r(34275);const n=16;function a(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,m=145,h=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),n=r(91218),a=r(9762);function i(e,t,r,o){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,a.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,n.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),n=r(16930),a=r(9762),i=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,o.canProjectWithoutEngine)(t,n)?(0,a.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},17136(e,t,r){r.d(t,{Y_:()=>I,O7:()=>_,el:()=>C});var o=r(92602),n=r(69052),a=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),m=r(28735),h=r(11254),f=r(60408),p=r(65864),v=r(2272),g=r(84952),x=r(92300);const b=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function M(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(e),new a.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const n=e[o][0],a=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-n)*(i-n)+(s-a)*(s-a)),c=(s-a)/l,u=(i-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+n,s=c*o+a;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+n,i=c*e+a;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function S(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const n=t.cutIndexes[o],a=t.geometries[o],i=(0,u.r8)(a);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=a.getPoint(e,r);a.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(n===r){if(w(e))for(const t of(0,u.r8)(a))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,u.r8)(a))e[n]=e[n].addPath(t)}else r=n,e[n]=a}return e}async function C(e,t,r){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let a,i,c,w,y,_,z,I,P=0;const O=[],F=[];for(const t of e)if(null!=t)if(a||(a=t.spatialReference,i=(0,d.Vp)(a),c=a.isWebMercator,_=c?102100:4326,w=u.j7[_].maxX,y=u.j7[_].minX,z=u.j7[_].plus180Line,I=u.j7[_].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(T(t.clone(),w,y));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,w,y)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,y)*(2*w);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:a}=e;n=Number(n.toFixed(9)),a=Number(a.toFixed(9)),e.intersects(z)&&a!==w?(P=a>P?a:P,o=M(o,c),O.push(o),F.push("cut")):e.intersects(I)&&n!==y?(P=a*(2*w)>P?a*(2*w):P,o=M(o,c,360),O.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let H=(0,u.kd)(P,w),E=-90;const R=H,j=new l.A;for(;H>0;){const e=360*H-180;j.addPath([[e,E],[e,-1*E]]),E*=-1,H--}if(O.length>0&&R>0){const t=S(O,await async function(e,t,r,o){const n=(0,v.Dl)(e),a=t[0].spatialReference,i={...o,responseType:"json",query:{...n.query,f:"json",sr:(0,d.YX)(a),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,h.A)(n.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=a,t})}}(n,O,j,r)),o=[],a=[];for(let r=0;r<F.length;r++){const n=F[r];if("cut"!==n)a.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(o.push(n),a.push("simplify")):a.push(c?(0,m.Gh)(n):n)}}if(!o.length)return a;const i=await async function(e,t,r){const o="string"==typeof e?(0,g.An)(e):e,n=t[0].spatialReference,a=(0,f.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(n),geometries:JSON.stringify((0,x.X)(t))}},{data:s}=await(0,h.A)(o.path+"/simplify",i);return(0,x.V)(s.geometries,a,n)}(n,o,r),s=[];for(let e=0;e<a.length;e++){const t=a[e];"simplify"!==t?s.push(t):s.push(c?(0,m.Gh)(i.shift()):i.shift())}return s}const N=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)N.push(t);else{const e=O.shift();N.push(!0===c?(0,m.Gh)(e):e)}}return N}function _(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[n,a]=o.valid,i=2*a;let s=0,l=0;t>a?s=Math.ceil(Math.abs(t-a)/i):t<n&&(s=-Math.ceil(Math.abs(t-n)/i)),e>a?l=Math.ceil(Math.abs(e-a)/i):e<n&&(l=-Math.ceil(Math.abs(e-n)/i));let c=e+(s-l)*i;const u=c-t;return u>a?c-=i:u<n&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new n.hr(r,o)}const I=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>i,kS:()=>l,kd:()=>s,r8:()=>c});var o=r(82799),n=r(16930),a=r(60408);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function s(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=c(e);for(const e of r)for(const r of e)r[0]+=t;return e}function c(e){return(0,a.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>w,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>y,vE:()=>M,vt:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e=T){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,n=i()){return n[0]=e,n[1]=t,n[2]=r,n[3]=o,n}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const n=r[0]-t[0],a=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=a*u-s*c,m=s*l-n*u,h=n*c-a*l,f=d*d+m*m+h*h,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=m*p,o[2]=h*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,a=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(h,o);let s=a,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,n.t2)(h,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,n.Re)(v,h,f),(0,n.S8)(v,v),(0,n.Re)(g,f,p),(0,n.S8)(g,g),l=!(0,n.t2)(h,p)&&!(0,n.t2)(f,p)&&Math.abs((0,n.Om)(v,g))<m;return l?(u(h,f,p,e),!0):(0!==o||1!==a||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const m=.99619469809,h=(0,a.vt)(),f=(0,a.vt)(),p=(0,a.vt)(),v=(0,a.vt)(),g=(0,a.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(M(e,t.origin,t.vector,0,r))}function b(e,t){return y(e,t)>=0}function w(e,t){const r=(0,n.Om)(e,t.ray.direction),o=-y(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const a=o/r;return r>0?a<t.c1&&(t.c1=a):a>t.c0&&(t.c0=a),t.c0<=t.c1}function y(e,t){return(0,n.Om)(e,t)+e[3]}function M(e,t,r,a,i){const s=(0,n.Om)(e,r),l=y(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&a&&(c=(0,o.qE)(c,0,1)),!(4&a)&&c<0||!(8&a)&&c>1?l>=0?2:3:((0,n.WQ)(i,t,(0,n.hs)(i,r,c)),l>=0?0:1)}const T=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e,t){return(0,n.Om)(e,t)/(0,n.Bw)(e)}function s(e,t){const r=(0,n.Om)(e,t)/((0,n.Bw)(e)*(0,n.Bw)(t));return-(0,o.XM)(r)}(0,a.vt)(),(0,a.vt)()},32114(e,t,r){r.d(t,{Rc:()=>h,J8:()=>f,rq:()=>d,Km:()=>m}),r(44208);var o=r(26390),n=r(29242),a=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(n.vt)}static createMat4f64(){return new u(a.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),m=u.createVec4f64(),h=(u.createMat3f64(),u.createMat4f64()),f=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>n});var o=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>a});var o=r(60408),n=r(65864);function a(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,n.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),n=r(60999),a=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,n.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new a.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),n=r(97146),a=r(63907);function i(e,t){switch(t){case a.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case a.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(o[t++]=e[n],o[t++]=e[n+1],o[t++]=e[n+2]):(o[t++]=e[n+1],o[t++]=e[n],o[t++]=e[n+2])}return o}(e);case a.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const n=e[0];let a=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=n,o[i++]=a,o[i++]=r,a=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>n,pn:()=>s,x3:()=>a});var o=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function a(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let a=URL.createObjectURL(r);switch(t){case"image/jpeg":a+="#.jpg";break;case"image/png":a+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(i)},o=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(a),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=a});try{i.src=a,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),i}},5644(e,t,r){r.d(t,{fetch:()=>wt});var o=r(40876),n=r(61473),a=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),m=r(51850),h=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),w=r(21015),y=r(84498),M=r(51530),T=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:T.Un,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),a=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,a,l),(0,i.lw)(c,n,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class _{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var z=r(11254),I=r(60999),P=r(49186),O=r(53966),F=r(69397);class H{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new H;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var E=r(17676),R=r(46140),j=r(97146),N=r(31217),D=r(46610),A=r(63500),B=r(18845),V=r(49255),L=r(97768),G=r(92130),W=r(65786);class k extends G.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,L.Gz)(this._texture),this._textureNormal=(0,L.Gz)(this._textureNormal),this._textureEmissive=(0,L.Gz)(this._textureEmissive),this._textureOcclusion=(0,L.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,L.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new q(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,L.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,E.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,L.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends W.Y{constructor(e=null){super(),this.textureEmissive=e}}class q extends U{constructor(e,t,r,o,n,a,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=n,this.scale=a,this.normalTextureTransformMatrix=i}}var Z=r(11725),$=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,h.vt)();function K(e,t,r,o,n,a){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,$.vA)(0===e.type),Q(e.boundingInfo,r,i,s,n,l,a);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,n,a,i,s,l,c){const u=t,m=de,h=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=h>=f?h>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,w=(v+(3-x))%3,y=u[b]/u[g],M=u[w]/u[g],T=1/u[g],S=te,C=re,_=oe,{normalRequired:z}=l;for(let t=r;t<o;++t){const r=3*t,o=i*n[r];(0,d.hZ)(m[0],a[o+0],a[o+1],a[o+2]);const l=i*n[r+1];(0,d.hZ)(m[1],a[l+0],a[l+1],a[l+2]);const u=i*n[r+2];(0,d.hZ)(m[2],a[u+0],a[u+1],a[u+2]),s&&((0,d.C)(m[0],s.applyToVertex(m[0][0],m[0][1],m[0][2],t)),(0,d.C)(m[1],s.applyToVertex(m[1][0],m[1][1],m[1][2],t)),(0,d.C)(m[2],s.applyToVertex(m[2][0],m[2][1],m[2][2],t))),(0,d.jb)(S,m[0],e),(0,d.jb)(C,m[1],e),(0,d.jb)(_,m[2],e);const h=S[b]-y*S[g],f=S[w]-M*S[g],p=C[b]-y*C[g],v=C[w]-M*C[g],x=_[b]-y*_[g],I=_[w]-M*_[g],P=x*v-I*p,O=h*I-f*x,F=p*f-v*h;if((P<0||O<0||F<0)&&(P>0||O>0||F>0))continue;const H=P+O+F;if(0===H)continue;const E=P*(T*S[g])+O*(T*C[g])+F*(T*_[g]);if(E*Math.sign(H)<0)continue;const R=E/H;R>=0&&c(R,z?ae(m):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,n,l,a)}}const X=(0,m.vt)();function Q(e,t,r,o,n,a,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,X);if((0,h.Ne)(J,e.bbMin),(0,h.vI)(J,e.bbMax),null!=n&&n.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const n=(e[0]-o-t[0])*r[0],a=(e[3]+o-t[0])*r[0];let i=Math.min(n,a),s=Math.max(n,a);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,n,a,i);return}}!function(e,t,r,o,n,a,i,s,l,c,u){const d=e[0],m=e[1],h=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*n[r];let c=a[o],x=a[o+1],b=a[o+2];const w=i*n[r+1];let y=a[w],M=a[w+1],T=a[w+2];const S=i*n[r+2];let C=a[S],_=a[S+1],z=a[S+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[y,M,T]=l.applyToVertex(y,M,T,e),[C,_,z]=l.applyToVertex(C,_,z,e));const I=y-c,P=M-x,O=T-b,F=C-c,H=_-x,E=z-b,R=p*E-H*v,j=v*F-E*f,N=f*H-F*p,D=I*R+P*j+O*N;if(Math.abs(D)<=ce)continue;const A=d-c,B=m-x,V=h-b,L=A*R+B*j+V*N;if(D>0){if(L<0||L>D)continue}else if(L>0||L<D)continue;const G=B*O-P*V,W=V*I-O*A,k=A*P-I*B,U=f*G+p*W+v*k;if(D>0){if(U<0||L+U>D)continue}else if(U>0||L+U<D)continue;const q=(F*G+H*W+E*k)/D;q>=0&&u(q,g?ne(I,P,O,F,H,E,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,n,a,i)}}const ee=(0,m.vt)();const te=(0,m.vt)(),re=(0,m.vt)(),oe=(0,m.vt)();function ne(e,t,r,o,n,a,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,n,a),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ae(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,m.vt)(),se=(0,m.vt)(),le=1e3,ce=1e-7,ue=(0,m.vt)(),de=[(0,m.vt)(),(0,m.vt)(),(0,m.vt)()];var me=r(16396),he=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,n,a){return(0,he.vJ)(r,o,this.layout,e,t,n,a)}}var pe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),we=r(4431),ye=r(1843),Me=r(72824),Te=r(13840),Se=r(98958),Ce=r(16943),_e=r(33524),ze=r(56133),Ie=r(4576);r(66289);var Pe=r(69622),Oe=r(65529),Fe=r(32728);class He{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let Ee=class extends Pe.A{constructor(e,t){super(e),this.events=new Oe.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return je(Re.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ve,this._buffer=this._layout.createBuffer(this._capacity),this._view=new He(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,$.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,$.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ne,o=De;t.localTransform.getMat(e,Ae),t.globalTransform.getMat(e,Be);const n=(0,l.lw)(Be,Be,Ae);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,n),t.model.setMat(e,o);const a=(0,Fe.wp)(Ne,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,De),r.modelOrigin.getVec(e,Ne),t[0]=De[0],t[1]=De[1],t[2]=De[2],t[3]=0,t[4]=De[3],t[5]=De[4],t[6]=De[5],t[7]=0,t[8]=De[6],t[9]=De[7],t[10]=De[8],t[11]=0,t[12]=Ne[0],t[13]=Ne[1],t[14]=Ne[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ne,this,e),t*=Math.max(Ne[0],Ne[1],Ne[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ne,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ne[0],Ne[1],Ne[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ve,Math.floor(this._capacity*Ie.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new He(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],Ee.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],Ee.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],Ee.prototype,"size",null),Ee=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ee);const Re=(0,ye.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function je(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const Ne=(0,m.vt)(),De=(0,s.vt)(),Ae=(0,c.vt)(),Be=(0,c.vt)(),Ve=64,Le=(0,ye.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Ge=r(74810),We=r(28491),ke=r(90644),Ue=r(49788);class qe extends Me.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Ge.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=m.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,m.CN)(.2,.2,.2),this.diffuse=(0,m.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,m.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Ue.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Me.gy;let Ze=class extends Se.w{constructor(e,t){let o=(0,we.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,we.U)(function(e){return je(Le.clone(),e)}(t)))),super(e,t,o),this.shader=new Te.r(We.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,_e.Yf)(r):null,culling:Ye(e)?(0,ke.Xt)(n):null,depthTest:(0,_e.mt)(r,$e(a)),depthWrite:(0,_e.z5)(e),colorWrite:ke.kn,stencilWrite:i?ze.v0:null,stencilTest:i?t?ze.a9:ze.qh:null,polygonOffset:(0,pe.sG)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function $e(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,ye.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ce.E)()&&t.vec4u8("olidColor"),t}Ze=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Ze);var Ke=r(51976),Xe=r(47724);class Qe extends Xe.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge.Cg)([(0,Ke.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Ke.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends Ze{constructor(){super(...arguments),this.shader=new Te.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Ke.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Ke.W)()],rt.prototype,"receiveShadows",void 0);class ot extends Z.i{constructor(e,t){super(e,at),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,V.uw)(e)&&!this.transparent],[4,e=>(0,V.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,V.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,m.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:n,doubleSidedType:a}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:n&&"normal"===a?1:n&&"winding-order"===a?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,V._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&null!=e.globalIllumination):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,o,n,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,d.S8)(ct,dt);break;case 2:a=(0,d.C)(ct,lt)}const i=(0,d.Re)(mt,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(a,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(a,a,u),(0,d.ei)(ut,a,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),n=(0,d.Re)(st,n,ut)}a=(0,pe.b6)(a,this._configuration,o,n),K(e,r,o,n,(0,me.ou)(r.verticalOffset),a)}createGLMaterial(e){return new nt(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:n,texture:a,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=a||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class nt extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:Ze,e)}}class at extends qe{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const it=(0,m.vt)(),st=(0,m.vt)(),lt=(0,m.fA)(0,0,1),ct=(0,m.vt)(),ut=(0,m.vt)(),dt=(0,m.vt)(),mt=(0,m.vt)(),ht=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ft{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function pt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(ht().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(ht().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(ht().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(ht().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else ht().warn("Indexed geometries must specify faces"),o=!1;break}default:ht().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(ht().warn("Geometry requires material"),o=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(ht().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,h.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new R.A(1,2,"wosr");async function wt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,I.Ke)((0,z.A)(e,t));if(r.ok)return r.value.data;(0,E.QP)(r.error),function(e){throw new P.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const n=e[o],a=n.images[0].data;if(!a){ht().warn("Externally referenced texture data is not yet supported");continue}const i=n.encoding+";base64,"+a,s="/textureDefinitions/"+o,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,N.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),n={};for(const e of o)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];n+=t?.image?t.image.width*t.image.height*4:0}return new ft(r,o,n+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,n=new Array,a=new H,i=e.resource,s=R.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let h=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!pt(i))continue;const s=xt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,j.tM)(x);p.push([e,new D.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,w=d&&d[b];if(w&&!f.has(b)){const{image:e,parameters:t}=w,r=new B.h(e,t);o.push(r),f.set(b,r)}const y=f.get(b),M=y?y.id:void 0,T=s.material;let S=a.get(T,b);if(null==S){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=w?gt(w.alphaChannelUsage):void 0,o={ambient:(0,m.ci)(e.diffuse),diffuse:(0,m.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:w?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),S=new ot(o,t),a.set(T,b,S)}n.push(S);const C=new A.V(S,p);h+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:n,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:h,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));f=await e(new w.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:C}=function(e,t,r){const n=e.model,s=e.meta,f=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const a of n.parts){const n=a.attributes.normal;if(null==n)return;const i=a.attributes.position,s=i.count,u=(0,m.vt)(),h=(0,m.vt)(),f=(0,m.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),a.transform);let b=0,w=0;for(let l=0;l<s;l++){i.getVec(l,h),n.getVec(l,u),(0,d.Z0)(h,h,a.transform),(0,d.Re)(f,h,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),m=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[w]=m,p[w+1]=m,p[w+2]=m,p[w+3]=1,w+=4}a.attributes.normal=new v.xs(g.buffer),a.attributes.color=new v.Eq(p.buffer)}}}(e,f));const T=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:w,mrrFactors:Ge.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Ge.mb},z={...t.materialParameters,treeRendering:w},I=new Array,P=new Map,O=new Map,F=n.lods.length,H=(0,h.Ie)();return n.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new _(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,n,a,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:m,color:h,texCoord0:f,tangent:p}=t.attributes,v=t.material+(m?"_normal":"")+(h?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const n=e.textures.get(t);if(n){const e=n.data,a=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new B.h((0,M.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:a}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),m=(0,o.xV)(d.color[1]),h=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Ge.Jr)(d),w=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,m,h],ambient:[r,m,h],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=a.emissiveStrengthFromSymbol?a.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Ge.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...a},l))}const w=i.get(v);if(r.stageResources.materials.push(w),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,c,C,z,P,O,t,w),{geometry:d,vertexCount:m}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(n,s,e.transform,3,l);const c=[["position",new D.n(n,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(yt,e.transform),(0,g.b)(t,n,yt,3,s),(0,a.or)(yt)&&(0,g.n)(t,t),c.push(["normal",new D.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(yt,e.transform),(0,x.t)(t,n,yt,4,s),(0,a.or)(yt)&&(0,g.n)(t,t,4),c.push(["tangent",new D.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.texCoord0;(0,b.a)(t,n,2,a),c.push(["uv0",new D.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new D.n(t,o,4,!0)])}return{geometry:new A.V(t,c),vertexCount:r}}(e,r??new ot({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,h.iT)(H,f.bbMin),(0,h.iT)(H,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=m)}),l||I.push(c)}),{engineResources:I,referenceBoundingBox:H}}(f,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const yt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>a,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),n=r(51850);function a(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),n=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),a=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,n,a),e}function s(e,t,r){r=r||e;const n=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-n*t[0],e[1]-n*t[1],e[2]-n*t[2]),(0,o.S8)(r,r)}function l(e,t,r,a=(0,n.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const n=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(n),m=d/i*Math.sin((1-r)*n),h=d/s*Math.sin(r*n);return(0,o.hs)(c,e,m),(0,o.hs)(u,t,h),(0,o.WQ)(a,c,u)}return(0,o.Cc)(a,e,t,r)}(0,n.vt)(),(0,n.vt)(),(0,n.vt)();const c=(0,n.vt)(),u=(0,n.vt)()},46686(e,t,r){r.d(t,{o:()=>n});var o=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
411
|
+
void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
|
|
412
|
+
`)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>a}),r(46686),r(62308);var o=r(77108),n=r(31821);function a(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
413
|
+
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
414
|
+
}`)}},32680(e,t,r){r.d(t,{M:()=>n});var o=r(31821);function n(e){e.vertex.code.add(o.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
415
|
+
vec3 camToVert = posWorld - camPosWorld;
|
|
416
|
+
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
417
|
+
if (isBackface) {
|
|
418
|
+
posClip.z += 0.0000003 * posClip.w;
|
|
419
|
+
}
|
|
420
|
+
return posClip;
|
|
421
|
+
}`)}},49255(e,t,r){function o(e){return function(e){return c(e)||4===e}(e)||function(e){return 5===(t=e)||6===t||7===t||8===e||9===e;var t}(e)}function n(e){return 10===e||11===e}function a(e){return l(e)||n(e)}function i(e){return 1===e}function s(e){return 2===e}function l(e){return 0===e||function(e){return i(e)||s(e)}(e)}function c(e){return function(e){return l(e)||n(e)}(e)||u(e)}function u(e){return 3===e}r.d(t,{Ex:()=>n,Rb:()=>s,Sp:()=>i,_o:()=>l,eh:()=>u,gr:()=>c,i3:()=>a,uw:()=>o})},76597(e,t,r){r.d(t,{d:()=>a});var o=r(33120),n=r(31821);function a(e){(0,o.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
422
|
+
vec4 eye = view * vec4(pos, 1.0);
|
|
423
|
+
depth = calculateLinearDepth(nearFar,eye.z);
|
|
424
|
+
return proj * eye;
|
|
425
|
+
}`),e.vertex.code.add(n.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
|
|
426
|
+
return proj * (view * vec4(pos, 1.0));
|
|
427
|
+
}`)}},24321(e,t,r){r.d(t,{v:()=>a});var o=r(43519),n=r(31821);function a(e,t){t.instancedColor?(e.attributes.add("instanceColor","vec4"),e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.vertex.code.add(n.H`
|
|
428
|
+
MaskedColor applyInstanceColor(MaskedColor color) {
|
|
429
|
+
return multiplyMaskedColors( color, createMaskedFromUInt8NaNColor(${"instanceColor"}));
|
|
430
|
+
}
|
|
431
|
+
`)):e.vertex.code.add(n.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
432
|
+
return color;
|
|
433
|
+
}`)}},2585(e,t,r){r.d(t,{B:()=>g});var o=r(77690),n=r(29242),a=r(9093),i=r(35522),s=r(51850),l=r(26425),c=r(77949),u=r(23205),d=r(31821),m=r(35644),h=r(74333);class f extends h.n{constructor(e,t,r){super(e,"mat4",1,(o,n,a)=>o.setUniformMatrix4fv(e,t(n,a),r))}}var p=r(28449);r(65786).Y;const v=(0,n.vt)();function g(e,t){const{hasModelTransformation:r,instancedDoublePrecision:n,instanced:s,output:h,hasVertexTangents:g}=t;r&&(e.vertex.uniforms.add(new f("model",e=>e.modelTransformation??a.zK)),e.vertex.uniforms.add(new m.k("normalLocalOriginFromModel",e=>((0,o.Ge)(v,e.modelTransformation??a.zK),v)))),s&&n&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const b=e.vertex;n&&(b.include(l.u),b.uniforms.add(new u.d("viewOriginHi",e=>(0,p.Zo)((0,i.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)),new u.d("viewOriginLo",e=>(0,p.jA)((0,i.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)))),b.code.add(d.H`
|
|
434
|
+
vec3 getVertexInLocalOriginSpace() {
|
|
435
|
+
return ${r?n?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":n?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
vec3 subtractOrigin(vec3 _pos) {
|
|
439
|
+
${n?d.H`
|
|
440
|
+
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
441
|
+
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
442
|
+
return _pos - originDelta;`:"return vpos;"}
|
|
443
|
+
}
|
|
444
|
+
`),b.code.add(d.H`
|
|
445
|
+
vec3 dpNormal(vec4 _normal) {
|
|
446
|
+
return normalize(${r?n?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":n?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
447
|
+
}
|
|
448
|
+
`),4===h&&((0,c.S7)(b),b.code.add(d.H`
|
|
449
|
+
vec3 dpNormalView(vec4 _normal) {
|
|
450
|
+
return normalize((viewNormal * ${r?n?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":n?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
451
|
+
}
|
|
452
|
+
`)),g&&b.code.add(d.H`
|
|
453
|
+
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
454
|
+
${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
455
|
+
}`)}const x=(0,s.vt)()},96336(e,t,r){r.d(t,{Y:()=>n});var o=r(31821);function n(e,t){switch(e.fragment.code.add(o.H`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
456
|
+
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
457
|
+
}`),t.normalType){case 1:e.attributes.add("normalCompressed","vec2"),e.vertex.code.add(o.H`vec3 decompressNormal(vec2 normal) {
|
|
458
|
+
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
459
|
+
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
460
|
+
}
|
|
461
|
+
vec3 normalModel() {
|
|
462
|
+
return decompressNormal(normalCompressed);
|
|
463
|
+
}`);break;case 0:e.attributes.add("normal","vec3"),e.vertex.code.add(o.H`vec3 normalModel() {
|
|
464
|
+
return normal;
|
|
465
|
+
}`);break;default:t.normalType;case 2:case 3:}}},39014(e,t,r){r.d(t,{K:()=>s});var o=r(43519),n=r(31821),a=r(93588),i=r(43616);function s(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new a.c("symbolColorMixMode",e=>i.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
|
|
466
|
+
MaskedColor applySymbolColor(MaskedColor color) {
|
|
467
|
+
return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
|
|
468
|
+
}
|
|
469
|
+
`)):e.vertex.code.add(n.H`MaskedColor applySymbolColor(MaskedColor color) {
|
|
470
|
+
return color;
|
|
471
|
+
}`),e.vertex.code.add(n.H`
|
|
472
|
+
void forwardColorMixMode(bvec4 mask) {
|
|
473
|
+
colorMixMode = mask.r ? ${n.H.int(i.Um.ignore)} : symbolColorMixMode;
|
|
474
|
+
opacityMixMode = mask.a ? ${n.H.int(i.Um.ignore)} : symbolColorMixMode;
|
|
475
|
+
}
|
|
476
|
+
`)}},53466(e,t,r){r.d(t,{U:()=>n});var o=r(31821);function n(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() {
|
|
477
|
+
vuv0 = uv0;
|
|
478
|
+
vuvRegion = uvRegion;
|
|
479
|
+
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},92700(e,t,r){r.d(t,{c:()=>n});var o=r(31821);function n(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(o.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(o.H`void forwardVertexColor() {}`)}},72824(e,t,r){r.d(t,{Mh:()=>u,Zo:()=>d,gy:()=>m});var o=r(29242),n=r(91829),a=r(96336),i=r(62308),s=r(31821),l=r(98353),c=r(35644);function u(e,t){const{vertex:r,varyings:o}=e;switch(t.normalType){case 0:case 1:{e.include(a.Y,t),o.add("vNormalWorld","vec3"),o.add("vNormalView","vec3"),r.uniforms.add(new c.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal));const{vertexNormalRotationType:n}=t,i=1===n;i&&r.uniforms.add(new l.h("transformNormalGlobalFromModel",e=>e.transformNormalGlobalFromModel)),r.code.add(s.H`
|
|
480
|
+
${(0,s.If)(i,s.H`
|
|
481
|
+
mat3 normalModelTransformation() {
|
|
482
|
+
return transformNormalGlobalFromModel;
|
|
483
|
+
}
|
|
484
|
+
`)}
|
|
485
|
+
|
|
486
|
+
void forwardNormal() {
|
|
487
|
+
vNormalWorld = ${(0,s.If)(i,s.H`normalModelTransformation() * `)}normalModel();
|
|
488
|
+
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
489
|
+
}
|
|
490
|
+
`);break}case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class d extends i.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class m extends i.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,o.vt)(),this.toMapSpace=(0,n.vt)()}}},62308(e,t,r){r.d(t,{EM:()=>s,dO:()=>i});var o=r(29242),n=r(51850);(r(26425),r(40710),r(33079),r(31821),r(74333)).n,r(98353),r(35644),r(58029),r(63761);var a=r(65786);class i extends a.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,n.vt)(),this.transformWorldFromViewTL=(0,n.vt)(),this.transformViewFromCameraRelativeRS=(0,o.vt)(),this.transformationTexture=null}}class s extends a.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,o.vt)(),this.transformWorldFromModelTH=(0,n.vt)(),this.transformWorldFromModelTL=(0,n.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>i});var o=r(53466),n=r(31821);function a(e){e.fragment.code.add(n.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
|
|
491
|
+
vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
|
|
492
|
+
vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
|
|
493
|
+
float maxdUV = 0.125;
|
|
494
|
+
vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
495
|
+
vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
496
|
+
return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
497
|
+
}`)}function i(e,t){const{textureCoordinateType:r}=t;if(0===r||3===r)return;e.include(o.U,t);const i=2===r;i&&e.include(a),e.fragment.code.add(n.H`
|
|
498
|
+
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
499
|
+
return ${i?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
500
|
+
}
|
|
501
|
+
`)}},35640(e,t,r){r.d(t,{Ge:()=>c});var o=r(78955),n=r(91829),a=r(52587),i=r(77949),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new s.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:n,screenLength:a}=e.verticalOffset,i=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,o.hZ)(u,a*s,i,r,n)}))}(r),t.hasScreenSizePerspective&&(e.include(a.Y6),(0,a.OH)(r),(0,i.yu)(e.vertex,t)),r.code.add(l.H`
|
|
502
|
+
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
503
|
+
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
504
|
+
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
505
|
+
${t.hasScreenSizePerspective?l.H`
|
|
506
|
+
float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition));
|
|
507
|
+
float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:l.H`
|
|
508
|
+
float verticalOffsetScreenHeight = verticalOffset.x;`}
|
|
509
|
+
// Screen sized offset in world space, used for example for line callouts
|
|
510
|
+
float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);
|
|
511
|
+
return worldNormal * worldOffset;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
515
|
+
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
516
|
+
}
|
|
517
|
+
`)):r.code.add(l.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,n.vt)()},40261(e,t,r){r.d(t,{E:()=>g});var o=r(33120),n=r(68317),a=r(76597),i=r(96336),s=r(36782),l=r(53466),c=r(72824),u=r(31821);function d(e,t){switch(t.output){case 5:case 6:case 7:case 8:e.fragment.code.add(u.H`float _calculateFragDepth(const in float depth) {
|
|
518
|
+
const float SLOPE_SCALE = 2.0;
|
|
519
|
+
const float BIAS = 20.0 * .000015259;
|
|
520
|
+
float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
|
|
521
|
+
return depth + SLOPE_SCALE * m + BIAS;
|
|
522
|
+
}
|
|
523
|
+
void outputDepth(float _linearDepth){
|
|
524
|
+
float fragDepth = _calculateFragDepth(_linearDepth);
|
|
525
|
+
gl_FragDepth = fragDepth;
|
|
526
|
+
}`);break;case 9:e.fragment.code.add(u.H`void outputDepth(float _linearDepth){
|
|
527
|
+
gl_FragDepth = _linearDepth;
|
|
528
|
+
}`)}}var m=r(3871),h=r(43259),f=r(58614),p=r(77949),v=r(63761);function g(e,t){const{vertex:r,fragment:g,varyings:x}=e,{hasColorTexture:b,alphaDiscardMode:w}=t,y=b&&1!==w,{output:M,normalType:T,hasColorTextureTransform:S}=t;switch(M){case 3:(0,p.NB)(r,t),e.include(a.d),g.include(n.HQ,t),e.include(l.U,t),y&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
529
|
+
vpos = subtractOrigin(vpos);
|
|
530
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
531
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
532
|
+
forwardTextureCoordinates();`),e.include(f.S,t),g.main.add(u.H`
|
|
533
|
+
discardBySlice(vpos);
|
|
534
|
+
${(0,u.If)(y,u.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
535
|
+
discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:(0,p.NB)(r,t),e.include(a.d),e.include(l.U,t),e.include(h.A,t),e.include(d,t),g.include(n.HQ,t),e.include(s.g,t),(0,o.xJ)(e),x.add("depth","float",{invariant:!0}),y&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
536
|
+
vpos = subtractOrigin(vpos);
|
|
537
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
538
|
+
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
539
|
+
forwardTextureCoordinates();
|
|
540
|
+
forwardObjectAndLayerIdColor();`),e.include(f.S,t),g.main.add(u.H`
|
|
541
|
+
discardBySlice(vpos);
|
|
542
|
+
${(0,u.If)(y,u.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
543
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
544
|
+
${11===M?u.H`outputObjectAndLayerIdColor();`:u.H`outputDepth(depth);`}`);break;case 4:{(0,p.NB)(r,t),e.include(a.d),e.include(i.Y,t),e.include(c.Mh,t),e.include(l.U,t),e.include(h.A,t),y&&g.uniforms.add(new v.N("tex",e=>e.texture)),2===T&&x.add("vPositionView","vec3",{invariant:!0});const o=0===T||1===T;r.main.add(u.H`
|
|
545
|
+
vpos = getVertexInLocalOriginSpace();
|
|
546
|
+
${o?u.H`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:u.H`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
|
|
547
|
+
vpos = subtractOrigin(vpos);
|
|
548
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
549
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
550
|
+
forwardTextureCoordinates();`),g.include(n.HQ,t),e.include(f.S,t),g.main.add(u.H`
|
|
551
|
+
discardBySlice(vpos);
|
|
552
|
+
${(0,u.If)(y,u.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
553
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
554
|
+
|
|
555
|
+
${2===T?u.H`vec3 normal = screenDerivativeNormal(vPositionView);`:u.H`vec3 normal = normalize(vNormalWorld);
|
|
556
|
+
if (gl_FrontFacing == false){
|
|
557
|
+
normal = -normal;
|
|
558
|
+
}`}
|
|
559
|
+
fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case 10:(0,p.NB)(r,t),e.include(a.d),e.include(l.U,t),e.include(h.A,t),y&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
560
|
+
vpos = subtractOrigin(vpos);
|
|
561
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
562
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
563
|
+
forwardTextureCoordinates();`),g.include(n.HQ,t),e.include(f.S,t),e.include(m.Q,t),g.main.add(u.H`
|
|
564
|
+
discardBySlice(vpos);
|
|
565
|
+
${(0,u.If)(y,u.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
566
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
567
|
+
calculateOcclusionAndOutputHighlight();`)}}},22911(e,t,r){r.d(t,{NL:()=>p});var o=r(34727),n=r(49255),a=r(99208),i=r(65261),s=r(40710),l=r(33079),c=r(28421),u=r(20304),d=r(31821),m=r(15976),h=r(63761),f=r(66211);function p(e,t){if(!(0,n._o)(t.output))return;e.fragment.include(i.C);const{emissionSource:r,hasEmissiveTextureTransform:p,bindType:v,useFloatBlend:g}=t,x=3===r||4===r||5===r;x&&(e.include(a.r,t),e.fragment.uniforms.add(1===v?new h.N("texEmission",e=>e.textureEmissive):new m.o("texEmission",e=>e.textureEmissive)));const b=2===r||x;b&&e.fragment.uniforms.add(1===v?new l.t("emissiveBaseColor",e=>e.emissiveBaseColor):new s.W("emissiveBaseColor",e=>e.emissiveBaseColor));const w=0!==r;if(w&&7!==r&&6!==r&&4!==r&&5!==r){const t=e=>null!=e?g?e:(0,o.qE)(e,0,f.m):0;e.fragment.uniforms.add(1===v?new u.m("emissiveStrength",e=>t(e.emissiveStrength)):new c.J("emissiveStrength",e=>t(e.emissiveStrength)))}const y=7===r,M=5===r,T=1===r||6===r||y;e.fragment.code.add(d.H`
|
|
568
|
+
vec4 getEmissions(vec3 symbolColor) {
|
|
569
|
+
vec4 emissions = ${b?M?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":T?y?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
|
|
570
|
+
${(0,d.If)(x,`${(0,d.If)(M,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)}
|
|
571
|
+
${(0,d.If)(w,`emissions.rgb *= emissiveStrength * ${d.H.float(1)};`)}
|
|
572
|
+
return emissions;
|
|
573
|
+
}
|
|
574
|
+
`)}},52540(e,t,r){r.d(t,{E:()=>s,l:()=>l});var o=r(37585),n=r(48163),a=r(77108),i=r(31821);function s(e){e.uniforms.add(new a.E("zProjectionMap",e=>l(e.camera))),e.code.add(i.H`float linearizeDepth(float depth, vec2 zProjectionConstants) {
|
|
575
|
+
float depthNdc = depth * 2.0 - 1.0;
|
|
576
|
+
return -(zProjectionConstants[0] / (depthNdc + zProjectionConstants[1] + 1e-7));
|
|
577
|
+
}
|
|
578
|
+
float linearizeDepth(float depth) {
|
|
579
|
+
return linearizeDepth(depth, zProjectionMap);
|
|
580
|
+
}`),e.code.add(i.H`float delinearizeDepth(float linearDepth) {
|
|
581
|
+
float c1 = zProjectionMap[0];
|
|
582
|
+
float c2 = zProjectionMap[1];
|
|
583
|
+
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
584
|
+
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
585
|
+
return depthNonlinear01;
|
|
586
|
+
}`),e.code.add(i.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
587
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
588
|
+
return texelFetch(depthTexture, iuv, 0).r;
|
|
589
|
+
}`),e.code.add(i.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
590
|
+
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
591
|
+
}`)}function l(e){const t=e.projectionMatrix;return(0,o.hZ)(c,t[14],t[10])}const c=(0,n.vt)()},92573(e,t,r){r.d(t,{V:()=>i});var o=r(52540),n=r(77108),a=r(31821);function i(e){e.include(o.E),e.uniforms.add(new n.E("zProjectionMapLastFrame",e=>(0,o.l)(e.reprojection.lastFrameCamera))),e.code.add(a.H`float linearDepthFromTextureLastFrame(sampler2D depthTexture, vec2 uv) {
|
|
592
|
+
return linearizeDepth(depthFromTexture(depthTexture, uv), zProjectionMapLastFrame);
|
|
593
|
+
}`)}},77695(e,t,r){r.d(t,{J:()=>m});var o=r(29242),n=r(48163),a=r(99208),i=r(68259),s=r(47286),l=r(31821),c=r(35644),u=r(15976),d=r(63761);function m(e,t){return function(e,t){const r=e.fragment,{hasVertexTangents:m,doubleSidedMode:h,hasNormalTexture:f,textureCoordinateType:p,bindType:v,hasNormalTextureTransform:g}=t;m?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===h?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
594
|
+
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
595
|
+
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
596
|
+
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
597
|
+
return mat3(tangent, bitangent, normal);
|
|
598
|
+
}`):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
599
|
+
float tangentHeadedness = vTangent.w;
|
|
600
|
+
vec3 tangent = normalize(vTangent.xyz);
|
|
601
|
+
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
602
|
+
return mat3(tangent, bitangent, normal);
|
|
603
|
+
}`)):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
|
|
604
|
+
vec3 Q1 = dFdx(pos);
|
|
605
|
+
vec3 Q2 = dFdy(pos);
|
|
606
|
+
vec2 stx = dFdx(st);
|
|
607
|
+
vec2 sty = dFdy(st);
|
|
608
|
+
float det = stx.t * sty.s - sty.t * stx.s;
|
|
609
|
+
vec3 T = stx.t * Q2 - sty.t * Q1;
|
|
610
|
+
T = T - normal * dot(normal, T);
|
|
611
|
+
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
612
|
+
vec3 B = sign(det) * cross(normal, T);
|
|
613
|
+
return mat3(T, B, normal);
|
|
614
|
+
}`),f&&0!==p&&(e.include(a.r,t),r.uniforms.add(1===v?new d.N("normalTexture",e=>e.textureNormal):new u.o("normalTexture",e=>e.textureNormal)),g&&(r.uniforms.add(1===v?new s.G("scale",e=>e.scale??n.Un):new i.t("scale",e=>e.scale??n.Un)),r.uniforms.add(new c.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
615
|
+
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),g&&r.code.add(l.H`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
|
|
616
|
+
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
617
|
+
0.0, 0.0, 0.0 );
|
|
618
|
+
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
619
|
+
}`))}(e,t)}},8578(e,t,r){r.d(t,{k:()=>n});var o=r(31821);function n(e){e.code.add(o.H`vec2 encodeRGBtoVec2(vec3 color) {
|
|
620
|
+
return vec2(color.r, color.b);
|
|
621
|
+
}
|
|
622
|
+
vec3 decodeVec2ToRGB(vec2 encoded) {
|
|
623
|
+
return vec3(encoded.x, (encoded.x + encoded.y)/2.0, encoded.y);
|
|
624
|
+
}`)}},71651(e,t,r){r.d(t,{n:()=>H});var o=r(31821),n=r(12791),a=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),m=r(2016),h=r(48375);var f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var w=r(48163),y=r(65786);class M extends y.Y{constructor(){super(...arguments),this.projScale=1}}class T extends M{constructor(){super(...arguments),this.intensity=1}}class S extends y.Y{}class C extends S{constructor(){super(...arguments),this.blurSize=(0,w.vt)()}}let _=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],_);var z=r(63907),I=r(76284),P=r(67171);let O=class extends h.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=m.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new T,this._drawParameters=new C}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new P.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new I.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(_),this.techniques.precompile(b)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(z.nI);if(!r||!o)return;const n=this.techniques.getCompiled(_),a=this.techniques.getCompiled(b);if(!n||!a)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,p=h.relativeElevation,v=(0,i.qE)((5e5-p)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*F/(0,f.g)(h)**6*x;const w=h.fullViewport[2],y=h.fullViewport[3],M=this.fboCache.acquire(w,y,"ssao input",2);s.bindFramebuffer(M.fbo),s.setViewport(0,0,w,y),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();const T=Math.round(w/2),S=Math.round(y/2),C=this.fboCache.acquire(T,S,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/y),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.setViewport(0,0,T,S),s.screen.draw(),M.release();const I=this.fboCache.acquire(T,S,m.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(I.fbo),s.setViewport(0,0,w,y),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/w,0),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.setViewport(0,0,T,S),s.screen.draw(),s.setViewport4fv(h.fullViewport),C.release(),g<1&&this.requestRender(2),I}};(0,a.Cg)([(0,u.MZ)()],O.prototype,"consumes",void 0),(0,a.Cg)([(0,u.MZ)()],O.prototype,"produces",void 0),O=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],O);const F=.5;function H(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
|
|
625
|
+
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
626
|
+
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
627
|
+
}
|
|
628
|
+
float evaluateAmbientOcclusion() {
|
|
629
|
+
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
630
|
+
}`)):e.code.add(o.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
631
|
+
float evaluateAmbientOcclusion() { return 0.0; }`)}},9312(e,t,r){r.d(t,{kA:()=>U,a8:()=>W,eU:()=>k});var o=r(74333);class n extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,n)=>t.setUniform1fv(e,r(n),o),t)}}var a=r(31821);function i(e,t){e.uniforms.add(new n("shR",9,({lighting:e})=>e.sh.r),new n("shG",9,({lighting:e})=>e.sh.g),new n("shB",9,({lighting:e})=>e.sh.b)),e.code.add(a.H`vec3 calculateAmbientIrradiance(vec3 normal) {
|
|
632
|
+
vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
|
|
633
|
+
vec4 sh1 = vec4(
|
|
634
|
+
0.488603 * normal.x,
|
|
635
|
+
0.488603 * normal.z,
|
|
636
|
+
0.488603 * normal.y,
|
|
637
|
+
1.092548 * normal.x * normal.y
|
|
638
|
+
);
|
|
639
|
+
vec4 sh2 = vec4(
|
|
640
|
+
1.092548 * normal.y * normal.z,
|
|
641
|
+
0.315392 * (3.0 * normal.z * normal.z - 1.0),
|
|
642
|
+
1.092548 * normal.x * normal.z,
|
|
643
|
+
0.546274 * (normal.x * normal.x - normal.y * normal.y)
|
|
644
|
+
);
|
|
645
|
+
vec4 lightingAmbientSH_R1 = vec4(shR[1], shR[2], shR[3], shR[4]);
|
|
646
|
+
vec4 lightingAmbientSH_G1 = vec4(shG[1], shG[2], shG[3], shG[4]);
|
|
647
|
+
vec4 lightingAmbientSH_B1 = vec4(shB[1], shB[2], shB[3], shB[4]);
|
|
648
|
+
ambientLight += vec3(
|
|
649
|
+
dot(lightingAmbientSH_R1, sh1),
|
|
650
|
+
dot(lightingAmbientSH_G1, sh1),
|
|
651
|
+
dot(lightingAmbientSH_B1, sh1)
|
|
652
|
+
);
|
|
653
|
+
vec4 lightingAmbientSH_R2 = vec4(shR[5], shR[6], shR[7], shR[8]);
|
|
654
|
+
vec4 lightingAmbientSH_G2 = vec4(shG[5], shG[6], shG[7], shG[8]);
|
|
655
|
+
vec4 lightingAmbientSH_B2 = vec4(shB[5], shB[6], shB[7], shB[8]);
|
|
656
|
+
ambientLight += vec3(
|
|
657
|
+
dot(lightingAmbientSH_R2, sh2),
|
|
658
|
+
dot(lightingAmbientSH_G2, sh2),
|
|
659
|
+
dot(lightingAmbientSH_B2, sh2)
|
|
660
|
+
);
|
|
661
|
+
return ambientLight;
|
|
662
|
+
}`),1!==t.pbrMode&&2!==t.pbrMode||e.code.add(a.H`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
|
|
663
|
+
vec3 calculateAmbientRadiance()
|
|
664
|
+
{
|
|
665
|
+
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
666
|
+
return ambientLight *= skyTransmittance;
|
|
667
|
+
}`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),m=r(8578),h=r(12791),f=r(5482),p=(r(44208),r(53966)),v=r(97768),g=r(17676),x=r(36708),b=r(91429),w=r(37585),y=r(31217),M=r(2016),T=r(48375),S=r(13840),C=r(98958),_=r(52516),z=r(90644);let I=class extends C.w{constructor(){super(...arguments),this.shader=new S.r(_.a,()=>r.e(4434).then(r.bind(r,84434)))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}};I=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],I);var P=r(587);let O=class extends C.w{constructor(){super(...arguments),this.shader=new S.r(P.a,()=>r.e(8225).then(r.bind(r,18225)))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}};O=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],O);var F=r(51976);class H extends F.K{constructor(){super(...arguments),this.hasEmission=!1}}(0,f.Cg)([(0,F.W)()],H.prototype,"hasEmission",void 0);var E=r(63907),R=r(76284),j=r(67171);let N=class extends T.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=M.OG.AMBIENT_ILLUMINATION,this._passParameters=new P.G,this._drawParameters=new _.G,this._accumulatedFrames=0,this._maxFrames=255,this._configuration=new H,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await r.e(5354).then(r.bind(r,45354))).data;(0,g.Te)(e),await this._loadBlueNoiseTexture(t,e),(0,g.Te)(e)}catch(e){(0,g.zf)(e)||p.A.getLogger(this).errorOnce("Failed to load blue noise texture:",e)}this.addHandles((0,x.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,e=>{e&&this.resetAccumulation(),this.requestRender(1)},x.pc))}precompile(){this._canRender&&(this._configuration.hasEmission=this.bindParameters.hasEmission,this.techniques.precompile(O,this._configuration),this.techniques.precompile(I))}destroy(){this._abortController=(0,v.DC)(this._abortController),this._passParameters.noiseTexture=(0,v.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(E.nI);if(!r||!o)return this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=n.hasEmission;const a=this.techniques.getCompiled(O,this._configuration),i=this.techniques.getCompiled(I);if(!a||!i)return this.requestRender(1),this._emptyOutput;this.view.stage.renderView.updating&&this.resetAccumulation();const s=this.renderingContext,{camera:l}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/l.computeScreenPixelSizeAtDist(1);const{fullWidth:c,fullHeight:u}=l,d=this.fboCache.acquire(c,u,"global illumination input");s.bindFramebuffer(d.fbo),s.setViewport(0,0,c,u),s.bindTechnique(a,n,this._passParameters,this._drawParameters),s.screen.draw();const m=Math.round(c/1),h=Math.round(u/1),f=this.fboCache.acquire(m,h,"global illumination blur");s.bindFramebuffer(f.fbo),this._drawParameters.colorTexture=d.getTexture(),(0,w.hZ)(this._drawParameters.blurSize,0,1/u),s.bindTechnique(i,n,this._passParameters,this._drawParameters),s.setViewport(0,0,m,h),s.screen.draw(),d.release();const p=this.fboCache.acquire(c,u,M.OG.AMBIENT_ILLUMINATION);return s.bindFramebuffer(p.fbo),s.setViewport(0,0,c,u),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=f.getTexture(),(0,w.hZ)(this._drawParameters.blurSize,1/c,0),s.bindTechnique(i,n,this._passParameters,this._drawParameters),s.setViewport(0,0,m,h),s.screen.draw(),s.setViewport4fv(l.fullViewport),f.release(),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._accumulatedFrames,this._accumulatedFrames<this._maxFrames&&this.requestRender(1),p}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,M.OG.AMBIENT_ILLUMINATION);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.setClearColor(0,0,0,1),e.clear(16384),o}async _loadBlueNoiseTexture(e,t){(0,g.Te)(t);const r=await(0,y.D)(e,{signal:t});if((0,g.Te)(t),!r)return;const o=new j.R;o.internalFormat=E.H0.RGBA8,o.wrapMode=10497,o.isImmutable=!0,this._passParameters.noiseTexture=new R.A(this.renderingContext,o,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}resetAccumulation(){this._accumulatedFrames=0}get test(){}};function D(e,t){t.receiveGlobalIllumination?(e.include(m.k),e.uniforms.add(new h.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(a.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
668
|
+
ivec2 texel = ivec2(gl_FragCoord.xy * blurSizePixelsInverse);
|
|
669
|
+
return vec3(texelFetch(globalIlluminationTexture, texel, 0).a);
|
|
670
|
+
}
|
|
671
|
+
vec3 readGlobalIlluminationOcclusion() {
|
|
672
|
+
return 1.0 - readGlobalIlluminationOcclusionInverse();
|
|
673
|
+
}
|
|
674
|
+
vec4 readGlobalIlluminationEmissionInverse() {
|
|
675
|
+
ivec2 texel = ivec2(gl_FragCoord.xy * blurSizePixelsInverse);
|
|
676
|
+
vec3 encodedEmission = texelFetch(globalIlluminationTexture, texel, 0).rgb;
|
|
677
|
+
vec3 rgb = decodeVec2ToRGB(encodedEmission.rg);
|
|
678
|
+
return 1.0 - vec4(rgb, 0.0);
|
|
679
|
+
}
|
|
680
|
+
vec4 readGlobalIlluminationEmission() {
|
|
681
|
+
return max((1.0 - readGlobalIlluminationEmissionInverse() - 0.01) / 0.99, 0.);
|
|
682
|
+
}`)):e.code.add(a.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
683
|
+
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
684
|
+
vec4 readGlobalIlluminationEmissionInverse() { return vec4(1.0); }
|
|
685
|
+
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,f.Cg)([(0,b.MZ)()],N.prototype,"consumes",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"produces",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"_abortController",void 0),N=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],N);var A=r(32976),B=r(33094),V=r(57226);function L(e){e.code.add(a.H`float mapChannel(float x, vec2 p) {
|
|
686
|
+
return (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
|
|
687
|
+
}`),e.code.add(a.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
688
|
+
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
689
|
+
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
690
|
+
}`)}function G(e){e.code.add(a.H`vec3 tonemapACES(vec3 x) {
|
|
691
|
+
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
692
|
+
}`),e.code.add(a.H`vec3 tonemapKhronosNeutral(vec3 color, float exposure) {
|
|
693
|
+
const float startCompression = 0.76;
|
|
694
|
+
const float desaturation = 0.15;
|
|
695
|
+
color *= exposure;
|
|
696
|
+
float x = min( color.r, min( color.g, color.b ) );
|
|
697
|
+
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
|
|
698
|
+
color -= offset;
|
|
699
|
+
float peak = max( color.r, max( color.g, color.b ) );
|
|
700
|
+
if ( peak < startCompression ) {
|
|
701
|
+
return color;
|
|
702
|
+
}
|
|
703
|
+
float d = 1.0 - startCompression;
|
|
704
|
+
float newPeak = 1.0 - d * d / ( peak + d - startCompression );
|
|
705
|
+
color *= newPeak / peak;
|
|
706
|
+
float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
|
|
707
|
+
return mix( color, vec3( newPeak ), g );
|
|
708
|
+
}`)}function W(e){e.constants.add("ambientBoostFactor","float",V.uH)}function k(e){e.uniforms.add(new B.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function U(e,t){const{pbrMode:r,spherical:o,hasColorTexture:n,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(D,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(G,t);const h=!(2===r&&!n);h&&e.include(L),W(e),k(e),(0,c.Gc)(e),e.code.add(a.H`
|
|
709
|
+
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
710
|
+
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
float additionalDirectedAmbientLight(vec3 vPosWorld) {
|
|
714
|
+
float lightAlignment = dot(${o?a.H`normalize(vPosWorld)`:a.H`vec3(0.0, 0.0, 1.0)`}, mainLightDirection);
|
|
715
|
+
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
716
|
+
}
|
|
717
|
+
`),(0,c.O4)(e),e.code.add(a.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
|
|
718
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
|
|
719
|
+
return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
|
|
720
|
+
}`);const f=m?"globalIlluminationOcclusion":"ssao",p=m?.75:1,v=m?1.5:1;switch(r){case 0:case 4:case 3:e.include(c.Vt),e.code.add(a.H`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight) {
|
|
721
|
+
vec3 mainLighting = applyShading(normalWorld, shadow);
|
|
722
|
+
vec3 ambientLighting = calculateAmbientIrradiance(normalWorld) * (1.0 - ssao);
|
|
723
|
+
vec3 albedoLinear = linearizeGamma(albedo);
|
|
724
|
+
vec3 totalLight = mainLighting + ambientLighting + additionalLight;
|
|
725
|
+
totalLight = min(totalLight, vec3(PI));
|
|
726
|
+
vec3 outColor = vec3((albedoLinear / PI) * totalLight);
|
|
727
|
+
return delinearizeGamma(outColor);
|
|
728
|
+
}`);break;case 1:case 2:{const r=m?.35:.2;e.code.add(a.H`
|
|
729
|
+
const float fillLightIntensity = 0.25;
|
|
730
|
+
const float horizonLightDiffusion = 0.4;
|
|
731
|
+
const float additionalAmbientIrradianceFactor = 0.02;
|
|
732
|
+
const float groundReflectance = ${a.H.float(r)};
|
|
733
|
+
|
|
734
|
+
vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
735
|
+
vec3 viewDirection, vec3 upDirection, vec3 mrr, float additionalAmbientIrradiance) {
|
|
736
|
+
PBRShadingInfo inputs;
|
|
737
|
+
calculatePBRInputs(inputs, normal, viewDirection, upDirection, albedo, mrr);
|
|
738
|
+
|
|
739
|
+
${(0,a.If)(m,a.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
740
|
+
`),t.useFillLights?e.uniforms.add(new A.o("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(a.H`
|
|
741
|
+
vec3 ambientDir = vec3(5.0 * upDirection[1] - upDirection[0] * upDirection[2], - 5.0 * upDirection[0] - upDirection[2] * upDirection[1], upDirection[1] * upDirection[1] + upDirection[0] * upDirection[0]);
|
|
742
|
+
ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
|
|
743
|
+
|
|
744
|
+
inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
|
|
745
|
+
|
|
746
|
+
// Calculate the irradiance components: sun, fill lights and the sky.
|
|
747
|
+
vec3 mainLightIrradianceComponent = ${a.H.float(p)} * inputs.NdotL * (1.0 - shadow) * mainLightIntensity;
|
|
748
|
+
vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity;
|
|
749
|
+
// calculate ambient irradiance for localView and additionalLight for globalView
|
|
750
|
+
vec3 ambientLightIrradianceComponent = ${a.H.float(v)} * calculateAmbientIrradiance(normal) * (1.0 - ${f}) + additionalLight;
|
|
751
|
+
|
|
752
|
+
// Assemble the overall irradiance of the sky that illuminates the surface
|
|
753
|
+
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
754
|
+
// Assemble the overall irradiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky irradiance by the groundReflectance
|
|
755
|
+
inputs.groundIrradianceToSurface = groundReflectance * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
756
|
+
`),e.uniforms.add(new B.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),new B.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength)).code.add(a.H`
|
|
757
|
+
vec3 horizonRingDir = inputs.RdotUP * upDirection - inputs.reflectedView;
|
|
758
|
+
vec3 horizonRingH = normalize(horizonRingDir - viewDirection);
|
|
759
|
+
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
760
|
+
|
|
761
|
+
vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * mainLightIntensity * (1.0 - shadow);
|
|
762
|
+
vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * mainLightIntensity * fillLightIntensity;
|
|
763
|
+
|
|
764
|
+
// calculateAmbientRadiance for localView and additionalLight for global view
|
|
765
|
+
vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance() * (1.0 - ${f}) + additionalLight;
|
|
766
|
+
float normalDirectionModifier = mix(1., min(mix(0.1, 2.0, (inputs.NdotUP + 1.) * 0.5), 1.0), clamp(inputs.roughness * 5.0, 0.0 , 1.0));
|
|
767
|
+
|
|
768
|
+
// Assemble the overall radiance of the sky that illuminates the surface
|
|
769
|
+
inputs.skyRadianceToSurface = (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
770
|
+
|
|
771
|
+
// Assemble the overall radiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky radiance by the groundReflectance
|
|
772
|
+
inputs.groundRadianceToSurface = 0.5 * groundReflectance * (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
773
|
+
|
|
774
|
+
// Calculate average ambient radiance - This is used in the gamut mapping process to determine the black level for compression
|
|
775
|
+
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + groundReflectance);
|
|
776
|
+
`),e.code.add(a.H`
|
|
777
|
+
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
778
|
+
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
779
|
+
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
780
|
+
|
|
781
|
+
${(0,a.If)(m,a.H`
|
|
782
|
+
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
783
|
+
outColorLinear += globalIlluminationEmission;`)}
|
|
784
|
+
|
|
785
|
+
${h?a.H`vec3 adjustedOutColorLinear = blackLevelSoftCompression(outColorLinear, inputs.averageAmbientRadiance);`:a.H`vec3 adjustedOutColorLinear = max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance);`}
|
|
786
|
+
|
|
787
|
+
return delinearizeGamma(adjustedOutColorLinear);
|
|
788
|
+
}
|
|
789
|
+
`);break}case 5:case 6:{const t=m?.35:.5,r=m?.75:1,o=m?1.5:1;(0,c.Gc)(e),(0,c.O4)(e),e.code.add(a.H`
|
|
790
|
+
const float roughnessTerrain = 0.5;
|
|
791
|
+
const float specularityTerrain = ${a.H.float(t)};
|
|
792
|
+
|
|
793
|
+
vec3 evaluatePBRSimplifiedLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDirection, vec3 upDirection) {
|
|
794
|
+
PBRShadingInfo inputs;
|
|
795
|
+
calculateSimplifiedInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
796
|
+
|
|
797
|
+
${(0,a.If)(m,a.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
798
|
+
|
|
799
|
+
vec3 mainLightIrradianceComponent = ${a.H.float(r)} * (1.0 - shadow) * inputs.NdotL * mainLightIntensity;
|
|
800
|
+
vec3 ambientLightIrradianceComponent = ${a.H.float(o)} * calculateAmbientIrradiance(normal) * (1.0 - ${f}) + additionalLight;
|
|
801
|
+
vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
|
|
802
|
+
|
|
803
|
+
vec3 indirectDiffuse = ((1.0 - inputs.NdotUP) * mainLightIrradianceComponent + (1.0 + inputs.NdotUP ) * ambientSky) * 0.5;
|
|
804
|
+
vec3 outDiffColor = inputs.albedoLinear * (1.0 - inputs.f0) * indirectDiffuse / PI;
|
|
805
|
+
|
|
806
|
+
vec3 mainLightRadianceComponent = normalDistribution(inputs.NdotH, roughnessTerrain) * mainLightIntensity;
|
|
807
|
+
vec2 dfg = prefilteredDFGAnalytical(roughnessTerrain, inputs.NdotV);
|
|
808
|
+
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
809
|
+
vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceComponent;
|
|
810
|
+
|
|
811
|
+
vec3 outColorLinear = outDiffColor + specularComponent;
|
|
812
|
+
|
|
813
|
+
${(0,a.If)(m,a.H`
|
|
814
|
+
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
815
|
+
outColorLinear += globalIlluminationEmission;`)}
|
|
816
|
+
|
|
817
|
+
return delinearizeGamma(outColorLinear);
|
|
818
|
+
}
|
|
819
|
+
`);break}}}},65261(e,t,r){r.d(t,{C:()=>a});var o=r(40876),n=r(31821);function a(e){e.constants.add("GAMMA","float",o.Tf).constants.add("INV_GAMMA","float",1/o.Tf).code.add(n.H`vec3 delinearizeGamma(vec3 color) {
|
|
820
|
+
return pow(color, vec3(INV_GAMMA));
|
|
821
|
+
}
|
|
822
|
+
vec4 delinearizeGamma(vec4 color) {
|
|
823
|
+
return vec4(delinearizeGamma(color.rgb), color.a);
|
|
824
|
+
}
|
|
825
|
+
vec3 linearizeGamma(vec3 color) {
|
|
826
|
+
return pow(color, vec3(GAMMA));
|
|
827
|
+
}`)}},98619(e,t,r){r.d(t,{Gc:()=>a,O4:()=>i,Vt:()=>s});var o=r(23205),n=r(31821);function a(e){e.uniforms.add(new o.d("mainLightDirection",e=>e.lighting.mainLight.direction))}function i(e){e.uniforms.add(new o.d("mainLightIntensity",e=>e.lighting.mainLight.intensity))}function s(e){a(e),i(e),e.code.add(n.H`vec3 applyShading(vec3 shadingNormal, float shadow) {
|
|
828
|
+
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
|
|
829
|
+
return mainLightIntensity * ((1.0 - shadow) * dotVal);
|
|
830
|
+
}`)}},62602(e,t,r){r.d(t,{r:()=>n});var o=r(31821);function n(e,t){const r=e.fragment;switch(r.code.add(o.H`struct ShadingNormalParameters {
|
|
831
|
+
vec3 normalView;
|
|
832
|
+
vec3 viewDirection;
|
|
833
|
+
} shadingParams;`),t.doubleSidedMode){case 0:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
834
|
+
return normalize(params.normalView);
|
|
835
|
+
}`);break;case 1:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
836
|
+
return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
|
|
837
|
+
}`);break;case 2:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
838
|
+
return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
|
|
839
|
+
}`);break;default:t.doubleSidedMode;case 3:}}},22393(e,t,r){r.d(t,{c:()=>s});var o=r(31821);function n(e){e.code.add(o.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
840
|
+
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
841
|
+
}`),e.code.add(o.H`float integratedRadiance(float cosTheta2, float roughness) {
|
|
842
|
+
return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
|
|
843
|
+
}`),e.code.add(o.H`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness) {
|
|
844
|
+
float cosTheta2 = 1.0 - RdotNG * RdotNG;
|
|
845
|
+
float intRadTheta = integratedRadiance(cosTheta2, roughness);
|
|
846
|
+
float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
|
|
847
|
+
float sky = 2.0 - ground;
|
|
848
|
+
return (ground * ambientGround + sky * ambientSky) * 0.5;
|
|
849
|
+
}`)}var a=r(65261),i=r(89786);function s(e,t){e.include(a.C),e.include(i.p),1!==t.pbrMode&&2!==t.pbrMode&&5!==t.pbrMode&&6!==t.pbrMode||(e.code.add(o.H`float normalDistribution(float NdotH, float roughness)
|
|
850
|
+
{
|
|
851
|
+
float a = NdotH * roughness;
|
|
852
|
+
float b = roughness / (1.0 - NdotH * NdotH + a * a);
|
|
853
|
+
return b * b * INV_PI;
|
|
854
|
+
}`),e.code.add(o.H`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
|
|
855
|
+
const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040);
|
|
856
|
+
const vec2 c2 = vec2(-1.04, 1.04);
|
|
857
|
+
vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
|
|
858
|
+
vec4 r = roughness * c0 + c1;
|
|
859
|
+
float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
|
|
860
|
+
return c2 * a004 + r.zw;
|
|
861
|
+
}`),e.code.add(o.H`struct PBRShadingInfo
|
|
862
|
+
{
|
|
863
|
+
float NdotV;
|
|
864
|
+
float NdotL;
|
|
865
|
+
float LdotH;
|
|
866
|
+
float NdotUP;
|
|
867
|
+
float RdotUP;
|
|
868
|
+
float NdotAmbDir;
|
|
869
|
+
float NdotH_Horizon;
|
|
870
|
+
float NdotH;
|
|
871
|
+
vec3 skyRadianceToSurface;
|
|
872
|
+
vec3 groundRadianceToSurface;
|
|
873
|
+
vec3 skyIrradianceToSurface;
|
|
874
|
+
vec3 groundIrradianceToSurface;
|
|
875
|
+
vec3 reflectedView;
|
|
876
|
+
float averageAmbientRadiance;
|
|
877
|
+
vec3 albedoLinear;
|
|
878
|
+
vec3 f0;
|
|
879
|
+
vec3 f90;
|
|
880
|
+
vec3 diffuseColor;
|
|
881
|
+
float metalness;
|
|
882
|
+
float roughness;
|
|
883
|
+
};`),e.code.add(o.H`void calculateCommonInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
884
|
+
vec3 h = normalize(mainLightDirection - viewDirection);
|
|
885
|
+
inputs.NdotV = clamp(abs(dot(normal, -viewDirection)), 0.001, 1.0);
|
|
886
|
+
inputs.NdotUP = clamp(dot(normal, upDirection), -1.0, 1.0);
|
|
887
|
+
inputs.reflectedView = normalize(reflect(-viewDirection, normal));
|
|
888
|
+
inputs.RdotUP = clamp(dot(inputs.reflectedView, upDirection), -1.0, 1.0);
|
|
889
|
+
inputs.albedoLinear = linearizeGamma(albedo);
|
|
890
|
+
inputs.NdotH = clamp(dot(normal, h), 0.0, 1.0);
|
|
891
|
+
inputs.NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0);
|
|
892
|
+
}`)),1!==t.pbrMode&&2!==t.pbrMode||(e.include(n),e.code.add(o.H`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) {
|
|
893
|
+
vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotUP);
|
|
894
|
+
vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotUP, inputs.roughness);
|
|
895
|
+
vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI;
|
|
896
|
+
vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV);
|
|
897
|
+
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
898
|
+
vec3 specularComponent = specularColor * indirectSpecular;
|
|
899
|
+
return (diffuseComponent + specularComponent);
|
|
900
|
+
}`),e.code.add(o.H`void calculatePBRInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo, vec3 mrr) {
|
|
901
|
+
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
902
|
+
inputs.metalness = mrr[0];
|
|
903
|
+
inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);
|
|
904
|
+
inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
|
|
905
|
+
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
906
|
+
inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);
|
|
907
|
+
}`)),5!==t.pbrMode&&6!==t.pbrMode||e.code.add(o.H`const vec3 fresnelReflectionSimplified = vec3(0.04);
|
|
908
|
+
void calculateSimplifiedInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
909
|
+
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
910
|
+
float lightness = 0.3 * inputs.albedoLinear[0] + 0.5 * inputs.albedoLinear[1] + 0.2 * inputs.albedoLinear[2];
|
|
911
|
+
inputs.f0 = (0.85 * lightness + 0.15) * fresnelReflectionSimplified;
|
|
912
|
+
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
913
|
+
}`)}},59469(e,t,r){r.d(t,{_:()=>c});var o=r(99208),n=r(40710),a=r(33079),i=r(31821),s=r(15976),l=r(63761);function c(e,t){const r=t.pbrMode,c=e.fragment;if(2!==r&&0!==r&&1!==r)return void c.code.add(i.H`void applyPBRFactors() {}`);if(0===r)return void c.code.add(i.H`void applyPBRFactors() {}
|
|
914
|
+
float getBakedOcclusion() { return 1.0; }`);if(2===r)return void c.code.add(i.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
915
|
+
float occlusion = 1.0;
|
|
916
|
+
void applyPBRFactors() {}
|
|
917
|
+
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:u,hasMetallicRoughnessTextureTransform:d,hasOcclusionTexture:m,hasOcclusionTextureTransform:h,bindType:f}=t;(u||m)&&e.include(o.r,t),c.code.add(i.H`vec3 mrr;
|
|
918
|
+
float occlusion;`),u&&c.uniforms.add(1===f?new l.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new s.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),m&&c.uniforms.add(1===f?new l.N("texOcclusion",e=>e.textureOcclusion):new s.o("texOcclusion",e=>e.textureOcclusion)),c.uniforms.add(1===f?new a.t("mrrFactors",e=>e.mrrFactors):new n.W("mrrFactors",e=>e.mrrFactors)),c.code.add(i.H`
|
|
919
|
+
${(0,i.If)(u,i.H`void applyMetallicRoughness(vec2 uv) {
|
|
920
|
+
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
921
|
+
mrr[0] *= metallicRoughness.b;
|
|
922
|
+
mrr[1] *= metallicRoughness.g;
|
|
923
|
+
}`)}
|
|
924
|
+
|
|
925
|
+
${(0,i.If)(m,"void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }")}
|
|
926
|
+
|
|
927
|
+
float getBakedOcclusion() {
|
|
928
|
+
return ${m?"occlusion":"1.0"};
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
void applyPBRFactors() {
|
|
932
|
+
mrr = mrrFactors;
|
|
933
|
+
occlusion = 1.0;
|
|
934
|
+
|
|
935
|
+
${(0,i.If)(u,`applyMetallicRoughness(${d?"metallicRoughnessUV":"vuv0"});`)}
|
|
936
|
+
${(0,i.If)(m,`applyOcclusion(${h?"occlusionUV":"vuv0"});`)}
|
|
937
|
+
}
|
|
938
|
+
`)}(r(74810),r(65786)).Y},32482(e,t,r){r.d(t,{LA:()=>M,QH:()=>y}),r(51850);var o=r(46686),n=r(49255),a=r(31821);function i(e,t){const r=(0,n._o)(t.output)&&t.receiveShadows;r&&(0,o.o)(e,!0),e.vertex.code.add(a.H`
|
|
939
|
+
void forwardLinearDepthToReadShadowMap() { ${(0,a.If)(r,"forwardLinearDepth(gl_Position.w);")} }
|
|
940
|
+
`)}var s=r(14314),l=r(35818),c=r(74333);class u extends c.n{constructor(e,t,r,o){super(e,"mat4",2,(r,n,a,i)=>r.setUniformMatrices4fv(e,t(n,a,i),o),r)}}class d extends c.n{constructor(e,t,r,o){super(e,"mat4",1,(r,n,a)=>r.setUniformMatrices4fv(e,t(n,a),o),r)}}var m=r(65786);function h(e){e.uniforms.add(new d("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(p)}function f(e){e.uniforms.add(new u("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(p)}function p(e){e.uniforms.add(new s.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new l.W("numCascades",e=>e.shadowMap.numCascades)),e.code.add(v)}m.Y;const v=a.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
|
|
941
|
+
vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
|
|
942
|
+
vec4 lv = mat * vec4(_vpos, 1.0);
|
|
943
|
+
lv.xy /= lv.w;
|
|
944
|
+
return 0.5 * lv.xyz + vec3(0.5);
|
|
945
|
+
}
|
|
946
|
+
vec2 cascadeCoordinates(int i, ivec2 textureSize, vec3 lvpos) {
|
|
947
|
+
float xScale = float(textureSize.y) / float(textureSize.x);
|
|
948
|
+
return vec2((float(i) + lvpos.x) * xScale, lvpos.y);
|
|
949
|
+
}
|
|
950
|
+
vec3 calculateUVZShadow(in vec3 _worldPos, in float _linearDepth, in ivec2 shadowMapSize) {
|
|
951
|
+
int i = _linearDepth < cascadeDistances[1] ? 0 : _linearDepth < cascadeDistances[2] ? 1 : _linearDepth < cascadeDistances[3] ? 2 : 3;
|
|
952
|
+
if (i >= numCascades) {
|
|
953
|
+
return invalidShadowmapUVZ;
|
|
954
|
+
}
|
|
955
|
+
mat4 shadowMatrix = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3];
|
|
956
|
+
vec3 lvpos = lightSpacePosition(_worldPos, shadowMatrix);
|
|
957
|
+
if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
|
|
958
|
+
return invalidShadowmapUVZ;
|
|
959
|
+
}
|
|
960
|
+
vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
|
|
961
|
+
return vec3(uvShadow, lvpos.z);
|
|
962
|
+
}`;function g(e){e.code.add(a.H`float readShadowMapUVZ(vec3 uvzShadow, sampler2DShadow _shadowMap) {
|
|
963
|
+
return texture(_shadowMap, uvzShadow);
|
|
964
|
+
}`)}r(32976);var x=r(33094),b=r(12791);class w extends c.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,o)=>r.bindTexture(e,t(o)))}}function y(e,t){t.receiveShadows&&e.fragment.include(h),T(e,t)}function M(e,t){t.receiveShadows&&e.fragment.include(f),T(e,t)}function T(e,t){e.fragment.uniforms.add(new x.U("lightingGlobalFactor",e=>e.lighting.globalFactor));const{hasShadowHighlights:r,receiveShadows:o,spherical:n}=t;e.include(i,t),o&&function(e,t){(function(e,t){e.include(g),e.uniforms.add(S()),t&&e.uniforms.add(new b.x("shadowHighlight",({shadowHighlight:e})=>e?.getTexture())),e.code.add(a.H`
|
|
965
|
+
float readShadowMaps(const in vec3 uvzShadow) {
|
|
966
|
+
if (uvzShadow.z < 0.0) {
|
|
967
|
+
return 0.0;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
float shadow1 = readShadowMapUVZ(uvzShadow, shadowMap);
|
|
971
|
+
${(0,a.If)(t,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
|
|
972
|
+
}
|
|
973
|
+
`)})(e,t),function(e){e.code.add(a.H`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
|
|
974
|
+
vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
|
|
975
|
+
return readShadowMaps(uvzShadow);
|
|
976
|
+
}`)}(e)}(e.fragment,r),e.fragment.code.add(a.H`
|
|
977
|
+
float readShadow(float additionalAmbientScale, vec3 vpos) {
|
|
978
|
+
return ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,a.If)(n,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
979
|
+
}
|
|
980
|
+
`)}function S(){return new w("shadowMap",({shadowMap:e})=>e.getOutput(5)??e.getOutput(7))}m.Y},96608(e,t,r){r.d(t,{t:()=>c});var o=r(52540),n=r(77108),a=r(33094),i=r(31821),s=r(58029),l=r(12791);function c(e,t){if(!t.screenSpaceReflections)return;const r=e.fragment;r.include(o.E),r.uniforms.add(new n.E("nearFar",e=>e.camera.nearFar),new l.x("depthMap",e=>e.depth?.attachment),new s.F("proj",e=>e.camera.projectionMatrix),new a.U("invResolutionHeight",e=>1/e.camera.height),new s.F("reprojectionMatrix",e=>e.reprojection.matrix)).code.add(i.H`
|
|
981
|
+
vec2 reprojectionCoordinate(vec3 projectionCoordinate)
|
|
982
|
+
{
|
|
983
|
+
vec4 zw = proj * vec4(0.0, 0.0, -projectionCoordinate.z, 1.0);
|
|
984
|
+
vec4 reprojectedCoord = reprojectionMatrix * vec4(zw.w * (projectionCoordinate.xy * 2.0 - 1.0), zw.z, zw.w);
|
|
985
|
+
reprojectedCoord.xy /= reprojectedCoord.w;
|
|
986
|
+
return reprojectedCoord.xy * 0.5 + 0.5;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
vec4 applyProjectionMat(mat4 projectionMat, vec3 x)
|
|
990
|
+
{
|
|
991
|
+
vec4 projectedCoord = projectionMat * vec4(x, 1.0);
|
|
992
|
+
projectedCoord.xy /= projectedCoord.w;
|
|
993
|
+
projectedCoord.xy = projectedCoord.xy*0.5 + 0.5;
|
|
994
|
+
return projectedCoord;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
vec3 screenSpaceIntersection(vec3 dir, vec3 startPosition, vec3 viewDir, vec3 normal, float offset, bool globalIllumination)
|
|
998
|
+
{
|
|
999
|
+
vec3 viewPos = startPosition;
|
|
1000
|
+
vec3 viewPosEnd = startPosition;
|
|
1001
|
+
|
|
1002
|
+
// Project the start position to the screen
|
|
1003
|
+
vec4 projectedCoordStart = applyProjectionMat(proj, viewPos);
|
|
1004
|
+
vec3 Q0 = viewPos / projectedCoordStart.w; // homogeneous camera space
|
|
1005
|
+
float k0 = 1.0/ projectedCoordStart.w;
|
|
1006
|
+
|
|
1007
|
+
// advance the position in the direction of the reflection
|
|
1008
|
+
viewPos += dir;
|
|
1009
|
+
|
|
1010
|
+
vec4 projectedCoordVanishingPoint = applyProjectionMat(proj, dir);
|
|
1011
|
+
|
|
1012
|
+
// Project the advanced position to the screen
|
|
1013
|
+
vec4 projectedCoordEnd = applyProjectionMat(proj, viewPos);
|
|
1014
|
+
vec3 Q1 = viewPos / projectedCoordEnd.w; // homogeneous camera space
|
|
1015
|
+
float k1 = 1.0/ projectedCoordEnd.w;
|
|
1016
|
+
|
|
1017
|
+
// calculate the reflection direction in the screen space
|
|
1018
|
+
vec2 projectedCoordDir = (projectedCoordEnd.xy - projectedCoordStart.xy);
|
|
1019
|
+
vec2 projectedCoordDistVanishingPoint = (projectedCoordVanishingPoint.xy - projectedCoordStart.xy);
|
|
1020
|
+
|
|
1021
|
+
float maxReach = globalIllumination ? 0.15 : 1.0;
|
|
1022
|
+
float distMod = min(globalIllumination ? length(projectedCoordDistVanishingPoint.xy) : abs(projectedCoordDistVanishingPoint.y), maxReach);
|
|
1023
|
+
|
|
1024
|
+
float projectedCoordDirLength = length(projectedCoordDir);
|
|
1025
|
+
int maxSteps = globalIllumination ? 16 : ${t.highStepCount?"150":"75"};
|
|
1026
|
+
float maxSt = float(maxSteps);
|
|
1027
|
+
|
|
1028
|
+
// normalize the projection direction depending on maximum steps
|
|
1029
|
+
// this determines how blocky the reflection looks
|
|
1030
|
+
vec2 dP = distMod * (projectedCoordDir)/(maxSt * projectedCoordDirLength);
|
|
1031
|
+
|
|
1032
|
+
// Normalize the homogeneous camera space coordinates
|
|
1033
|
+
vec3 dQ = distMod * (Q1 - Q0)/(maxSt * projectedCoordDirLength);
|
|
1034
|
+
float dk = distMod * (k1 - k0)/(maxSt * projectedCoordDirLength);
|
|
1035
|
+
|
|
1036
|
+
// initialize the variables for ray marching
|
|
1037
|
+
vec2 P = projectedCoordStart.xy;
|
|
1038
|
+
vec3 Q = Q0;
|
|
1039
|
+
float k = k0;
|
|
1040
|
+
float rayStartZ = -startPosition.z; // estimated ray start depth value
|
|
1041
|
+
float rayEndZ = -startPosition.z; // estimated ray end depth value
|
|
1042
|
+
float prevEstimateZ = -startPosition.z;
|
|
1043
|
+
float rayDiffZ = 0.0;
|
|
1044
|
+
float dDepth;
|
|
1045
|
+
float depth;
|
|
1046
|
+
float rayDiffZOld = 0.0;
|
|
1047
|
+
|
|
1048
|
+
// early outs
|
|
1049
|
+
if (dot(normal, dir) < 0.0 || dot(-viewDir, normal) < 0.0)
|
|
1050
|
+
return vec3(P, 0.0);
|
|
1051
|
+
float dDepthBefore = 0.0;
|
|
1052
|
+
|
|
1053
|
+
P = clamp(P + offset * dP, vec2(0.0), vec2(0.999));
|
|
1054
|
+
Q.z += offset * dQ.z;
|
|
1055
|
+
k += offset * dk;
|
|
1056
|
+
|
|
1057
|
+
for(int i = 0; i < maxSteps-1; i++)
|
|
1058
|
+
{
|
|
1059
|
+
depth = -linearDepthFromTexture(depthMap, P); // get linear depth from the depth buffer
|
|
1060
|
+
|
|
1061
|
+
// estimate depth of the marching ray
|
|
1062
|
+
rayStartZ = prevEstimateZ;
|
|
1063
|
+
dDepth = -rayStartZ - depth;
|
|
1064
|
+
rayEndZ = (dQ.z * 0.5 + Q.z)/ ((dk * 0.5 + k));
|
|
1065
|
+
rayDiffZ = rayEndZ- rayStartZ;
|
|
1066
|
+
prevEstimateZ = rayEndZ;
|
|
1067
|
+
|
|
1068
|
+
if(-rayEndZ > nearFar[1] || -rayEndZ < nearFar[0] || P.y < 0.0 || P.y > 1.0 )
|
|
1069
|
+
{
|
|
1070
|
+
return vec3(P, 0.);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
// If we detect a hit - return the intersection point, two conditions:
|
|
1074
|
+
// - dDepth > 0.0 - sampled point depth is in front of estimated depth
|
|
1075
|
+
// - if difference between dDepth and rayDiffZOld is not too large
|
|
1076
|
+
// - if difference between dDepth and 0.025/abs(k) is not too large
|
|
1077
|
+
// - if the sampled depth is not behind far plane or in front of near plane
|
|
1078
|
+
|
|
1079
|
+
if((dDepth) < 0.025/abs(k) + abs(rayDiffZ) && dDepth > 0.0 && depth > nearFar[0] && depth < nearFar[1] && abs(P.y - projectedCoordStart.y) > invResolutionHeight)
|
|
1080
|
+
{
|
|
1081
|
+
float weight = dDepth / (dDepth - dDepthBefore);
|
|
1082
|
+
vec2 Pf = mix(P - dP, P, 1.0 - weight);
|
|
1083
|
+
if (abs(Pf.y - projectedCoordStart.y) > invResolutionHeight) {
|
|
1084
|
+
return vec3(Pf, depth);
|
|
1085
|
+
}
|
|
1086
|
+
else {
|
|
1087
|
+
return vec3(P, depth);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
if (globalIllumination && (P.x <= 0.0 || P.x >= 1.0)) {
|
|
1092
|
+
return vec3(P, 0.0);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
// continue with ray marching
|
|
1096
|
+
// Clamp to 0.999 to avoid sampling edge artifacts for water reflections
|
|
1097
|
+
P = P + dP;
|
|
1098
|
+
Q.z += dQ.z;
|
|
1099
|
+
k += dk;
|
|
1100
|
+
rayDiffZOld = rayDiffZ;
|
|
1101
|
+
dDepthBefore = dDepth;
|
|
1102
|
+
|
|
1103
|
+
// Clamp to 0.999 to avoid sampling edge artifacts for water reflections
|
|
1104
|
+
if (!globalIllumination) {
|
|
1105
|
+
P = clamp(P, vec2(0.0), vec2(0.999));
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return vec3(P, 0.0);
|
|
1109
|
+
}
|
|
1110
|
+
`)}},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>s,q2:()=>i});var o=r(29242),n=r(31821),a=r(35644);function i(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??o.zK)).code.add(n.H`void forwardColorUV(){
|
|
1111
|
+
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1112
|
+
}`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new a.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK)).code.add(n.H`void forwardNormalUV(){
|
|
1113
|
+
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1114
|
+
}`)):e.vertex.code.add(n.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new a.k("emissiveTextureTransformMatrix",e=>e.emissiveTextureTransformMatrix??o.zK)).code.add(n.H`void forwardEmissiveUV(){
|
|
1115
|
+
emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1116
|
+
}`)):e.vertex.code.add(n.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new a.k("occlusionTextureTransformMatrix",e=>e.occlusionTextureTransformMatrix??o.zK)).code.add(n.H`void forwardOcclusionUV(){
|
|
1117
|
+
occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1118
|
+
}`)):e.vertex.code.add(n.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new a.k("metallicRoughnessTextureTransformMatrix",e=>e.metallicRoughnessTextureTransformMatrix??o.zK)).code.add(n.H`void forwardMetallicRoughnessUV(){
|
|
1119
|
+
metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1120
|
+
}`)):e.vertex.code.add(n.H`void forwardMetallicRoughnessUV(){}`)}},34845(e,t,r){r.d(t,{Ir:()=>u});var o=r(37585),n=r(48163),a=r(78955),i=r(91829),s=r(77108),l=r(14314),c=r(31821);function u(e){e.fragment.uniforms.add(new l.I("projInfo",e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,a.hZ)(d,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,a.hZ)(d,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera))),e.fragment.uniforms.add(new s.E("zScale",e=>0===e.camera.projectionMatrix[11]?(0,o.hZ)(m,0,1):(0,o.hZ)(m,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
1121
|
+
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
1122
|
+
}`)}const d=(0,i.vt)(),m=(0,n.vt)()},58614(e,t,r){r.d(t,{S:()=>i}),r(28421);var o=r(20304),n=r(31821),a=r(49788);function i(e,t){!function(e,t,r){const o=e.fragment,i=t.alphaDiscardMode,s=0===i;2!==i&&3!==i||o.uniforms.add(r),o.code.add(n.H`
|
|
1123
|
+
void discardOrAdjustAlpha(inout vec4 color) {
|
|
1124
|
+
${1===i?"color.a = 1.0;":`if (color.a < ${s?n.H.float(a.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,n.If)(2===i,"else { color.a = 1.0; }")}`}
|
|
1125
|
+
}
|
|
1126
|
+
`)}(e,t,new o.m("textureAlphaCutoff",e=>e.textureAlphaCutoff))}},26425(e,t,r){r.d(t,{u:()=>a});var o=r(33094),n=r(31821);function a(e){e.uniforms.add(new o.U("dpDummy",()=>1)).code.add(n.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
1127
|
+
vec3 hiD = hiA + hiB;
|
|
1128
|
+
vec3 loD = loA + loB;
|
|
1129
|
+
return dpDummy * hiD + loD;
|
|
1130
|
+
}`)}},32976(e,t,r){r.d(t,{o:()=>n});var o=r(74333);class n extends o.n{constructor(e,t){super(e,"bool",0,(r,o)=>r.setUniform1b(e,t(o)))}}},40710(e,t,r){r.d(t,{W:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"vec3",2,(o,n,a,i)=>o.setUniform3fv(e,t(n,a,i),r))}}},33079(e,t,r){r.d(t,{t:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"vec3",1,(o,n,a)=>o.setUniform3fv(e,t(n,a),r))}}},28421(e,t,r){r.d(t,{J:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"float",2,(o,n,a)=>o.setUniform1f(e,t(n,a),r))}}},20304(e,t,r){r.d(t,{m:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"float",1,(o,n,a)=>o.setUniform1f(e,t(n,a),r))}}},98353(e,t,r){r.d(t,{h:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"mat3",2,(o,n,a)=>o.setUniformMatrix3fv(e,t(n,a),r))}}},15976(e,t,r){r.d(t,{o:()=>n});var o=r(74333);class n extends o.n{constructor(e,t,r){super(e,"sampler2D",2,(o,n,a)=>o.bindTexture(e,t(n,a),r?.(n,a)))}}},63761(e,t,r){r.d(t,{N:()=>n});var o=r(74333);class n extends o.n{constructor(e,t){super(e,"sampler2D",1,(r,o,n)=>r.bindTexture(e,t(o,n)))}}},31821(e,t,r){r.d(t,{H:()=>o,If:()=>n});const o=(e,...t)=>{let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r};function n(e,t,r=""){return e?t:r}o.int=e=>e.toFixed(),o.uint=e=>`${Math.max(0,e).toFixed()}u`,o.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,o.float=e=>e.toPrecision(8)},27832(e,t,r){r.d(t,{b:()=>a});var o=r(33094),n=r(31821);function a(e,t){t.snowCover&&(e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(n.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
1131
|
+
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
1132
|
+
}
|
|
1133
|
+
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
1134
|
+
float snow = min(1.0, smoothstep(0.5, 0.55, dot(faceNormal, groundNormal)) +
|
|
1135
|
+
smoothstep(0.5, 0.55, dot(-faceNormal, groundNormal)) +
|
|
1136
|
+
smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
|
|
1137
|
+
return snow * snowCover;
|
|
1138
|
+
}`),e.code.add(n.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
|
|
1139
|
+
return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
1140
|
+
}`))}},74810(e,t,r){r.d(t,{Bt:()=>s,Jr:()=>a,SY:()=>l,mb:()=>i});var o=r(35522),n=r(51850);function a({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:a,emissiveTexture:i,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==i&&(null==s||(0,o.t2)(s,n.uY))&&null==l&&(null==a||1===a)&&(null==r||1===r)}const i=(0,n.CN)(1,1,.5),s=(0,n.CN)(0,.6,.2),l=(0,n.CN)(0,1,.2)},66211(e,t,r){function o(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/n),e.constants.add("floatBlendInputScale","float",n))}r.d(t,{H:()=>o,m:()=>n});const n=16},74333(e,t,r){r.d(t,{n:()=>o});class o{constructor(e,t,r,o,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},o)switch(r){case void 0:break;case 0:this.bind[0]=o;break;case 1:this.bind[1]=o;break;case 2:this.bind[2]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}}}]);
|