trillion3d 1.0.2 → 1.0.3-next.1
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/dist/pageWorker.js +1 -1
- package/dist/pageWorker.js.map +2 -2
- package/dist/sdk-browser/src/geometry/cluster/shippedBytes.d.ts +15 -4
- package/dist/sdk-browser/src/geometry/cluster/shippedBytes.js +56 -7
- package/dist/sdk-browser/src/gpu/noise/blueNoise.bin.js +1 -0
- package/dist/sdk-browser/src/gpu/noise/blueNoiseSource.js +6 -2
- package/dist/sdk-browser/src/lighting/direct/skinTable.bin.js +1 -0
- package/dist/sdk-browser/src/lighting/direct/skinTableSource.js +5 -2
- package/dist/sdk-browser/src/measurement/buildProvenance.js +1 -1
- package/dist/sdk-browser/src/wasm/kernels.wasm.js +1 -0
- package/dist/sdk-browser/src/wasm/sdkWasm.d.ts +4 -3
- package/dist/sdk-browser/src/wasm/sdkWasm.js +9 -5
- package/dist/sdk-core/src/contracts/base.js +1 -1
- package/dist/sdk-node/src/cli/cli.mjs +0 -0
- package/dist/trillion3d-aoCode-2JTKFXZ5.js +489 -0
- package/dist/trillion3d-assemblies-BENCUAG3.js +2 -0
- package/dist/trillion3d-audioCode-M3I6FF7A.js +2 -0
- package/dist/trillion3d-autoExposureCode-AQ3IV5LH.js +198 -0
- package/dist/trillion3d-avatarCode-RTIDGTIA.js +2 -0
- package/dist/trillion3d-bounceCode-GEAWSI3A.js +4675 -0
- package/dist/trillion3d-catalogueCode-KZ3X7U7G.js +2 -0
- package/dist/trillion3d-chunk-22KA6FS4.js +116 -0
- package/dist/trillion3d-chunk-25B7I4D5.js +177 -0
- package/dist/trillion3d-chunk-2D7RBB5X.js +132 -0
- package/dist/trillion3d-chunk-2EJ4CRNA.js +46 -0
- package/dist/trillion3d-chunk-2PKPG2QJ.js +519 -0
- package/dist/trillion3d-chunk-2YXWLU7F.js +2 -0
- package/dist/trillion3d-chunk-2ZIQ3EEG.js +12 -0
- package/dist/trillion3d-chunk-33J4ZHIV.js +113 -0
- package/dist/trillion3d-chunk-3CTKK6Y4.js +14 -0
- package/dist/trillion3d-chunk-3F65K5TK.js +2 -0
- package/dist/trillion3d-chunk-3IRHFCKO.js +2 -0
- package/dist/trillion3d-chunk-3OWQBLPF.js +2 -0
- package/dist/trillion3d-chunk-3QKVCESS.js +2 -0
- package/dist/trillion3d-chunk-3TG7TWTW.js +56 -0
- package/dist/trillion3d-chunk-3UAK2IRC.js +91 -0
- package/dist/trillion3d-chunk-3VO6VVHD.js +4 -0
- package/dist/trillion3d-chunk-3W3YJ4KI.js +4 -0
- package/dist/trillion3d-chunk-3XBFYA3P.js +2 -0
- package/dist/trillion3d-chunk-435NEAXB.js +2 -0
- package/dist/trillion3d-chunk-4JYI3X5D.js +2 -0
- package/dist/trillion3d-chunk-4KEDPBE4.js +2 -0
- package/dist/trillion3d-chunk-4KWKWEQL.js +26 -0
- package/dist/trillion3d-chunk-4Z6VA66T.js +303 -0
- package/dist/trillion3d-chunk-5243PXB7.js +2 -0
- package/dist/trillion3d-chunk-53CFT7G7.js +2 -0
- package/dist/trillion3d-chunk-53QFLAA3.js +16 -0
- package/dist/trillion3d-chunk-56N6ZOBE.js +2 -0
- package/dist/trillion3d-chunk-5E744XXD.js +17 -0
- package/dist/trillion3d-chunk-5KEW2ZOY.js +2 -0
- package/dist/trillion3d-chunk-5ORGGJA5.js +2 -0
- package/dist/trillion3d-chunk-5RMOZCQA.js +2 -0
- package/dist/trillion3d-chunk-5SJT7EQ3.js +2 -0
- package/dist/trillion3d-chunk-5TTX63XG.js +24 -0
- package/dist/trillion3d-chunk-5WEWDH7F.js +2 -0
- package/dist/trillion3d-chunk-64WTBYW5.js +328 -0
- package/dist/trillion3d-chunk-6I7I5ZYU.js +2 -0
- package/dist/trillion3d-chunk-6OYOGQUQ.js +172 -0
- package/dist/trillion3d-chunk-6PMAMKLI.js +2 -0
- package/dist/trillion3d-chunk-6S7S5WI5.js +2 -0
- package/dist/trillion3d-chunk-6UP3ZCNV.js +2 -0
- package/dist/trillion3d-chunk-6WOJ6TQD.js +2 -0
- package/dist/trillion3d-chunk-6WS2EEBU.js +86 -0
- package/dist/trillion3d-chunk-6WUY2OOX.js +68 -0
- package/dist/trillion3d-chunk-72FCWPUJ.js +2 -0
- package/dist/trillion3d-chunk-72IAEP44.js +2 -0
- package/dist/trillion3d-chunk-77FPYTBQ.js +2 -0
- package/dist/trillion3d-chunk-7AQANLZ3.js +2 -0
- package/dist/trillion3d-chunk-7ATTJ3AJ.js +27 -0
- package/dist/trillion3d-chunk-7G4WOX6B.js +583 -0
- package/dist/trillion3d-chunk-7LIWCQGR.js +2 -0
- package/dist/trillion3d-chunk-7N3FUKOD.js +155 -0
- package/dist/trillion3d-chunk-7QFOJHAZ.js +435 -0
- package/dist/trillion3d-chunk-7TIVZUM6.js +81 -0
- package/dist/trillion3d-chunk-7U7CHALH.js +2 -0
- package/dist/trillion3d-chunk-7UXM26LW.js +2 -0
- package/dist/trillion3d-chunk-7VTYT5MF.js +2 -0
- package/dist/trillion3d-chunk-A4ULELL5.js +2 -0
- package/dist/trillion3d-chunk-ADMXPAEH.js +592 -0
- package/dist/trillion3d-chunk-AFRFQ25D.js +9 -0
- package/dist/trillion3d-chunk-AIB6NXH4.js +2 -0
- package/dist/trillion3d-chunk-AIQAWNNP.js +11 -0
- package/dist/trillion3d-chunk-AMJ6I7P4.js +11 -0
- package/dist/trillion3d-chunk-AQAJMS5A.js +2 -0
- package/dist/trillion3d-chunk-ARDABN2G.js +165 -0
- package/dist/trillion3d-chunk-B3QB55EK.js +2 -0
- package/dist/trillion3d-chunk-B5NXEPES.js +2 -0
- package/dist/trillion3d-chunk-BARQSI5Q.js +2 -0
- package/dist/trillion3d-chunk-BCYA7LWA.js +2 -0
- package/dist/trillion3d-chunk-BIBJMHIN.js +125 -0
- package/dist/trillion3d-chunk-BIGALHRE.js +2 -0
- package/dist/trillion3d-chunk-BKON7HDQ.js +6 -0
- package/dist/trillion3d-chunk-BRHXHYWB.js +2 -0
- package/dist/trillion3d-chunk-BVXHXONN.js +2 -0
- package/dist/trillion3d-chunk-BWPZMIFY.js +4 -0
- package/dist/trillion3d-chunk-C2WWWTMZ.js +2 -0
- package/dist/trillion3d-chunk-C7DCG2NV.js +2 -0
- package/dist/trillion3d-chunk-CCZJZMRJ.js +2 -0
- package/dist/trillion3d-chunk-CFIW2PLU.js +76 -0
- package/dist/trillion3d-chunk-CH3UKBVF.js +6 -0
- package/dist/trillion3d-chunk-COAMUWUG.js +6 -0
- package/dist/trillion3d-chunk-CS3EWLHS.js +2 -0
- package/dist/trillion3d-chunk-CS6MYZM7.js +42 -0
- package/dist/trillion3d-chunk-CSVCHCKI.js +2 -0
- package/dist/trillion3d-chunk-CYW43B6C.js +1615 -0
- package/dist/trillion3d-chunk-D2UJO22L.js +2 -0
- package/dist/trillion3d-chunk-D5LNZFJU.js +2 -0
- package/dist/trillion3d-chunk-DJIWKT4L.js +217 -0
- package/dist/trillion3d-chunk-DNAAW2B5.js +2 -0
- package/dist/trillion3d-chunk-DOXBXQJU.js +2 -0
- package/dist/trillion3d-chunk-DQVEKWHY.js +46 -0
- package/dist/trillion3d-chunk-DQYIKRAI.js +77 -0
- package/dist/trillion3d-chunk-DX5UNL5O.js +2 -0
- package/dist/trillion3d-chunk-EF6DURKO.js +19 -0
- package/dist/trillion3d-chunk-EKH44M5H.js +438 -0
- package/dist/trillion3d-chunk-EKHMHUHO.js +2 -0
- package/dist/trillion3d-chunk-EKMPAWJU.js +2 -0
- package/dist/trillion3d-chunk-ELCIIOBC.js +2 -0
- package/dist/trillion3d-chunk-EME34J3O.js +2 -0
- package/dist/trillion3d-chunk-EMNL3VBH.js +17 -0
- package/dist/trillion3d-chunk-EOA6RIXX.js +2 -0
- package/dist/trillion3d-chunk-ESEYMHSX.js +2 -0
- package/dist/trillion3d-chunk-EVWXSXV3.js +2 -0
- package/dist/trillion3d-chunk-EW3266JI.js +2 -0
- package/dist/trillion3d-chunk-F5ZFHT7O.js +2 -0
- package/dist/trillion3d-chunk-FBPHTYO3.js +2 -0
- package/dist/trillion3d-chunk-FCITXHHL.js +2 -0
- package/dist/trillion3d-chunk-FG4VFY2I.js +2 -0
- package/dist/trillion3d-chunk-FJ6PAVLE.js +178 -0
- package/dist/trillion3d-chunk-FNZKGTZC.js +2 -0
- package/dist/trillion3d-chunk-FVKZE7SE.js +1953 -0
- package/dist/trillion3d-chunk-FXEJM7VG.js +2 -0
- package/dist/trillion3d-chunk-FYXZW5DA.js +13 -0
- package/dist/trillion3d-chunk-G3DRTVHN.js +988 -0
- package/dist/trillion3d-chunk-G4AJOGQ7.js +265 -0
- package/dist/trillion3d-chunk-GEI5JB66.js +20 -0
- package/dist/trillion3d-chunk-GHFAPXBM.js +2 -0
- package/dist/trillion3d-chunk-GI2T6FOU.js +184 -0
- package/dist/trillion3d-chunk-GJZNN5UJ.js +2 -0
- package/dist/trillion3d-chunk-GK2DII6G.js +27 -0
- package/dist/trillion3d-chunk-GPVAVLAF.js +2 -0
- package/dist/trillion3d-chunk-GTR23Z5K.js +2 -0
- package/dist/trillion3d-chunk-GVOSTFBW.js +59 -0
- package/dist/trillion3d-chunk-GYORYIF5.js +2 -0
- package/dist/trillion3d-chunk-H3DVML7I.js +2 -0
- package/dist/trillion3d-chunk-H7KLPWI5.js +2 -0
- package/dist/trillion3d-chunk-H7LQGPKQ.js +50 -0
- package/dist/trillion3d-chunk-HBJ6VZPO.js +10 -0
- package/dist/trillion3d-chunk-HBMBGWN2.js +19 -0
- package/dist/trillion3d-chunk-HBSLKLSZ.js +94 -0
- package/dist/trillion3d-chunk-HCG3ESSV.js +2 -0
- package/dist/trillion3d-chunk-HDQGK2TL.js +2 -0
- package/dist/trillion3d-chunk-HRCLDXIF.js +35 -0
- package/dist/trillion3d-chunk-HRIARS44.js +2 -0
- package/dist/trillion3d-chunk-HV2YN5CF.js +2 -0
- package/dist/trillion3d-chunk-I5M3F6OY.js +6 -0
- package/dist/trillion3d-chunk-I75EGJAB.js +2 -0
- package/dist/trillion3d-chunk-I7QRTDI7.js +125 -0
- package/dist/trillion3d-chunk-IAELZYJF.js +2 -0
- package/dist/trillion3d-chunk-ICJUDIVR.js +276 -0
- package/dist/trillion3d-chunk-IEYEFEDV.js +2 -0
- package/dist/trillion3d-chunk-IFLJYROA.js +2 -0
- package/dist/trillion3d-chunk-IFZHDHIG.js +104 -0
- package/dist/trillion3d-chunk-IHNPAPHM.js +74 -0
- package/dist/trillion3d-chunk-IJJXMYSL.js +2 -0
- package/dist/trillion3d-chunk-IJMFDLYO.js +2 -0
- package/dist/trillion3d-chunk-INTWD5DJ.js +35 -0
- package/dist/trillion3d-chunk-IWP6655A.js +2 -0
- package/dist/trillion3d-chunk-IZTRWVNI.js +771 -0
- package/dist/trillion3d-chunk-J2BIHJ55.js +2 -0
- package/dist/trillion3d-chunk-J3NX2PWF.js +54 -0
- package/dist/trillion3d-chunk-J6G75W5Q.js +45 -0
- package/dist/trillion3d-chunk-J7ML34IT.js +2 -0
- package/dist/trillion3d-chunk-JD25N5D6.js +59 -0
- package/dist/trillion3d-chunk-JDIIZKDU.js +2 -0
- package/dist/trillion3d-chunk-JHRQF53B.js +4 -0
- package/dist/trillion3d-chunk-JPN76QOL.js +2 -0
- package/dist/trillion3d-chunk-JRCGXELE.js +2 -0
- package/dist/trillion3d-chunk-JXIMDH6A.js +2 -0
- package/dist/trillion3d-chunk-K6R7UEQZ.js +27 -0
- package/dist/trillion3d-chunk-K72UANQN.js +2 -0
- package/dist/trillion3d-chunk-KKECIVIP.js +2 -0
- package/dist/trillion3d-chunk-KLGN5XV3.js +2 -0
- package/dist/trillion3d-chunk-KLIGAVUH.js +2 -0
- package/dist/trillion3d-chunk-KLP7IBDS.js +2 -0
- package/dist/trillion3d-chunk-KPFGILKK.js +285 -0
- package/dist/trillion3d-chunk-KR4PIU6F.js +2 -0
- package/dist/trillion3d-chunk-KRV5VQCR.js +4 -0
- package/dist/trillion3d-chunk-KUJMOLHB.js +2 -0
- package/dist/trillion3d-chunk-KUKNVBWH.js +167 -0
- package/dist/trillion3d-chunk-KXM3DYQH.js +2 -0
- package/dist/trillion3d-chunk-L2F5RZRX.js +2 -0
- package/dist/trillion3d-chunk-L2FRHLXI.js +18 -0
- package/dist/trillion3d-chunk-L3VCBYGD.js +2 -0
- package/dist/trillion3d-chunk-LAAPTFVW.js +2 -0
- package/dist/trillion3d-chunk-LANLTCBQ.js +607 -0
- package/dist/trillion3d-chunk-LE4HL44Z.js +2 -0
- package/dist/trillion3d-chunk-LEY2Q6DZ.js +188 -0
- package/dist/trillion3d-chunk-LMWJTQFR.js +2 -0
- package/dist/trillion3d-chunk-LQLIXMMD.js +400 -0
- package/dist/trillion3d-chunk-LTWG3NOL.js +2 -0
- package/dist/trillion3d-chunk-M773YMP6.js +2 -0
- package/dist/trillion3d-chunk-MAKYPLYF.js +13 -0
- package/dist/trillion3d-chunk-MCNOP7UR.js +2 -0
- package/dist/trillion3d-chunk-MCSS3F6E.js +40 -0
- package/dist/trillion3d-chunk-MF4CAU3R.js +2 -0
- package/dist/trillion3d-chunk-MJTRABFR.js +242 -0
- package/dist/trillion3d-chunk-MQBDHCB3.js +2 -0
- package/dist/trillion3d-chunk-MUMQYHCQ.js +82 -0
- package/dist/trillion3d-chunk-MXZGFCOM.js +1166 -0
- package/dist/trillion3d-chunk-N33FXDXZ.js +2 -0
- package/dist/trillion3d-chunk-N7EXMVTQ.js +756 -0
- package/dist/trillion3d-chunk-N7EXMVTQ.js.map +6 -0
- package/dist/trillion3d-chunk-N7YEU2CT.js +2 -0
- package/dist/trillion3d-chunk-NB7XML37.js +2 -0
- package/dist/trillion3d-chunk-NBFOHDNN.js +2 -0
- package/dist/trillion3d-chunk-NEVMYKGT.js +28 -0
- package/dist/trillion3d-chunk-NHC4DXYP.js +2 -0
- package/dist/trillion3d-chunk-NNF42O54.js +197 -0
- package/dist/trillion3d-chunk-NTHEHPA5.js +418 -0
- package/dist/trillion3d-chunk-NVYEQ3JS.js +40 -0
- package/dist/trillion3d-chunk-NZRMWUGY.js +3109 -0
- package/dist/trillion3d-chunk-OD3JBU6D.js +5 -0
- package/dist/trillion3d-chunk-OFCF3GAC.js +360 -0
- package/dist/trillion3d-chunk-OHFYUKAD.js +2 -0
- package/dist/trillion3d-chunk-OHTUNWUN.js +2 -0
- package/dist/trillion3d-chunk-OLDTBAXR.js +2537 -0
- package/dist/trillion3d-chunk-OYZFVYYH.js +107 -0
- package/dist/trillion3d-chunk-P35JRX3H.js +2 -0
- package/dist/trillion3d-chunk-P3HTLS2O.js +2 -0
- package/dist/trillion3d-chunk-P7UZ7W2B.js +377 -0
- package/dist/trillion3d-chunk-PDWU4CCX.js +2 -0
- package/dist/trillion3d-chunk-PFMAOUBW.js +70 -0
- package/dist/trillion3d-chunk-PHE5OKAE.js +277 -0
- package/dist/trillion3d-chunk-PJN3TXFS.js +14 -0
- package/dist/trillion3d-chunk-PJN3TXFS.js.map +6 -0
- package/dist/trillion3d-chunk-PMF6JTVJ.js +2 -0
- package/dist/trillion3d-chunk-PXYUWON5.js +2 -0
- package/dist/trillion3d-chunk-PYVXDVAE.js +79 -0
- package/dist/trillion3d-chunk-PZBXWJFT.js +139 -0
- package/dist/trillion3d-chunk-Q2T4HBTW.js +2 -0
- package/dist/trillion3d-chunk-QAHCZ4CN.js +2 -0
- package/dist/trillion3d-chunk-QFIAXDBJ.js +2 -0
- package/dist/trillion3d-chunk-QGHAYZR3.js +2 -0
- package/dist/trillion3d-chunk-QMREUFAO.js +2 -0
- package/dist/trillion3d-chunk-QN7VBGUP.js +2 -0
- package/dist/trillion3d-chunk-QVFWEZOK.js +318 -0
- package/dist/trillion3d-chunk-QW5YCJAB.js +100 -0
- package/dist/trillion3d-chunk-R2A7QWWZ.js +2 -0
- package/dist/trillion3d-chunk-R4BXG67P.js +2 -0
- package/dist/trillion3d-chunk-R56L2MST.js +2 -0
- package/dist/trillion3d-chunk-RLDDQEQJ.js +10 -0
- package/dist/trillion3d-chunk-RMFAMI5T.js +2 -0
- package/dist/trillion3d-chunk-ROHK5HT5.js +19 -0
- package/dist/trillion3d-chunk-RPMC2FKD.js +2 -0
- package/dist/trillion3d-chunk-RTBXAMIZ.js +113 -0
- package/dist/trillion3d-chunk-S2NA64OJ.js +2 -0
- package/dist/trillion3d-chunk-SPIIJAMX.js +34 -0
- package/dist/trillion3d-chunk-SSWVBSJZ.js +2 -0
- package/dist/trillion3d-chunk-SUDBSFLJ.js +2 -0
- package/dist/trillion3d-chunk-SUU45ZK7.js +2 -0
- package/dist/trillion3d-chunk-TFNOURGL.js +6 -0
- package/dist/trillion3d-chunk-TLIN2DEK.js +1505 -0
- package/dist/trillion3d-chunk-TLO4XKYG.js +2 -0
- package/dist/trillion3d-chunk-TVYIOVGI.js +2 -0
- package/dist/trillion3d-chunk-TY7RGAI4.js +210 -0
- package/dist/trillion3d-chunk-U5NZRFEN.js +4403 -0
- package/dist/trillion3d-chunk-U5NZRFEN.js.map +6 -0
- package/dist/trillion3d-chunk-UBSICE2S.js +26 -0
- package/dist/trillion3d-chunk-UCIL746V.js +2 -0
- package/dist/trillion3d-chunk-UGTFIP7T.js +2 -0
- package/dist/trillion3d-chunk-UH2X4DC7.js +2 -0
- package/dist/trillion3d-chunk-UL5AQCHN.js +2 -0
- package/dist/trillion3d-chunk-UMAIYYSB.js +28 -0
- package/dist/trillion3d-chunk-UROCVT3W.js +53 -0
- package/dist/trillion3d-chunk-US6WKM5M.js +2 -0
- package/dist/trillion3d-chunk-UT5VM3B7.js +2 -0
- package/dist/trillion3d-chunk-UXCQ7A3K.js +2 -0
- package/dist/trillion3d-chunk-UXQKO5IH.js +2 -0
- package/dist/trillion3d-chunk-UXRWIFOC.js +12 -0
- package/dist/trillion3d-chunk-V44TZZB3.js +2 -0
- package/dist/trillion3d-chunk-VFPDIIEP.js +2 -0
- package/dist/trillion3d-chunk-VL44QEQI.js +2 -0
- package/dist/trillion3d-chunk-VP3GS2OQ.js +553 -0
- package/dist/trillion3d-chunk-VWRK33DS.js +172 -0
- package/dist/trillion3d-chunk-W2AGULE7.js +55 -0
- package/dist/trillion3d-chunk-W4L4ZLLZ.js +25 -0
- package/dist/trillion3d-chunk-WAR4LFLB.js +2 -0
- package/dist/trillion3d-chunk-WCVRKGQD.js +2 -0
- package/dist/trillion3d-chunk-WEACAP55.js +2 -0
- package/dist/trillion3d-chunk-WG6NZENK.js +2 -0
- package/dist/trillion3d-chunk-WJ4XQVTQ.js +411 -0
- package/dist/trillion3d-chunk-WR43FBB3.js +2 -0
- package/dist/trillion3d-chunk-WXECWHZ5.js +2 -0
- package/dist/trillion3d-chunk-WYKIXSUS.js +22 -0
- package/dist/trillion3d-chunk-XBDQHYBL.js +2 -0
- package/dist/trillion3d-chunk-XEPOPZZY.js +2 -0
- package/dist/trillion3d-chunk-XEQBUJNB.js +2 -0
- package/dist/trillion3d-chunk-XL4F65A7.js +174 -0
- package/dist/trillion3d-chunk-XOAWZNRA.js +2 -0
- package/dist/trillion3d-chunk-XQHULSDL.js +30 -0
- package/dist/trillion3d-chunk-XQSMKVTL.js +2 -0
- package/dist/trillion3d-chunk-XQSU4SY6.js +2 -0
- package/dist/trillion3d-chunk-XWJQJK22.js +2 -0
- package/dist/trillion3d-chunk-XXOXGG47.js +2 -0
- package/dist/trillion3d-chunk-XY7DNXWL.js +2 -0
- package/dist/trillion3d-chunk-XYZRT3VR.js +223 -0
- package/dist/trillion3d-chunk-XZPUDNQA.js +2 -0
- package/dist/trillion3d-chunk-Y2RAGKRM.js +2 -0
- package/dist/trillion3d-chunk-YA4TWJRK.js +442 -0
- package/dist/trillion3d-chunk-YAFEYU2S.js +2 -0
- package/dist/trillion3d-chunk-YBKRRMOT.js +2 -0
- package/dist/trillion3d-chunk-YFSDLEIZ.js +85 -0
- package/dist/trillion3d-chunk-YIUAOG6X.js +2 -0
- package/dist/trillion3d-chunk-YKZXAXMM.js +11 -0
- package/dist/trillion3d-chunk-YMR3WF2W.js +2 -0
- package/dist/trillion3d-chunk-YNRZO4Y4.js +27 -0
- package/dist/trillion3d-chunk-YOXV4W6I.js +266 -0
- package/dist/trillion3d-chunk-YQT76FYC.js +2 -0
- package/dist/trillion3d-chunk-YRPBW7AK.js +2 -0
- package/dist/trillion3d-chunk-YULZ6QUZ.js +2 -0
- package/dist/trillion3d-chunk-YWWOBEV2.js +2 -0
- package/dist/trillion3d-chunk-YYWNNHNI.js +2 -0
- package/dist/trillion3d-chunk-ZBIQ6S5Z.js +173 -0
- package/dist/trillion3d-chunk-ZBXTCONH.js +2 -0
- package/dist/trillion3d-chunk-ZDNFJYCW.js +2 -0
- package/dist/trillion3d-chunk-ZF5EDFJS.js +523 -0
- package/dist/trillion3d-chunk-ZFAKVFKL.js +21 -0
- package/dist/trillion3d-chunk-ZIGGUJM6.js +2 -0
- package/dist/trillion3d-chunk-ZNJ4TNBW.js +47 -0
- package/dist/trillion3d-chunk-ZQPT2YFE.js +2 -0
- package/dist/trillion3d-chunk-ZUFX2HVV.js +14 -0
- package/dist/trillion3d-chunk-ZUQDRSYB.js +14 -0
- package/dist/trillion3d-chunk-ZVSX6CGW.js +14 -0
- package/dist/trillion3d-chunk-ZYS4E37Q.js +2 -0
- package/dist/trillion3d-chunk-ZZWX6Q7H.js +2 -0
- package/dist/trillion3d-cinematicsCode-2YP657C3.js +2 -0
- package/dist/trillion3d-cubeCapturesCode-BOLBDRJD.js +77 -0
- package/dist/trillion3d-debugViewsCode-F4KTKXOZ.js +973 -0
- package/dist/trillion3d-decalCode-4OSGACRW.js +79 -0
- package/dist/trillion3d-deformationCode-GJBRRE4B.js +235 -0
- package/dist/trillion3d-displacementCode-OS37YHNO.js +659 -0
- package/dist/trillion3d-effectCode-CNDEXEFI.js +1874 -0
- package/dist/trillion3d-explorer-3SU2HTGD.js +2 -0
- package/dist/trillion3d-export-3COKIWS6.js +2 -0
- package/dist/trillion3d-family-YNJWVKWC.js +280 -0
- package/dist/trillion3d-fieldsCode-JQLVIT4H.js +2 -0
- package/dist/trillion3d-fogCode-PM5UY2TW.js +582 -0
- package/dist/trillion3d-geometryPage-DVJ4N2A6.js +2 -0
- package/dist/trillion3d-graphCode-MCIPPACK.js +2 -0
- package/dist/trillion3d-graphCode-MOTJ4WBF.js +2 -0
- package/dist/trillion3d-grassCode-J7CCF63J.js +2 -0
- package/dist/trillion3d-guideCode-ONWTGY2H.js +47 -0
- package/dist/trillion3d-hairCode-PNWJMXWH.js +3215 -0
- package/dist/trillion3d-hardwareBenchmark-JD2ITGNS.js +132 -0
- package/dist/trillion3d-headlessCode-JAXG4XPK.js +2 -0
- package/dist/trillion3d-iesCode-QVSRIT37.js +2 -0
- package/dist/trillion3d-indicator-ZDOOX6EU.js +22 -0
- package/dist/trillion3d-installCode-5NOFNOTZ.js +426 -0
- package/dist/trillion3d-manifestLoad-TEO2A7XO.js +2 -0
- package/dist/trillion3d-markCode-DD7RPZ2V.js +164 -0
- package/dist/trillion3d-measurementCode-I6LN3Z4A.js +2 -0
- package/dist/trillion3d-measurementCode-I6LN3Z4A.js.map +6 -0
- package/dist/trillion3d-modelArrivalCode-AS2ZIO5I.js +2 -0
- package/dist/trillion3d-modelCapture-OZNK2KHI.js +2 -0
- package/dist/trillion3d-modelCopiesCode-X7PCUUUT.js +2 -0
- package/dist/trillion3d-modelImagesCode-7NZ3BIL5.js +2 -0
- package/dist/trillion3d-pageAudioCode-PQWNFXNH.js +2 -0
- package/dist/trillion3d-pageCompile-4KI5TP2J.js +34 -0
- package/dist/trillion3d-panel-4BMTNA6N.js +79 -0
- package/dist/trillion3d-particleCode-X7RJYMM2.js +574 -0
- package/dist/trillion3d-partitionCode-KNTGZUZG.js +2 -0
- package/dist/trillion3d-pathTracingCode-IUDUNO7P.js +3333 -0
- package/dist/trillion3d-planarReflectionsCode-22NVSPZ2.js +96 -0
- package/dist/trillion3d-previewRun-YOUFRKDJ.js +33 -0
- package/dist/trillion3d-ragdollCode-XOZ7BBU4.js +2 -0
- package/dist/trillion3d-ragdollStage-EGRNR3QB.js +2 -0
- package/dist/trillion3d-read-6L2UR4EJ.js +2 -0
- package/dist/trillion3d-reflectionsCode-3T6W62HT.js +2128 -0
- package/dist/trillion3d-sampledLightsCode-MSZ2YCSJ.js +1795 -0
- package/dist/trillion3d-scene-3LL23MZI.js +2 -0
- package/dist/trillion3d-session-S4GIQNV6.js +2 -0
- package/dist/trillion3d-shadowsCode-UZNPLVCV.js +3667 -0
- package/dist/trillion3d-skyCode-BYIIBWAM.js +2212 -0
- package/dist/trillion3d-sortedTranslucencyCode-VLSTGX5S.js +181 -0
- package/dist/trillion3d-splineMeshCode-AWDX5BIG.js +2 -0
- package/dist/trillion3d-subsurfaceCode-PROXJTLS.js +732 -0
- package/dist/trillion3d-surfaceCode-CW2NSI5O.js +2 -0
- package/dist/trillion3d-terrainCode-ZDONXR5X.js +2 -0
- package/dist/trillion3d-transformCode-SE55EUCN.js +2 -0
- package/dist/trillion3d-translucentLightVolumeCode-EQKMCGMD.js +195 -0
- package/dist/trillion3d-viewCode-52L7D5ZW.js +18 -0
- package/dist/trillion3d-volumesCode-NYAC6KYU.js +2334 -0
- package/dist/trillion3d-waterCode-CWZ5XYNU.js +102 -0
- package/dist/trillion3d-webgpuCode-2GNPUWQ4.js +1646 -0
- package/dist/trillion3d-workCode-DCC25A2D.js +2 -0
- package/dist/trillion3d-worldRootPages-P75VSIXR.js +2 -0
- package/dist/trillion3d.module.js +1 -1
- package/dist/trillion3d.module.js.modules.json +1 -1
- package/package.json +2 -2
- package/dist/trillion3d-aoCode-T2V54NAO.js +0 -489
- package/dist/trillion3d-assemblies-3DUP5X66.js +0 -2
- package/dist/trillion3d-audioCode-53XT65XV.js +0 -2
- package/dist/trillion3d-autoExposureCode-B5KISRSD.js +0 -198
- package/dist/trillion3d-avatarCode-AZDPGA73.js +0 -2
- package/dist/trillion3d-bounceCode-AZC4HMJI.js +0 -4675
- package/dist/trillion3d-catalogueCode-ZAOFZQLB.js +0 -2
- package/dist/trillion3d-chunk-2BOYJZCQ.js +0 -2
- package/dist/trillion3d-chunk-2CZ6RWTW.js +0 -607
- package/dist/trillion3d-chunk-2HSBVYCY.js +0 -2
- package/dist/trillion3d-chunk-2JAAFFQC.js +0 -438
- package/dist/trillion3d-chunk-2JCF4HLE.js +0 -132
- package/dist/trillion3d-chunk-2JM7B67K.js +0 -2
- package/dist/trillion3d-chunk-2KRIKK4D.js +0 -2
- package/dist/trillion3d-chunk-2L52NUG7.js +0 -2
- package/dist/trillion3d-chunk-2MVQXOFZ.js +0 -2
- package/dist/trillion3d-chunk-2OFUDJNU.js +0 -2
- package/dist/trillion3d-chunk-2PBJSBLO.js +0 -46
- package/dist/trillion3d-chunk-2TYAUOQ5.js +0 -2
- package/dist/trillion3d-chunk-2VZIVK5U.js +0 -2
- package/dist/trillion3d-chunk-36VHFR62.js +0 -2
- package/dist/trillion3d-chunk-3BY2FPRS.js +0 -2
- package/dist/trillion3d-chunk-3EPZT7SR.js +0 -167
- package/dist/trillion3d-chunk-3GEQFGGV.js +0 -360
- package/dist/trillion3d-chunk-3H2OZEPR.js +0 -2
- package/dist/trillion3d-chunk-3HE5HBCK.js +0 -14
- package/dist/trillion3d-chunk-3HPFLXCF.js +0 -125
- package/dist/trillion3d-chunk-42JJO5YV.js +0 -771
- package/dist/trillion3d-chunk-44GU3ERA.js +0 -756
- package/dist/trillion3d-chunk-44GU3ERA.js.map +0 -6
- package/dist/trillion3d-chunk-46P46SRG.js +0 -2
- package/dist/trillion3d-chunk-472QQ27C.js +0 -2
- package/dist/trillion3d-chunk-4BOD343S.js +0 -2
- package/dist/trillion3d-chunk-4JBRHV7G.js +0 -174
- package/dist/trillion3d-chunk-4KXFERR4.js +0 -2
- package/dist/trillion3d-chunk-5ASFLMJ6.js +0 -583
- package/dist/trillion3d-chunk-5B3ML3DL.js +0 -2
- package/dist/trillion3d-chunk-5COTXELO.js +0 -2
- package/dist/trillion3d-chunk-5GW525BI.js +0 -2
- package/dist/trillion3d-chunk-5GY24CJD.js +0 -2
- package/dist/trillion3d-chunk-5HWOHERQ.js +0 -2
- package/dist/trillion3d-chunk-5K6QSSBR.js +0 -2
- package/dist/trillion3d-chunk-5KHPSLRC.js +0 -2
- package/dist/trillion3d-chunk-5LQDA7UM.js +0 -2
- package/dist/trillion3d-chunk-5O2GDLHX.js +0 -2
- package/dist/trillion3d-chunk-5ONOJMSW.js +0 -2
- package/dist/trillion3d-chunk-5Q666YQV.js +0 -519
- package/dist/trillion3d-chunk-5ROJIVV3.js +0 -20
- package/dist/trillion3d-chunk-5VVVL3GH.js +0 -2
- package/dist/trillion3d-chunk-5VX27QFH.js +0 -2
- package/dist/trillion3d-chunk-6VDAUYE6.js +0 -2
- package/dist/trillion3d-chunk-6VPPLI5X.js +0 -46
- package/dist/trillion3d-chunk-6Y7TZO62.js +0 -523
- package/dist/trillion3d-chunk-742WGJYH.js +0 -2
- package/dist/trillion3d-chunk-74PQZHDK.js +0 -104
- package/dist/trillion3d-chunk-77T2WOXU.js +0 -2
- package/dist/trillion3d-chunk-7C5HNDEL.js +0 -2
- package/dist/trillion3d-chunk-7CGRPLOC.js +0 -188
- package/dist/trillion3d-chunk-7CSS2AWO.js +0 -94
- package/dist/trillion3d-chunk-7F2KAZFC.js +0 -2
- package/dist/trillion3d-chunk-7IZI5OZK.js +0 -2
- package/dist/trillion3d-chunk-7NZTUQYT.js +0 -592
- package/dist/trillion3d-chunk-7QYR7QUU.js +0 -13
- package/dist/trillion3d-chunk-7XEWHG3S.js +0 -223
- package/dist/trillion3d-chunk-AA2V3CRQ.js +0 -2
- package/dist/trillion3d-chunk-AA6W2SUV.js +0 -77
- package/dist/trillion3d-chunk-ABKLIRWX.js +0 -2
- package/dist/trillion3d-chunk-ADUR3TJH.js +0 -76
- package/dist/trillion3d-chunk-AEW6BD4P.js +0 -2
- package/dist/trillion3d-chunk-AU725OCC.js +0 -2
- package/dist/trillion3d-chunk-AYCFHOHV.js +0 -2
- package/dist/trillion3d-chunk-AYJO3NNO.js +0 -2
- package/dist/trillion3d-chunk-AZ6SQT7V.js +0 -1953
- package/dist/trillion3d-chunk-AZHGOCPF.js +0 -2
- package/dist/trillion3d-chunk-B3ATF6PP.js +0 -418
- package/dist/trillion3d-chunk-B3ECL3UB.js +0 -24
- package/dist/trillion3d-chunk-BDWRLDJI.js +0 -3109
- package/dist/trillion3d-chunk-BGNYLCJW.js +0 -303
- package/dist/trillion3d-chunk-BS3H5DRX.js +0 -2
- package/dist/trillion3d-chunk-BUP4DDEO.js +0 -2
- package/dist/trillion3d-chunk-BZAV5BK7.js +0 -2
- package/dist/trillion3d-chunk-C2QSQDHV.js +0 -4403
- package/dist/trillion3d-chunk-C2QSQDHV.js.map +0 -6
- package/dist/trillion3d-chunk-CBPJFYIU.js +0 -172
- package/dist/trillion3d-chunk-CD7EZNRP.js +0 -53
- package/dist/trillion3d-chunk-CJHN7L75.js +0 -2
- package/dist/trillion3d-chunk-CMHKMP7M.js +0 -6
- package/dist/trillion3d-chunk-CPLMDH47.js +0 -2
- package/dist/trillion3d-chunk-CQESL7F5.js +0 -28
- package/dist/trillion3d-chunk-CVJOTXK5.js +0 -2
- package/dist/trillion3d-chunk-D4DXAQPJ.js +0 -4
- package/dist/trillion3d-chunk-DA3S4LZH.js +0 -34
- package/dist/trillion3d-chunk-DPXM3DHU.js +0 -2
- package/dist/trillion3d-chunk-DUWMZGSW.js +0 -18
- package/dist/trillion3d-chunk-DZ5A6N23.js +0 -11
- package/dist/trillion3d-chunk-E2VRYXCO.js +0 -55
- package/dist/trillion3d-chunk-E4N7LNGP.js +0 -2
- package/dist/trillion3d-chunk-E5M5PMK3.js +0 -2
- package/dist/trillion3d-chunk-EAHDFM7D.js +0 -139
- package/dist/trillion3d-chunk-ECWU67MC.js +0 -54
- package/dist/trillion3d-chunk-EI2XZGZC.js +0 -2
- package/dist/trillion3d-chunk-EIOQWCJW.js +0 -35
- package/dist/trillion3d-chunk-EO2IHUHA.js +0 -2
- package/dist/trillion3d-chunk-ESO5KVG2.js +0 -2
- package/dist/trillion3d-chunk-ETCQFZ4S.js +0 -435
- package/dist/trillion3d-chunk-EU4OYQGR.js +0 -2
- package/dist/trillion3d-chunk-EUCLXLYS.js +0 -2
- package/dist/trillion3d-chunk-EZ2JYRNP.js +0 -70
- package/dist/trillion3d-chunk-F2BKXVDP.js +0 -59
- package/dist/trillion3d-chunk-F4TG7DXL.js +0 -2
- package/dist/trillion3d-chunk-FBPR5PIL.js +0 -2
- package/dist/trillion3d-chunk-FDP5PHNI.js +0 -17
- package/dist/trillion3d-chunk-FJRD6RXY.js +0 -4
- package/dist/trillion3d-chunk-FLJAAUWJ.js +0 -2
- package/dist/trillion3d-chunk-FPH3NDSE.js +0 -2
- package/dist/trillion3d-chunk-FYTCEF3P.js +0 -2
- package/dist/trillion3d-chunk-G4ZEQPJE.js +0 -2
- package/dist/trillion3d-chunk-G5MFUE5P.js +0 -2
- package/dist/trillion3d-chunk-G6HYU5QH.js +0 -2
- package/dist/trillion3d-chunk-GJAAOF62.js +0 -2
- package/dist/trillion3d-chunk-GOFFACVN.js +0 -210
- package/dist/trillion3d-chunk-GPKNAWFR.js +0 -2
- package/dist/trillion3d-chunk-GTJAMKXA.js +0 -2
- package/dist/trillion3d-chunk-GUWCZ2WR.js +0 -40
- package/dist/trillion3d-chunk-GXDVY3QD.js +0 -2
- package/dist/trillion3d-chunk-GXMTFTCW.js +0 -2
- package/dist/trillion3d-chunk-H5B36GHI.js +0 -2
- package/dist/trillion3d-chunk-HBFRB6UY.js +0 -79
- package/dist/trillion3d-chunk-HCXQHHY4.js +0 -2
- package/dist/trillion3d-chunk-HDA6WCOZ.js +0 -2
- package/dist/trillion3d-chunk-HTCY6CIU.js +0 -19
- package/dist/trillion3d-chunk-I2L32YAH.js +0 -10
- package/dist/trillion3d-chunk-I4HFBLVO.js +0 -2
- package/dist/trillion3d-chunk-I5PD2IYL.js +0 -2
- package/dist/trillion3d-chunk-I63LRS3P.js +0 -2
- package/dist/trillion3d-chunk-I7R4YZP2.js +0 -6
- package/dist/trillion3d-chunk-ICWUGQNV.js +0 -2
- package/dist/trillion3d-chunk-IGBD22JD.js +0 -155
- package/dist/trillion3d-chunk-IGH6C5NL.js +0 -2
- package/dist/trillion3d-chunk-IVAI2C6D.js +0 -2
- package/dist/trillion3d-chunk-IWBFD73G.js +0 -173
- package/dist/trillion3d-chunk-J2KR4G6F.js +0 -74
- package/dist/trillion3d-chunk-J2YDEAKO.js +0 -553
- package/dist/trillion3d-chunk-J5SMDUDO.js +0 -2
- package/dist/trillion3d-chunk-JCTPF4CK.js +0 -14
- package/dist/trillion3d-chunk-JFCEIZBH.js +0 -2
- package/dist/trillion3d-chunk-JH7I4RDZ.js +0 -25
- package/dist/trillion3d-chunk-JLJSXR5R.js +0 -2
- package/dist/trillion3d-chunk-JN2SWJKC.js +0 -178
- package/dist/trillion3d-chunk-JO55XZVA.js +0 -1615
- package/dist/trillion3d-chunk-JOPRGF7Z.js +0 -2
- package/dist/trillion3d-chunk-JQ2VUCTW.js +0 -2
- package/dist/trillion3d-chunk-JRLCX4ZB.js +0 -2
- package/dist/trillion3d-chunk-JRVTAQY2.js +0 -2
- package/dist/trillion3d-chunk-JVNGK4EV.js +0 -113
- package/dist/trillion3d-chunk-JXEBQPRX.js +0 -2
- package/dist/trillion3d-chunk-K3434KA7.js +0 -59
- package/dist/trillion3d-chunk-K364ZTPY.js +0 -27
- package/dist/trillion3d-chunk-K5D3PLUN.js +0 -2
- package/dist/trillion3d-chunk-KCXWBXK2.js +0 -2
- package/dist/trillion3d-chunk-KEIULYWY.js +0 -45
- package/dist/trillion3d-chunk-KEQDYXLL.js +0 -2
- package/dist/trillion3d-chunk-KITYCFGK.js +0 -2
- package/dist/trillion3d-chunk-KJXQTIKM.js +0 -2
- package/dist/trillion3d-chunk-KS3GXZPA.js +0 -184
- package/dist/trillion3d-chunk-KTGIIVAQ.js +0 -47
- package/dist/trillion3d-chunk-KU7R2CLN.js +0 -2
- package/dist/trillion3d-chunk-KWS6MEDX.js +0 -2
- package/dist/trillion3d-chunk-KYDPV56Z.js +0 -265
- package/dist/trillion3d-chunk-LB2MHAHM.js +0 -85
- package/dist/trillion3d-chunk-LE7PGKD4.js +0 -86
- package/dist/trillion3d-chunk-LHCO3J7M.js +0 -2
- package/dist/trillion3d-chunk-LHFBY6CF.js +0 -276
- package/dist/trillion3d-chunk-LHHZH3SV.js +0 -2
- package/dist/trillion3d-chunk-LV5NP2OD.js +0 -2
- package/dist/trillion3d-chunk-LZSYLDTU.js +0 -100
- package/dist/trillion3d-chunk-M2AYPZAT.js +0 -2
- package/dist/trillion3d-chunk-M2F7Q77E.js +0 -277
- package/dist/trillion3d-chunk-M63PPBDR.js +0 -2
- package/dist/trillion3d-chunk-MBN7REAP.js +0 -2
- package/dist/trillion3d-chunk-MCIY254D.js +0 -26
- package/dist/trillion3d-chunk-MEMYKAVP.js +0 -197
- package/dist/trillion3d-chunk-MH3RWDUK.js +0 -56
- package/dist/trillion3d-chunk-MLBX4WMV.js +0 -2
- package/dist/trillion3d-chunk-MQEVNNBK.js +0 -2
- package/dist/trillion3d-chunk-MUZUZS2F.js +0 -2
- package/dist/trillion3d-chunk-N45WPUNA.js +0 -2
- package/dist/trillion3d-chunk-N76JAZ32.js +0 -68
- package/dist/trillion3d-chunk-NFFLZRMN.js +0 -2
- package/dist/trillion3d-chunk-NH3GZRI7.js +0 -2
- package/dist/trillion3d-chunk-NH7JVT4M.js +0 -2
- package/dist/trillion3d-chunk-NJW7NEZW.js +0 -2
- package/dist/trillion3d-chunk-NQT36E2Z.js +0 -28
- package/dist/trillion3d-chunk-NUSOZ5NQ.js +0 -16
- package/dist/trillion3d-chunk-O3H5RZXC.js +0 -14
- package/dist/trillion3d-chunk-O3H5RZXC.js.map +0 -6
- package/dist/trillion3d-chunk-O3OYDVQH.js +0 -2
- package/dist/trillion3d-chunk-O6RA4K6A.js +0 -2
- package/dist/trillion3d-chunk-OG5M47HN.js +0 -6
- package/dist/trillion3d-chunk-OOOINENB.js +0 -2
- package/dist/trillion3d-chunk-OPFDHDV7.js +0 -2
- package/dist/trillion3d-chunk-OVVY7IKC.js +0 -2
- package/dist/trillion3d-chunk-OXKMBXZD.js +0 -2
- package/dist/trillion3d-chunk-P2RDFAA2.js +0 -1166
- package/dist/trillion3d-chunk-P4Q7TPID.js +0 -40
- package/dist/trillion3d-chunk-P74SV4JJ.js +0 -328
- package/dist/trillion3d-chunk-P75YOB5K.js +0 -27
- package/dist/trillion3d-chunk-PN2YD2PU.js +0 -27
- package/dist/trillion3d-chunk-POPUJ5RT.js +0 -4
- package/dist/trillion3d-chunk-PPUZR76B.js +0 -11
- package/dist/trillion3d-chunk-PQH6Z3ZK.js +0 -19
- package/dist/trillion3d-chunk-PSMSPY5U.js +0 -2
- package/dist/trillion3d-chunk-PU4JWKCC.js +0 -2
- package/dist/trillion3d-chunk-PUS6DQHP.js +0 -2
- package/dist/trillion3d-chunk-Q4XTYMSK.js +0 -2
- package/dist/trillion3d-chunk-QCE7DOXK.js +0 -21
- package/dist/trillion3d-chunk-QDNYR3XW.js +0 -2
- package/dist/trillion3d-chunk-QEJGU4DQ.js +0 -217
- package/dist/trillion3d-chunk-QFWHSCJS.js +0 -2
- package/dist/trillion3d-chunk-QGELETHW.js +0 -2
- package/dist/trillion3d-chunk-QHLP3RMM.js +0 -2
- package/dist/trillion3d-chunk-QJVAWFWA.js +0 -2
- package/dist/trillion3d-chunk-QLEZIRFO.js +0 -2
- package/dist/trillion3d-chunk-QNKA4ESA.js +0 -2
- package/dist/trillion3d-chunk-QOKJKCXP.js +0 -442
- package/dist/trillion3d-chunk-QPNQ6MAU.js +0 -35
- package/dist/trillion3d-chunk-QW7R4JSU.js +0 -6
- package/dist/trillion3d-chunk-QWRJTGQA.js +0 -4
- package/dist/trillion3d-chunk-QZURF55R.js +0 -2
- package/dist/trillion3d-chunk-R3HHRSA5.js +0 -82
- package/dist/trillion3d-chunk-RB22IHFT.js +0 -27
- package/dist/trillion3d-chunk-RUOI3D3D.js +0 -2
- package/dist/trillion3d-chunk-S25VCORA.js +0 -2
- package/dist/trillion3d-chunk-S2JLIIRM.js +0 -10
- package/dist/trillion3d-chunk-S47ADXWU.js +0 -30
- package/dist/trillion3d-chunk-S4NKU3YU.js +0 -14
- package/dist/trillion3d-chunk-S4P42ZHN.js +0 -2
- package/dist/trillion3d-chunk-SAYEA3NT.js +0 -2
- package/dist/trillion3d-chunk-SCJINCDV.js +0 -2
- package/dist/trillion3d-chunk-SG3C5SMX.js +0 -2
- package/dist/trillion3d-chunk-SIPUEAJ5.js +0 -266
- package/dist/trillion3d-chunk-SKH3XZ4Q.js +0 -2
- package/dist/trillion3d-chunk-SLLV2LYS.js +0 -2
- package/dist/trillion3d-chunk-SM64HJZI.js +0 -2
- package/dist/trillion3d-chunk-SYQOPTR2.js +0 -165
- package/dist/trillion3d-chunk-T43PRG7O.js +0 -2
- package/dist/trillion3d-chunk-TI3PM7XW.js +0 -2
- package/dist/trillion3d-chunk-TLVZXCTJ.js +0 -2537
- package/dist/trillion3d-chunk-TWFQBYBV.js +0 -14
- package/dist/trillion3d-chunk-TZ3XBBRE.js +0 -12
- package/dist/trillion3d-chunk-U3CLZW3E.js +0 -2
- package/dist/trillion3d-chunk-U4EL7JGK.js +0 -2
- package/dist/trillion3d-chunk-UBMIQXK3.js +0 -2
- package/dist/trillion3d-chunk-UBW2ZWPI.js +0 -26
- package/dist/trillion3d-chunk-UCGD7DGZ.js +0 -2
- package/dist/trillion3d-chunk-UH663TJS.js +0 -125
- package/dist/trillion3d-chunk-UHWPSNJD.js +0 -177
- package/dist/trillion3d-chunk-UL2YJ52J.js +0 -2
- package/dist/trillion3d-chunk-UPJHDFQP.js +0 -2
- package/dist/trillion3d-chunk-UR2BLLWY.js +0 -2
- package/dist/trillion3d-chunk-URIYQIA6.js +0 -116
- package/dist/trillion3d-chunk-URXU62XN.js +0 -2
- package/dist/trillion3d-chunk-UTTH7HS7.js +0 -2
- package/dist/trillion3d-chunk-UX44ZL4D.js +0 -2
- package/dist/trillion3d-chunk-UXRH76J5.js +0 -17
- package/dist/trillion3d-chunk-V2BAFU66.js +0 -2
- package/dist/trillion3d-chunk-V4M3HNJD.js +0 -318
- package/dist/trillion3d-chunk-V6HD2TKX.js +0 -2
- package/dist/trillion3d-chunk-V6VZ5QXG.js +0 -2
- package/dist/trillion3d-chunk-VCIRYPE7.js +0 -2
- package/dist/trillion3d-chunk-VGIJRZO5.js +0 -400
- package/dist/trillion3d-chunk-VQ7DWMHP.js +0 -2
- package/dist/trillion3d-chunk-VYQB6KF6.js +0 -2
- package/dist/trillion3d-chunk-W42TUOJC.js +0 -285
- package/dist/trillion3d-chunk-W4SMNFPI.js +0 -2
- package/dist/trillion3d-chunk-WFPJ35TV.js +0 -2
- package/dist/trillion3d-chunk-WJBLDQVZ.js +0 -19
- package/dist/trillion3d-chunk-WLOE6LQT.js +0 -42
- package/dist/trillion3d-chunk-WMW4G2T3.js +0 -12
- package/dist/trillion3d-chunk-WOE7ECLG.js +0 -172
- package/dist/trillion3d-chunk-WPZHDV22.js +0 -6
- package/dist/trillion3d-chunk-WUZB5LTJ.js +0 -50
- package/dist/trillion3d-chunk-X2FMWMUT.js +0 -988
- package/dist/trillion3d-chunk-XAWENX7C.js +0 -81
- package/dist/trillion3d-chunk-XHUSYLI3.js +0 -2
- package/dist/trillion3d-chunk-XI6O5F6V.js +0 -11
- package/dist/trillion3d-chunk-XM5IBOQ3.js +0 -2
- package/dist/trillion3d-chunk-XS7FCVOV.js +0 -2
- package/dist/trillion3d-chunk-XUD7A3GH.js +0 -2
- package/dist/trillion3d-chunk-XXCX4QIN.js +0 -377
- package/dist/trillion3d-chunk-XYMF73ZW.js +0 -107
- package/dist/trillion3d-chunk-XYP27BGE.js +0 -2
- package/dist/trillion3d-chunk-Y2DWPDRM.js +0 -5
- package/dist/trillion3d-chunk-Y322OCAR.js +0 -2
- package/dist/trillion3d-chunk-Y3SDC6TY.js +0 -2
- package/dist/trillion3d-chunk-Y42MTEVG.js +0 -2
- package/dist/trillion3d-chunk-Y4MIWQBS.js +0 -2
- package/dist/trillion3d-chunk-YI2MFQEG.js +0 -2
- package/dist/trillion3d-chunk-YIE3H5JS.js +0 -411
- package/dist/trillion3d-chunk-YON3TSAG.js +0 -4
- package/dist/trillion3d-chunk-YQC77N7M.js +0 -2
- package/dist/trillion3d-chunk-YTL2XIXN.js +0 -2
- package/dist/trillion3d-chunk-YWUEHJ6S.js +0 -2
- package/dist/trillion3d-chunk-YZARCC7T.js +0 -91
- package/dist/trillion3d-chunk-Z6ISTRN2.js +0 -2
- package/dist/trillion3d-chunk-ZDT7Z7AV.js +0 -2
- package/dist/trillion3d-chunk-ZFEJXND5.js +0 -9
- package/dist/trillion3d-chunk-ZGWEZTGI.js +0 -2
- package/dist/trillion3d-chunk-ZHRUP5WY.js +0 -2
- package/dist/trillion3d-chunk-ZHV4B2CP.js +0 -2
- package/dist/trillion3d-chunk-ZKTXPZUU.js +0 -2
- package/dist/trillion3d-chunk-ZM6OWZBZ.js +0 -1505
- package/dist/trillion3d-chunk-ZNNO6SDC.js +0 -2
- package/dist/trillion3d-chunk-ZSKD2IX5.js +0 -2
- package/dist/trillion3d-chunk-ZSTYK7WY.js +0 -2
- package/dist/trillion3d-chunk-ZTNOBS5G.js +0 -13
- package/dist/trillion3d-chunk-ZTYP3T5T.js +0 -2
- package/dist/trillion3d-chunk-ZUU5E7FO.js +0 -2
- package/dist/trillion3d-chunk-ZVO6IOK3.js +0 -22
- package/dist/trillion3d-chunk-ZWZTGI5M.js +0 -113
- package/dist/trillion3d-chunk-ZXF6BEYU.js +0 -242
- package/dist/trillion3d-chunk-ZXGUNSUQ.js +0 -2
- package/dist/trillion3d-cinematicsCode-5UPGQFVV.js +0 -2
- package/dist/trillion3d-cubeCapturesCode-LCBK47X5.js +0 -77
- package/dist/trillion3d-debugViewsCode-7GJW7RDI.js +0 -973
- package/dist/trillion3d-decalCode-ID2FWTA7.js +0 -79
- package/dist/trillion3d-deformationCode-PIIEMRNF.js +0 -235
- package/dist/trillion3d-displacementCode-ZMPJRUDW.js +0 -659
- package/dist/trillion3d-effectCode-J22OGAGG.js +0 -1874
- package/dist/trillion3d-explorer-JTT6UBU6.js +0 -2
- package/dist/trillion3d-export-H3WTWO2M.js +0 -2
- package/dist/trillion3d-family-IM6JIBGG.js +0 -280
- package/dist/trillion3d-fieldsCode-QD2TBZOM.js +0 -2
- package/dist/trillion3d-fogCode-PNHAG2DD.js +0 -582
- package/dist/trillion3d-geometryPage-3J5Q2EZN.js +0 -2
- package/dist/trillion3d-graphCode-DWZUBHZQ.js +0 -2
- package/dist/trillion3d-graphCode-HGVQ47X4.js +0 -2
- package/dist/trillion3d-grassCode-HASCTGFB.js +0 -2
- package/dist/trillion3d-guideCode-XKNU3UOB.js +0 -47
- package/dist/trillion3d-hairCode-VUMV4M33.js +0 -3215
- package/dist/trillion3d-hardwareBenchmark-H2SLAEER.js +0 -132
- package/dist/trillion3d-headlessCode-3KBNVKND.js +0 -2
- package/dist/trillion3d-iesCode-GVJDBPQY.js +0 -2
- package/dist/trillion3d-indicator-VCCCRO7K.js +0 -22
- package/dist/trillion3d-installCode-GDJ6EA73.js +0 -426
- package/dist/trillion3d-manifestLoad-Y2XKGXCD.js +0 -2
- package/dist/trillion3d-markCode-VYWQBD3K.js +0 -164
- package/dist/trillion3d-measurementCode-FGD5D2RI.js +0 -2
- package/dist/trillion3d-measurementCode-FGD5D2RI.js.map +0 -6
- package/dist/trillion3d-modelArrivalCode-ENI7UWDQ.js +0 -2
- package/dist/trillion3d-modelCapture-BMLNM2DT.js +0 -2
- package/dist/trillion3d-modelCopiesCode-7JYQXGVF.js +0 -2
- package/dist/trillion3d-modelImagesCode-C3O4XMTN.js +0 -2
- package/dist/trillion3d-pageAudioCode-JV4TWD5B.js +0 -2
- package/dist/trillion3d-pageCompile-YNZYXLLY.js +0 -34
- package/dist/trillion3d-panel-RYDJZQFJ.js +0 -79
- package/dist/trillion3d-particleCode-244NV3QC.js +0 -574
- package/dist/trillion3d-partitionCode-LJW6NXJO.js +0 -2
- package/dist/trillion3d-pathTracingCode-PY4YXX2K.js +0 -3333
- package/dist/trillion3d-planarReflectionsCode-3HPS33JS.js +0 -96
- package/dist/trillion3d-previewRun-MYYO5L7K.js +0 -33
- package/dist/trillion3d-ragdollCode-Q2F4YXCT.js +0 -2
- package/dist/trillion3d-ragdollStage-673NKNJC.js +0 -2
- package/dist/trillion3d-read-KTRGUDEK.js +0 -2
- package/dist/trillion3d-reflectionsCode-EYZ2I2RG.js +0 -2128
- package/dist/trillion3d-sampledLightsCode-44YPQANZ.js +0 -1795
- package/dist/trillion3d-scene-VDR67XPZ.js +0 -2
- package/dist/trillion3d-session-V5UGVDGM.js +0 -2
- package/dist/trillion3d-shadowsCode-IGFSPJZS.js +0 -3667
- package/dist/trillion3d-skyCode-VIAPJ6TS.js +0 -2212
- package/dist/trillion3d-sortedTranslucencyCode-ENOIPRNP.js +0 -181
- package/dist/trillion3d-splineMeshCode-X6CFRALJ.js +0 -2
- package/dist/trillion3d-subsurfaceCode-L36SYFNH.js +0 -732
- package/dist/trillion3d-surfaceCode-J3JUDHSC.js +0 -2
- package/dist/trillion3d-terrainCode-BHCQQRET.js +0 -2
- package/dist/trillion3d-transformCode-74Z7PQYM.js +0 -2
- package/dist/trillion3d-translucentLightVolumeCode-3HU4TBPQ.js +0 -195
- package/dist/trillion3d-viewCode-IXEIJJWS.js +0 -18
- package/dist/trillion3d-volumesCode-RDBBXG3U.js +0 -2334
- package/dist/trillion3d-waterCode-3ZRB2JP7.js +0 -102
- package/dist/trillion3d-webgpuCode-BQTJL2EM.js +0 -1646
- package/dist/trillion3d-workCode-V42SMDJA.js +0 -2
- package/dist/trillion3d-worldRootPages-3SFAHS63.js +0 -2
- /package/dist/{trillion3d-aoCode-T2V54NAO.js.map → trillion3d-aoCode-2JTKFXZ5.js.map} +0 -0
- /package/dist/{trillion3d-assemblies-3DUP5X66.js.map → trillion3d-assemblies-BENCUAG3.js.map} +0 -0
- /package/dist/{trillion3d-audioCode-53XT65XV.js.map → trillion3d-audioCode-M3I6FF7A.js.map} +0 -0
- /package/dist/{trillion3d-autoExposureCode-B5KISRSD.js.map → trillion3d-autoExposureCode-AQ3IV5LH.js.map} +0 -0
- /package/dist/{trillion3d-avatarCode-AZDPGA73.js.map → trillion3d-avatarCode-RTIDGTIA.js.map} +0 -0
- /package/dist/{trillion3d-bounceCode-AZC4HMJI.js.map → trillion3d-bounceCode-GEAWSI3A.js.map} +0 -0
- /package/dist/{trillion3d-catalogueCode-ZAOFZQLB.js.map → trillion3d-catalogueCode-KZ3X7U7G.js.map} +0 -0
- /package/dist/{trillion3d-chunk-URIYQIA6.js.map → trillion3d-chunk-22KA6FS4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UHWPSNJD.js.map → trillion3d-chunk-25B7I4D5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2JCF4HLE.js.map → trillion3d-chunk-2D7RBB5X.js.map} +0 -0
- /package/dist/{trillion3d-chunk-6VPPLI5X.js.map → trillion3d-chunk-2EJ4CRNA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5Q666YQV.js.map → trillion3d-chunk-2PKPG2QJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AZHGOCPF.js.map → trillion3d-chunk-2YXWLU7F.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WMW4G2T3.js.map → trillion3d-chunk-2ZIQ3EEG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZWZTGI5M.js.map → trillion3d-chunk-33J4ZHIV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3HE5HBCK.js.map → trillion3d-chunk-3CTKK6Y4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5O2GDLHX.js.map → trillion3d-chunk-3F65K5TK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-BS3H5DRX.js.map → trillion3d-chunk-3IRHFCKO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QNKA4ESA.js.map → trillion3d-chunk-3OWQBLPF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3H2OZEPR.js.map → trillion3d-chunk-3QKVCESS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MH3RWDUK.js.map → trillion3d-chunk-3TG7TWTW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YZARCC7T.js.map → trillion3d-chunk-3UAK2IRC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QWRJTGQA.js.map → trillion3d-chunk-3VO6VVHD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YON3TSAG.js.map → trillion3d-chunk-3W3YJ4KI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-I4HFBLVO.js.map → trillion3d-chunk-3XBFYA3P.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QJVAWFWA.js.map → trillion3d-chunk-435NEAXB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-E4N7LNGP.js.map → trillion3d-chunk-4JYI3X5D.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SG3C5SMX.js.map → trillion3d-chunk-4KEDPBE4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UBW2ZWPI.js.map → trillion3d-chunk-4KWKWEQL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-BGNYLCJW.js.map → trillion3d-chunk-4Z6VA66T.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GJAAOF62.js.map → trillion3d-chunk-5243PXB7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-VQ7DWMHP.js.map → trillion3d-chunk-53CFT7G7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NUSOZ5NQ.js.map → trillion3d-chunk-53QFLAA3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-I5PD2IYL.js.map → trillion3d-chunk-56N6ZOBE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UXRH76J5.js.map → trillion3d-chunk-5E744XXD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NJW7NEZW.js.map → trillion3d-chunk-5KEW2ZOY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KCXWBXK2.js.map → trillion3d-chunk-5ORGGJA5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XS7FCVOV.js.map → trillion3d-chunk-5RMOZCQA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AA2V3CRQ.js.map → trillion3d-chunk-5SJT7EQ3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-B3ECL3UB.js.map → trillion3d-chunk-5TTX63XG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-4KXFERR4.js.map → trillion3d-chunk-5WEWDH7F.js.map} +0 -0
- /package/dist/{trillion3d-chunk-P74SV4JJ.js.map → trillion3d-chunk-64WTBYW5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-77T2WOXU.js.map → trillion3d-chunk-6I7I5ZYU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CBPJFYIU.js.map → trillion3d-chunk-6OYOGQUQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GTJAMKXA.js.map → trillion3d-chunk-6PMAMKLI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UX44ZL4D.js.map → trillion3d-chunk-6S7S5WI5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-OOOINENB.js.map → trillion3d-chunk-6UP3ZCNV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-46P46SRG.js.map → trillion3d-chunk-6WOJ6TQD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LE7PGKD4.js.map → trillion3d-chunk-6WS2EEBU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-N76JAZ32.js.map → trillion3d-chunk-6WUY2OOX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KITYCFGK.js.map → trillion3d-chunk-72FCWPUJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FLJAAUWJ.js.map → trillion3d-chunk-72IAEP44.js.map} +0 -0
- /package/dist/{trillion3d-chunk-O3OYDVQH.js.map → trillion3d-chunk-77FPYTBQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SAYEA3NT.js.map → trillion3d-chunk-7AQANLZ3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-K364ZTPY.js.map → trillion3d-chunk-7ATTJ3AJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5ASFLMJ6.js.map → trillion3d-chunk-7G4WOX6B.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PU4JWKCC.js.map → trillion3d-chunk-7LIWCQGR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-IGBD22JD.js.map → trillion3d-chunk-7N3FUKOD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ETCQFZ4S.js.map → trillion3d-chunk-7QFOJHAZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XAWENX7C.js.map → trillion3d-chunk-7TIVZUM6.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UL2YJ52J.js.map → trillion3d-chunk-7U7CHALH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KU7R2CLN.js.map → trillion3d-chunk-7UXM26LW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XUD7A3GH.js.map → trillion3d-chunk-7VTYT5MF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FYTCEF3P.js.map → trillion3d-chunk-A4ULELL5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7NZTUQYT.js.map → trillion3d-chunk-ADMXPAEH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZFEJXND5.js.map → trillion3d-chunk-AFRFQ25D.js.map} +0 -0
- /package/dist/{trillion3d-chunk-G6HYU5QH.js.map → trillion3d-chunk-AIB6NXH4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-DZ5A6N23.js.map → trillion3d-chunk-AIQAWNNP.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XI6O5F6V.js.map → trillion3d-chunk-AMJ6I7P4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZNNO6SDC.js.map → trillion3d-chunk-AQAJMS5A.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SYQOPTR2.js.map → trillion3d-chunk-ARDABN2G.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5HWOHERQ.js.map → trillion3d-chunk-B3QB55EK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AYJO3NNO.js.map → trillion3d-chunk-B5NXEPES.js.map} +0 -0
- /package/dist/{trillion3d-chunk-36VHFR62.js.map → trillion3d-chunk-BARQSI5Q.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ESO5KVG2.js.map → trillion3d-chunk-BCYA7LWA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3HPFLXCF.js.map → trillion3d-chunk-BIBJMHIN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-H5B36GHI.js.map → trillion3d-chunk-BIGALHRE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QW7R4JSU.js.map → trillion3d-chunk-BKON7HDQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-IGH6C5NL.js.map → trillion3d-chunk-BRHXHYWB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JXEBQPRX.js.map → trillion3d-chunk-BVXHXONN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-POPUJ5RT.js.map → trillion3d-chunk-BWPZMIFY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CPLMDH47.js.map → trillion3d-chunk-C2WWWTMZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZDT7Z7AV.js.map → trillion3d-chunk-C7DCG2NV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-IVAI2C6D.js.map → trillion3d-chunk-CCZJZMRJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ADUR3TJH.js.map → trillion3d-chunk-CFIW2PLU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WPZHDV22.js.map → trillion3d-chunk-CH3UKBVF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-OG5M47HN.js.map → trillion3d-chunk-COAMUWUG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Q4XTYMSK.js.map → trillion3d-chunk-CS3EWLHS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WLOE6LQT.js.map → trillion3d-chunk-CS6MYZM7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KEQDYXLL.js.map → trillion3d-chunk-CSVCHCKI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JO55XZVA.js.map → trillion3d-chunk-CYW43B6C.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NH3GZRI7.js.map → trillion3d-chunk-D2UJO22L.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Y3SDC6TY.js.map → trillion3d-chunk-D5LNZFJU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QEJGU4DQ.js.map → trillion3d-chunk-DJIWKT4L.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XM5IBOQ3.js.map → trillion3d-chunk-DNAAW2B5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SM64HJZI.js.map → trillion3d-chunk-DOXBXQJU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2PBJSBLO.js.map → trillion3d-chunk-DQVEKWHY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AA6W2SUV.js.map → trillion3d-chunk-DQYIKRAI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3BY2FPRS.js.map → trillion3d-chunk-DX5UNL5O.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PQH6Z3ZK.js.map → trillion3d-chunk-EF6DURKO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2JAAFFQC.js.map → trillion3d-chunk-EKH44M5H.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JRLCX4ZB.js.map → trillion3d-chunk-EKHMHUHO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CJHN7L75.js.map → trillion3d-chunk-EKMPAWJU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-HDA6WCOZ.js.map → trillion3d-chunk-ELCIIOBC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JRVTAQY2.js.map → trillion3d-chunk-EME34J3O.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FDP5PHNI.js.map → trillion3d-chunk-EMNL3VBH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PUS6DQHP.js.map → trillion3d-chunk-EOA6RIXX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZSTYK7WY.js.map → trillion3d-chunk-ESEYMHSX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KJXQTIKM.js.map → trillion3d-chunk-EVWXSXV3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-T43PRG7O.js.map → trillion3d-chunk-EW3266JI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2JM7B67K.js.map → trillion3d-chunk-F5ZFHT7O.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YTL2XIXN.js.map → trillion3d-chunk-FBPHTYO3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EO2IHUHA.js.map → trillion3d-chunk-FCITXHHL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2OFUDJNU.js.map → trillion3d-chunk-FG4VFY2I.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JN2SWJKC.js.map → trillion3d-chunk-FJ6PAVLE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UTTH7HS7.js.map → trillion3d-chunk-FNZKGTZC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AZ6SQT7V.js.map → trillion3d-chunk-FVKZE7SE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-472QQ27C.js.map → trillion3d-chunk-FXEJM7VG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7QYR7QUU.js.map → trillion3d-chunk-FYXZW5DA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-X2FMWMUT.js.map → trillion3d-chunk-G3DRTVHN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KYDPV56Z.js.map → trillion3d-chunk-G4AJOGQ7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5ROJIVV3.js.map → trillion3d-chunk-GEI5JB66.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2VZIVK5U.js.map → trillion3d-chunk-GHFAPXBM.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KS3GXZPA.js.map → trillion3d-chunk-GI2T6FOU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-W4SMNFPI.js.map → trillion3d-chunk-GJZNN5UJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PN2YD2PU.js.map → trillion3d-chunk-GK2DII6G.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SLLV2LYS.js.map → trillion3d-chunk-GPVAVLAF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-S25VCORA.js.map → trillion3d-chunk-GTR23Z5K.js.map} +0 -0
- /package/dist/{trillion3d-chunk-K3434KA7.js.map → trillion3d-chunk-GVOSTFBW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-M63PPBDR.js.map → trillion3d-chunk-GYORYIF5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JLJSXR5R.js.map → trillion3d-chunk-H3DVML7I.js.map} +0 -0
- /package/dist/{trillion3d-chunk-F4TG7DXL.js.map → trillion3d-chunk-H7KLPWI5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WUZB5LTJ.js.map → trillion3d-chunk-H7LQGPKQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-I2L32YAH.js.map → trillion3d-chunk-HBJ6VZPO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-HTCY6CIU.js.map → trillion3d-chunk-HBMBGWN2.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7CSS2AWO.js.map → trillion3d-chunk-HBSLKLSZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Y4MIWQBS.js.map → trillion3d-chunk-HCG3ESSV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YQC77N7M.js.map → trillion3d-chunk-HDQGK2TL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QPNQ6MAU.js.map → trillion3d-chunk-HRCLDXIF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2KRIKK4D.js.map → trillion3d-chunk-HRIARS44.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GPKNAWFR.js.map → trillion3d-chunk-HV2YN5CF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-I7R4YZP2.js.map → trillion3d-chunk-I5M3F6OY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZTYP3T5T.js.map → trillion3d-chunk-I75EGJAB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UH663TJS.js.map → trillion3d-chunk-I7QRTDI7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-K5D3PLUN.js.map → trillion3d-chunk-IAELZYJF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LHFBY6CF.js.map → trillion3d-chunk-ICJUDIVR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-OPFDHDV7.js.map → trillion3d-chunk-IEYEFEDV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2HSBVYCY.js.map → trillion3d-chunk-IFLJYROA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-74PQZHDK.js.map → trillion3d-chunk-IFZHDHIG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-J2KR4G6F.js.map → trillion3d-chunk-IHNPAPHM.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5GW525BI.js.map → trillion3d-chunk-IJJXMYSL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XHUSYLI3.js.map → trillion3d-chunk-IJMFDLYO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EIOQWCJW.js.map → trillion3d-chunk-INTWD5DJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SCJINCDV.js.map → trillion3d-chunk-IWP6655A.js.map} +0 -0
- /package/dist/{trillion3d-chunk-42JJO5YV.js.map → trillion3d-chunk-IZTRWVNI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GXMTFTCW.js.map → trillion3d-chunk-J2BIHJ55.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ECWU67MC.js.map → trillion3d-chunk-J3NX2PWF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KEIULYWY.js.map → trillion3d-chunk-J6G75W5Q.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QDNYR3XW.js.map → trillion3d-chunk-J7ML34IT.js.map} +0 -0
- /package/dist/{trillion3d-chunk-F2BKXVDP.js.map → trillion3d-chunk-JD25N5D6.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YI2MFQEG.js.map → trillion3d-chunk-JDIIZKDU.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FJRD6RXY.js.map → trillion3d-chunk-JHRQF53B.js.map} +0 -0
- /package/dist/{trillion3d-chunk-S4P42ZHN.js.map → trillion3d-chunk-JPN76QOL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MUZUZS2F.js.map → trillion3d-chunk-JRCGXELE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QGELETHW.js.map → trillion3d-chunk-JXIMDH6A.js.map} +0 -0
- /package/dist/{trillion3d-chunk-P75YOB5K.js.map → trillion3d-chunk-K6R7UEQZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LV5NP2OD.js.map → trillion3d-chunk-K72UANQN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-BZAV5BK7.js.map → trillion3d-chunk-KKECIVIP.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XYP27BGE.js.map → trillion3d-chunk-KLGN5XV3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-I63LRS3P.js.map → trillion3d-chunk-KLIGAVUH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZHRUP5WY.js.map → trillion3d-chunk-KLP7IBDS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-W42TUOJC.js.map → trillion3d-chunk-KPFGILKK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-G5MFUE5P.js.map → trillion3d-chunk-KR4PIU6F.js.map} +0 -0
- /package/dist/{trillion3d-chunk-D4DXAQPJ.js.map → trillion3d-chunk-KRV5VQCR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PSMSPY5U.js.map → trillion3d-chunk-KUJMOLHB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3EPZT7SR.js.map → trillion3d-chunk-KUKNVBWH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Y322OCAR.js.map → trillion3d-chunk-KXM3DYQH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2MVQXOFZ.js.map → trillion3d-chunk-L2F5RZRX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-DUWMZGSW.js.map → trillion3d-chunk-L2FRHLXI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2TYAUOQ5.js.map → trillion3d-chunk-L3VCBYGD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MQEVNNBK.js.map → trillion3d-chunk-LAAPTFVW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2CZ6RWTW.js.map → trillion3d-chunk-LANLTCBQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UCGD7DGZ.js.map → trillion3d-chunk-LE4HL44Z.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7CGRPLOC.js.map → trillion3d-chunk-LEY2Q6DZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SKH3XZ4Q.js.map → trillion3d-chunk-LMWJTQFR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-VGIJRZO5.js.map → trillion3d-chunk-LQLIXMMD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Z6ISTRN2.js.map → trillion3d-chunk-LTWG3NOL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-OXKMBXZD.js.map → trillion3d-chunk-M773YMP6.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZTNOBS5G.js.map → trillion3d-chunk-MAKYPLYF.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5LQDA7UM.js.map → trillion3d-chunk-MCNOP7UR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GUWCZ2WR.js.map → trillion3d-chunk-MCSS3F6E.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZXGUNSUQ.js.map → trillion3d-chunk-MF4CAU3R.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZXF6BEYU.js.map → trillion3d-chunk-MJTRABFR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AU725OCC.js.map → trillion3d-chunk-MQBDHCB3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-R3HHRSA5.js.map → trillion3d-chunk-MUMQYHCQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-P2RDFAA2.js.map → trillion3d-chunk-MXZGFCOM.js.map} +0 -0
- /package/dist/{trillion3d-chunk-J5SMDUDO.js.map → trillion3d-chunk-N33FXDXZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LHHZH3SV.js.map → trillion3d-chunk-N7YEU2CT.js.map} +0 -0
- /package/dist/{trillion3d-chunk-BUP4DDEO.js.map → trillion3d-chunk-NB7XML37.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5ONOJMSW.js.map → trillion3d-chunk-NBFOHDNN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CQESL7F5.js.map → trillion3d-chunk-NEVMYKGT.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ICWUGQNV.js.map → trillion3d-chunk-NHC4DXYP.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MEMYKAVP.js.map → trillion3d-chunk-NNF42O54.js.map} +0 -0
- /package/dist/{trillion3d-chunk-B3ATF6PP.js.map → trillion3d-chunk-NTHEHPA5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-P4Q7TPID.js.map → trillion3d-chunk-NVYEQ3JS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-BDWRLDJI.js.map → trillion3d-chunk-NZRMWUGY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Y2DWPDRM.js.map → trillion3d-chunk-OD3JBU6D.js.map} +0 -0
- /package/dist/{trillion3d-chunk-3GEQFGGV.js.map → trillion3d-chunk-OFCF3GAC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-U3CLZW3E.js.map → trillion3d-chunk-OHFYUKAD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NFFLZRMN.js.map → trillion3d-chunk-OHTUNWUN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-TLVZXCTJ.js.map → trillion3d-chunk-OLDTBAXR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XYMF73ZW.js.map → trillion3d-chunk-OYZFVYYH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZUU5E7FO.js.map → trillion3d-chunk-P35JRX3H.js.map} +0 -0
- /package/dist/{trillion3d-chunk-HCXQHHY4.js.map → trillion3d-chunk-P3HTLS2O.js.map} +0 -0
- /package/dist/{trillion3d-chunk-XXCX4QIN.js.map → trillion3d-chunk-P7UZ7W2B.js.map} +0 -0
- /package/dist/{trillion3d-chunk-E5M5PMK3.js.map → trillion3d-chunk-PDWU4CCX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EZ2JYRNP.js.map → trillion3d-chunk-PFMAOUBW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-M2F7Q77E.js.map → trillion3d-chunk-PHE5OKAE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7F2KAZFC.js.map → trillion3d-chunk-PMF6JTVJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GXDVY3QD.js.map → trillion3d-chunk-PXYUWON5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-HBFRB6UY.js.map → trillion3d-chunk-PYVXDVAE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EAHDFM7D.js.map → trillion3d-chunk-PZBXWJFT.js.map} +0 -0
- /package/dist/{trillion3d-chunk-URXU62XN.js.map → trillion3d-chunk-Q2T4HBTW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QFWHSCJS.js.map → trillion3d-chunk-QAHCZ4CN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WFPJ35TV.js.map → trillion3d-chunk-QFIAXDBJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EU4OYQGR.js.map → trillion3d-chunk-QGHAYZR3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MBN7REAP.js.map → trillion3d-chunk-QMREUFAO.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NH7JVT4M.js.map → trillion3d-chunk-QN7VBGUP.js.map} +0 -0
- /package/dist/{trillion3d-chunk-V4M3HNJD.js.map → trillion3d-chunk-QVFWEZOK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LZSYLDTU.js.map → trillion3d-chunk-QW5YCJAB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UBMIQXK3.js.map → trillion3d-chunk-R2A7QWWZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-V6HD2TKX.js.map → trillion3d-chunk-R4BXG67P.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5KHPSLRC.js.map → trillion3d-chunk-R56L2MST.js.map} +0 -0
- /package/dist/{trillion3d-chunk-S2JLIIRM.js.map → trillion3d-chunk-RLDDQEQJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7IZI5OZK.js.map → trillion3d-chunk-RMFAMI5T.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WJBLDQVZ.js.map → trillion3d-chunk-ROHK5HT5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YWUEHJ6S.js.map → trillion3d-chunk-RPMC2FKD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JVNGK4EV.js.map → trillion3d-chunk-RTBXAMIZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EUCLXLYS.js.map → trillion3d-chunk-S2NA64OJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-DA3S4LZH.js.map → trillion3d-chunk-SPIIJAMX.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MLBX4WMV.js.map → trillion3d-chunk-SSWVBSJZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AEW6BD4P.js.map → trillion3d-chunk-SUDBSFLJ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-VCIRYPE7.js.map → trillion3d-chunk-SUU45ZK7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CMHKMP7M.js.map → trillion3d-chunk-TFNOURGL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZM6OWZBZ.js.map → trillion3d-chunk-TLIN2DEK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7C5HNDEL.js.map → trillion3d-chunk-TLO4XKYG.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZKTXPZUU.js.map → trillion3d-chunk-TVYIOVGI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-GOFFACVN.js.map → trillion3d-chunk-TY7RGAI4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-MCIY254D.js.map → trillion3d-chunk-UBSICE2S.js.map} +0 -0
- /package/dist/{trillion3d-chunk-G4ZEQPJE.js.map → trillion3d-chunk-UCIL746V.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5VX27QFH.js.map → trillion3d-chunk-UGTFIP7T.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FBPR5PIL.js.map → trillion3d-chunk-UH2X4DC7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KWS6MEDX.js.map → trillion3d-chunk-UL5AQCHN.js.map} +0 -0
- /package/dist/{trillion3d-chunk-NQT36E2Z.js.map → trillion3d-chunk-UMAIYYSB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CD7EZNRP.js.map → trillion3d-chunk-UROCVT3W.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZHV4B2CP.js.map → trillion3d-chunk-US6WKM5M.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UPJHDFQP.js.map → trillion3d-chunk-UT5VM3B7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-VYQB6KF6.js.map → trillion3d-chunk-UXCQ7A3K.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QHLP3RMM.js.map → trillion3d-chunk-UXQKO5IH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-TZ3XBBRE.js.map → trillion3d-chunk-UXRWIFOC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2BOYJZCQ.js.map → trillion3d-chunk-V44TZZB3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-DPXM3DHU.js.map → trillion3d-chunk-VFPDIIEP.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5GY24CJD.js.map → trillion3d-chunk-VL44QEQI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-J2YDEAKO.js.map → trillion3d-chunk-VP3GS2OQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-WOE7ECLG.js.map → trillion3d-chunk-VWRK33DS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-E2VRYXCO.js.map → trillion3d-chunk-W2AGULE7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JH7I4RDZ.js.map → trillion3d-chunk-W4L4ZLLZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-742WGJYH.js.map → trillion3d-chunk-WAR4LFLB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-4BOD343S.js.map → trillion3d-chunk-WCVRKGQD.js.map} +0 -0
- /package/dist/{trillion3d-chunk-AYCFHOHV.js.map → trillion3d-chunk-WEACAP55.js.map} +0 -0
- /package/dist/{trillion3d-chunk-O6RA4K6A.js.map → trillion3d-chunk-WG6NZENK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-YIE3H5JS.js.map → trillion3d-chunk-WJ4XQVTQ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JFCEIZBH.js.map → trillion3d-chunk-WR43FBB3.js.map} +0 -0
- /package/dist/{trillion3d-chunk-CVJOTXK5.js.map → trillion3d-chunk-WXECWHZ5.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZVO6IOK3.js.map → trillion3d-chunk-WYKIXSUS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZSKD2IX5.js.map → trillion3d-chunk-XBDQHYBL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-6VDAUYE6.js.map → trillion3d-chunk-XEPOPZZY.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5COTXELO.js.map → trillion3d-chunk-XEQBUJNB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-4JBRHV7G.js.map → trillion3d-chunk-XL4F65A7.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QLEZIRFO.js.map → trillion3d-chunk-XOAWZNRA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-S47ADXWU.js.map → trillion3d-chunk-XQHULSDL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-FPH3NDSE.js.map → trillion3d-chunk-XQSMKVTL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-OVVY7IKC.js.map → trillion3d-chunk-XQSU4SY6.js.map} +0 -0
- /package/dist/{trillion3d-chunk-UR2BLLWY.js.map → trillion3d-chunk-XWJQJK22.js.map} +0 -0
- /package/dist/{trillion3d-chunk-RUOI3D3D.js.map → trillion3d-chunk-XXOXGG47.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5B3ML3DL.js.map → trillion3d-chunk-XY7DNXWL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-7XEWHG3S.js.map → trillion3d-chunk-XYZRT3VR.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JOPRGF7Z.js.map → trillion3d-chunk-XZPUDNQA.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QZURF55R.js.map → trillion3d-chunk-Y2RAGKRM.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QOKJKCXP.js.map → trillion3d-chunk-YA4TWJRK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-2L52NUG7.js.map → trillion3d-chunk-YAFEYU2S.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ABKLIRWX.js.map → trillion3d-chunk-YBKRRMOT.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LB2MHAHM.js.map → trillion3d-chunk-YFSDLEIZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-LHCO3J7M.js.map → trillion3d-chunk-YIUAOG6X.js.map} +0 -0
- /package/dist/{trillion3d-chunk-PPUZR76B.js.map → trillion3d-chunk-YKZXAXMM.js.map} +0 -0
- /package/dist/{trillion3d-chunk-U4EL7JGK.js.map → trillion3d-chunk-YMR3WF2W.js.map} +0 -0
- /package/dist/{trillion3d-chunk-RB22IHFT.js.map → trillion3d-chunk-YNRZO4Y4.js.map} +0 -0
- /package/dist/{trillion3d-chunk-SIPUEAJ5.js.map → trillion3d-chunk-YOXV4W6I.js.map} +0 -0
- /package/dist/{trillion3d-chunk-V2BAFU66.js.map → trillion3d-chunk-YQT76FYC.js.map} +0 -0
- /package/dist/{trillion3d-chunk-Y42MTEVG.js.map → trillion3d-chunk-YRPBW7AK.js.map} +0 -0
- /package/dist/{trillion3d-chunk-M2AYPZAT.js.map → trillion3d-chunk-YULZ6QUZ.js.map} +0 -0
- /package/dist/{trillion3d-chunk-N45WPUNA.js.map → trillion3d-chunk-YWWOBEV2.js.map} +0 -0
- /package/dist/{trillion3d-chunk-EI2XZGZC.js.map → trillion3d-chunk-YYWNNHNI.js.map} +0 -0
- /package/dist/{trillion3d-chunk-IWBFD73G.js.map → trillion3d-chunk-ZBIQ6S5Z.js.map} +0 -0
- /package/dist/{trillion3d-chunk-ZGWEZTGI.js.map → trillion3d-chunk-ZBXTCONH.js.map} +0 -0
- /package/dist/{trillion3d-chunk-TI3PM7XW.js.map → trillion3d-chunk-ZDNFJYCW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-6Y7TZO62.js.map → trillion3d-chunk-ZF5EDFJS.js.map} +0 -0
- /package/dist/{trillion3d-chunk-QCE7DOXK.js.map → trillion3d-chunk-ZFAKVFKL.js.map} +0 -0
- /package/dist/{trillion3d-chunk-V6VZ5QXG.js.map → trillion3d-chunk-ZIGGUJM6.js.map} +0 -0
- /package/dist/{trillion3d-chunk-KTGIIVAQ.js.map → trillion3d-chunk-ZNJ4TNBW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JQ2VUCTW.js.map → trillion3d-chunk-ZQPT2YFE.js.map} +0 -0
- /package/dist/{trillion3d-chunk-JCTPF4CK.js.map → trillion3d-chunk-ZUFX2HVV.js.map} +0 -0
- /package/dist/{trillion3d-chunk-S4NKU3YU.js.map → trillion3d-chunk-ZUQDRSYB.js.map} +0 -0
- /package/dist/{trillion3d-chunk-TWFQBYBV.js.map → trillion3d-chunk-ZVSX6CGW.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5K6QSSBR.js.map → trillion3d-chunk-ZYS4E37Q.js.map} +0 -0
- /package/dist/{trillion3d-chunk-5VVVL3GH.js.map → trillion3d-chunk-ZZWX6Q7H.js.map} +0 -0
- /package/dist/{trillion3d-cinematicsCode-5UPGQFVV.js.map → trillion3d-cinematicsCode-2YP657C3.js.map} +0 -0
- /package/dist/{trillion3d-cubeCapturesCode-LCBK47X5.js.map → trillion3d-cubeCapturesCode-BOLBDRJD.js.map} +0 -0
- /package/dist/{trillion3d-debugViewsCode-7GJW7RDI.js.map → trillion3d-debugViewsCode-F4KTKXOZ.js.map} +0 -0
- /package/dist/{trillion3d-decalCode-ID2FWTA7.js.map → trillion3d-decalCode-4OSGACRW.js.map} +0 -0
- /package/dist/{trillion3d-deformationCode-PIIEMRNF.js.map → trillion3d-deformationCode-GJBRRE4B.js.map} +0 -0
- /package/dist/{trillion3d-displacementCode-ZMPJRUDW.js.map → trillion3d-displacementCode-OS37YHNO.js.map} +0 -0
- /package/dist/{trillion3d-effectCode-J22OGAGG.js.map → trillion3d-effectCode-CNDEXEFI.js.map} +0 -0
- /package/dist/{trillion3d-explorer-JTT6UBU6.js.map → trillion3d-explorer-3SU2HTGD.js.map} +0 -0
- /package/dist/{trillion3d-export-H3WTWO2M.js.map → trillion3d-export-3COKIWS6.js.map} +0 -0
- /package/dist/{trillion3d-family-IM6JIBGG.js.map → trillion3d-family-YNJWVKWC.js.map} +0 -0
- /package/dist/{trillion3d-fieldsCode-QD2TBZOM.js.map → trillion3d-fieldsCode-JQLVIT4H.js.map} +0 -0
- /package/dist/{trillion3d-fogCode-PNHAG2DD.js.map → trillion3d-fogCode-PM5UY2TW.js.map} +0 -0
- /package/dist/{trillion3d-geometryPage-3J5Q2EZN.js.map → trillion3d-geometryPage-DVJ4N2A6.js.map} +0 -0
- /package/dist/{trillion3d-graphCode-DWZUBHZQ.js.map → trillion3d-graphCode-MCIPPACK.js.map} +0 -0
- /package/dist/{trillion3d-graphCode-HGVQ47X4.js.map → trillion3d-graphCode-MOTJ4WBF.js.map} +0 -0
- /package/dist/{trillion3d-grassCode-HASCTGFB.js.map → trillion3d-grassCode-J7CCF63J.js.map} +0 -0
- /package/dist/{trillion3d-guideCode-XKNU3UOB.js.map → trillion3d-guideCode-ONWTGY2H.js.map} +0 -0
- /package/dist/{trillion3d-hairCode-VUMV4M33.js.map → trillion3d-hairCode-PNWJMXWH.js.map} +0 -0
- /package/dist/{trillion3d-hardwareBenchmark-H2SLAEER.js.map → trillion3d-hardwareBenchmark-JD2ITGNS.js.map} +0 -0
- /package/dist/{trillion3d-headlessCode-3KBNVKND.js.map → trillion3d-headlessCode-JAXG4XPK.js.map} +0 -0
- /package/dist/{trillion3d-iesCode-GVJDBPQY.js.map → trillion3d-iesCode-QVSRIT37.js.map} +0 -0
- /package/dist/{trillion3d-indicator-VCCCRO7K.js.map → trillion3d-indicator-ZDOOX6EU.js.map} +0 -0
- /package/dist/{trillion3d-installCode-GDJ6EA73.js.map → trillion3d-installCode-5NOFNOTZ.js.map} +0 -0
- /package/dist/{trillion3d-manifestLoad-Y2XKGXCD.js.map → trillion3d-manifestLoad-TEO2A7XO.js.map} +0 -0
- /package/dist/{trillion3d-markCode-VYWQBD3K.js.map → trillion3d-markCode-DD7RPZ2V.js.map} +0 -0
- /package/dist/{trillion3d-modelArrivalCode-ENI7UWDQ.js.map → trillion3d-modelArrivalCode-AS2ZIO5I.js.map} +0 -0
- /package/dist/{trillion3d-modelCapture-BMLNM2DT.js.map → trillion3d-modelCapture-OZNK2KHI.js.map} +0 -0
- /package/dist/{trillion3d-modelCopiesCode-7JYQXGVF.js.map → trillion3d-modelCopiesCode-X7PCUUUT.js.map} +0 -0
- /package/dist/{trillion3d-modelImagesCode-C3O4XMTN.js.map → trillion3d-modelImagesCode-7NZ3BIL5.js.map} +0 -0
- /package/dist/{trillion3d-pageAudioCode-JV4TWD5B.js.map → trillion3d-pageAudioCode-PQWNFXNH.js.map} +0 -0
- /package/dist/{trillion3d-pageCompile-YNZYXLLY.js.map → trillion3d-pageCompile-4KI5TP2J.js.map} +0 -0
- /package/dist/{trillion3d-panel-RYDJZQFJ.js.map → trillion3d-panel-4BMTNA6N.js.map} +0 -0
- /package/dist/{trillion3d-particleCode-244NV3QC.js.map → trillion3d-particleCode-X7RJYMM2.js.map} +0 -0
- /package/dist/{trillion3d-partitionCode-LJW6NXJO.js.map → trillion3d-partitionCode-KNTGZUZG.js.map} +0 -0
- /package/dist/{trillion3d-pathTracingCode-PY4YXX2K.js.map → trillion3d-pathTracingCode-IUDUNO7P.js.map} +0 -0
- /package/dist/{trillion3d-planarReflectionsCode-3HPS33JS.js.map → trillion3d-planarReflectionsCode-22NVSPZ2.js.map} +0 -0
- /package/dist/{trillion3d-previewRun-MYYO5L7K.js.map → trillion3d-previewRun-YOUFRKDJ.js.map} +0 -0
- /package/dist/{trillion3d-ragdollCode-Q2F4YXCT.js.map → trillion3d-ragdollCode-XOZ7BBU4.js.map} +0 -0
- /package/dist/{trillion3d-ragdollStage-673NKNJC.js.map → trillion3d-ragdollStage-EGRNR3QB.js.map} +0 -0
- /package/dist/{trillion3d-read-KTRGUDEK.js.map → trillion3d-read-6L2UR4EJ.js.map} +0 -0
- /package/dist/{trillion3d-reflectionsCode-EYZ2I2RG.js.map → trillion3d-reflectionsCode-3T6W62HT.js.map} +0 -0
- /package/dist/{trillion3d-sampledLightsCode-44YPQANZ.js.map → trillion3d-sampledLightsCode-MSZ2YCSJ.js.map} +0 -0
- /package/dist/{trillion3d-scene-VDR67XPZ.js.map → trillion3d-scene-3LL23MZI.js.map} +0 -0
- /package/dist/{trillion3d-session-V5UGVDGM.js.map → trillion3d-session-S4GIQNV6.js.map} +0 -0
- /package/dist/{trillion3d-shadowsCode-IGFSPJZS.js.map → trillion3d-shadowsCode-UZNPLVCV.js.map} +0 -0
- /package/dist/{trillion3d-skyCode-VIAPJ6TS.js.map → trillion3d-skyCode-BYIIBWAM.js.map} +0 -0
- /package/dist/{trillion3d-sortedTranslucencyCode-ENOIPRNP.js.map → trillion3d-sortedTranslucencyCode-VLSTGX5S.js.map} +0 -0
- /package/dist/{trillion3d-splineMeshCode-X6CFRALJ.js.map → trillion3d-splineMeshCode-AWDX5BIG.js.map} +0 -0
- /package/dist/{trillion3d-subsurfaceCode-L36SYFNH.js.map → trillion3d-subsurfaceCode-PROXJTLS.js.map} +0 -0
- /package/dist/{trillion3d-surfaceCode-J3JUDHSC.js.map → trillion3d-surfaceCode-CW2NSI5O.js.map} +0 -0
- /package/dist/{trillion3d-terrainCode-BHCQQRET.js.map → trillion3d-terrainCode-ZDONXR5X.js.map} +0 -0
- /package/dist/{trillion3d-transformCode-74Z7PQYM.js.map → trillion3d-transformCode-SE55EUCN.js.map} +0 -0
- /package/dist/{trillion3d-translucentLightVolumeCode-3HU4TBPQ.js.map → trillion3d-translucentLightVolumeCode-EQKMCGMD.js.map} +0 -0
- /package/dist/{trillion3d-viewCode-IXEIJJWS.js.map → trillion3d-viewCode-52L7D5ZW.js.map} +0 -0
- /package/dist/{trillion3d-volumesCode-RDBBXG3U.js.map → trillion3d-volumesCode-NYAC6KYU.js.map} +0 -0
- /package/dist/{trillion3d-waterCode-3ZRB2JP7.js.map → trillion3d-waterCode-CWZ5XYNU.js.map} +0 -0
- /package/dist/{trillion3d-webgpuCode-BQTJL2EM.js.map → trillion3d-webgpuCode-2GNPUWQ4.js.map} +0 -0
- /package/dist/{trillion3d-workCode-V42SMDJA.js.map → trillion3d-workCode-DCC25A2D.js.map} +0 -0
- /package/dist/{trillion3d-worldRootPages-3SFAHS63.js.map → trillion3d-worldRootPages-P75VSIXR.js.map} +0 -0
|
@@ -0,0 +1,2128 @@
|
|
|
1
|
+
import{A as Lr,B as Xa,E as Za,F as Qa,J as Ja,K as en,L as je,M as fe,N as ae,O as tn,d as Ma,e as Ha,j as Ie,k as Da,l as Wa,m as Ba,n as Yt,o as Ut,p as Va,q as $a,r as za,s as qt,t as qe,u as Ya,v as Ua,w as Ke,x as qa,y as Ka,z as ja}from"./trillion3d-chunk-LANLTCBQ.js";import{d as rn}from"./trillion3d-chunk-AIQAWNNP.js";import"./trillion3d-chunk-2EJ4CRNA.js";import"./trillion3d-chunk-HBSLKLSZ.js";import"./trillion3d-chunk-W2AGULE7.js";import"./trillion3d-chunk-7TIVZUM6.js";import"./trillion3d-chunk-3TG7TWTW.js";import"./trillion3d-chunk-EF6DURKO.js";import{b as Pa,c as Ga}from"./trillion3d-chunk-VFPDIIEP.js";import{c as Fa}from"./trillion3d-chunk-KUKNVBWH.js";import{a as ka,d as Ca}from"./trillion3d-chunk-5ORGGJA5.js";import{f as Ta,h as Ra,j as ba,k as _a,l as Ne,n as Oa,o as Na,q as Ia}from"./trillion3d-chunk-G3DRTVHN.js";import"./trillion3d-chunk-ADMXPAEH.js";import"./trillion3d-chunk-7N3FUKOD.js";import"./trillion3d-chunk-COAMUWUG.js";import{a as ya}from"./trillion3d-chunk-D237WZVO.js";import"./trillion3d-chunk-3XBFYA3P.js";import{aa as La}from"./trillion3d-chunk-FVKZE7SE.js";import"./trillion3d-chunk-FBPHTYO3.js";import"./trillion3d-chunk-J3NX2PWF.js";import"./trillion3d-chunk-I75EGJAB.js";import{a as ki}from"./trillion3d-chunk-72IAEP44.js";import{f as Vt,g as Qi,j as va}from"./trillion3d-chunk-INTWD5DJ.js";import{a as pa,g as ga,h as wa,k as Ea}from"./trillion3d-chunk-UROCVT3W.js";import"./trillion3d-chunk-TFNOURGL.js";import{b as Ji,h as oa,i as ia,j as aa,k as na,n as sa}from"./trillion3d-chunk-OFCF3GAC.js";import"./trillion3d-chunk-OHTUNWUN.js";import"./trillion3d-chunk-PZBXWJFT.js";import"./trillion3d-chunk-P3HTLS2O.js";import"./trillion3d-chunk-3UAK2IRC.js";import{j as Sr,k as ea,l as ta,s as ra,y as la}from"./trillion3d-chunk-25B7I4D5.js";import"./trillion3d-chunk-DEXMTOBT.js";import{g as Yi,i as Ui}from"./trillion3d-chunk-4KEDPBE4.js";import{B as Ki,L as ji}from"./trillion3d-chunk-PYVXDVAE.js";import"./trillion3d-chunk-6OYOGQUQ.js";import{d as Zi}from"./trillion3d-chunk-BVXHXONN.js";import"./trillion3d-chunk-6PMAMKLI.js";import"./trillion3d-chunk-5KEW2ZOY.js";import"./trillion3d-chunk-QN7VBGUP.js";import{d as Bt,f as Vi,g as $i,h as zi}from"./trillion3d-chunk-M773YMP6.js";import{h as Xi}from"./trillion3d-chunk-B5NXEPES.js";import"./trillion3d-chunk-7UXM26LW.js";import"./trillion3d-chunk-ZIGGUJM6.js";import{p as qi}from"./trillion3d-chunk-J2BIHJ55.js";import"./trillion3d-chunk-EOA6RIXX.js";import{l as ze}from"./trillion3d-chunk-UH2X4DC7.js";import"./trillion3d-chunk-A4ULELL5.js";import"./trillion3d-chunk-XQHULSDL.js";import"./trillion3d-chunk-FXEJM7VG.js";import"./trillion3d-chunk-QFIAXDBJ.js";import{da as Ci}from"./trillion3d-chunk-ROHK5HT5.js";import"./trillion3d-chunk-DOXBXQJU.js";import"./trillion3d-chunk-YFSDLEIZ.js";import"./trillion3d-chunk-P35JRX3H.js";import{a as Ye,b as xa,c as zt,d as Sa,e as Ue}from"./trillion3d-chunk-QGHAYZR3.js";import{a as Aa}from"./trillion3d-chunk-ZUFX2HVV.js";import{i as $t,j as ha,k as fa,n as da,o as ua,r as ma}from"./trillion3d-chunk-7G4WOX6B.js";import{b as ca}from"./trillion3d-chunk-DJIWKT4L.js";import"./trillion3d-chunk-53QFLAA3.js";import"./trillion3d-chunk-KUJMOLHB.js";import"./trillion3d-chunk-QVFWEZOK.js";import"./trillion3d-chunk-EKH44M5H.js";import"./trillion3d-chunk-CYW43B6C.js";import"./trillion3d-chunk-OD3JBU6D.js";import"./trillion3d-chunk-AQAJMS5A.js";import{a as Oe}from"./trillion3d-chunk-3VO6VVHD.js";import"./trillion3d-chunk-I7QRTDI7.js";import"./trillion3d-chunk-CH3UKBVF.js";import{b as Wi,c as Bi}from"./trillion3d-chunk-BWPZMIFY.js";import"./trillion3d-chunk-RWK7Q3GP.js";import{l as Di}from"./trillion3d-chunk-ICJUDIVR.js";import"./trillion3d-chunk-JD25N5D6.js";import"./trillion3d-chunk-3W3YJ4KI.js";import"./trillion3d-chunk-XVC6XNBS.js";import"./trillion3d-chunk-NEVMYKGT.js";import"./trillion3d-chunk-GVOSTFBW.js";import"./trillion3d-chunk-DNAAW2B5.js";import"./trillion3d-chunk-XY7DNXWL.js";import"./trillion3d-chunk-GEVCHZCF.js";import"./trillion3d-chunk-RTBXAMIZ.js";import"./trillion3d-chunk-QAHCZ4CN.js";import"./trillion3d-chunk-R6UVX55Z.js";import"./trillion3d-chunk-IZTRWVNI.js";import"./trillion3d-chunk-MCSS3F6E.js";import"./trillion3d-chunk-H7KLPWI5.js";import{ia as Ii}from"./trillion3d-chunk-4Z6VA66T.js";import"./trillion3d-chunk-NB7XML37.js";import"./trillion3d-chunk-AFRFQ25D.js";import"./trillion3d-chunk-LMWJTQFR.js";import"./trillion3d-chunk-LE4HL44Z.js";import"./trillion3d-chunk-CY4YSEKC.js";import"./trillion3d-chunk-H3DVML7I.js";import"./trillion3d-chunk-6WUY2OOX.js";import"./trillion3d-chunk-FBBF7WV4.js";import{a as Ai}from"./trillion3d-chunk-3VBJF62T.js";import{$e as vi,Aa as Bo,Ae as Ct,Af as Ni,Ba as Vo,Bb as yt,Bc as _t,Be as Ft,Ce as Pt,Da as Rr,De as $e,Ee as Gt,Gb as Tt,Ja as Re,Ka as br,La as $o,Rc as St,Ta as zo,Vc as Ve,Wc as ai,Xa as Yo,af as $,bf as yi,df as Mt,ga as Ao,ia as m,ie as Lt,ja as J,je as Ot,ka as Do,ke as B,kf as Ti,le as k,lf as S,ma as Wo,me as u,mf as Ht,ne as V,nf as Ri,oe as pi,of as Se,pa as pt,pe as K,pf as Le,q as xo,qa as gt,qe as Nt,qf as bi,r as So,re as gi,rf as _i,se as wi,sf as xi,ta as wt,te as Ei,tf as Dt,ue as j,uf as R,va as Te,ve as L,vf as Wt,we as It,wf as Si,xa as x,xc as N,xe as At,xf as Li,yc as ri,ye as ce,yf as Oi,za as Et,ze as kt}from"./trillion3d-chunk-OLDTBAXR.js";import"./trillion3d-chunk-GAF4LOXE.js";import"./trillion3d-chunk-7ATTJ3AJ.js";import{$c as b,Cb as jo,Hc as se,Km as mi,Mk as xe,Ni as ni,Ok as ci,Pi as re,Qi as si,Ri as li,Vc as Jo,cl as hi,fd as ei,gd as _e,hd as ti,id as te,jd as bt,pd as xt,qd as oi,qm as fi,sd as ii,tb as Uo,wb as qo,xm as di,zb as Ko,zm as ui}from"./trillion3d-chunk-U5NZRFEN.js";import"./trillion3d-chunk-PHE5OKAE.js";import"./trillion3d-chunk-GK2DII6G.js";import"./trillion3d-chunk-PBXUOP34.js";import"./trillion3d-chunk-2D7RBB5X.js";import{bb as _o,za as mo}from"./trillion3d-chunk-P7UZ7W2B.js";import"./trillion3d-chunk-F5ZFHT7O.js";import"./trillion3d-chunk-DKF76O2Z.js";import{C as Oo,t as ye}from"./trillion3d-chunk-FYXZW5DA.js";import{A as No,B as Io,f as fo}from"./trillion3d-chunk-5TTX63XG.js";import"./trillion3d-chunk-Q2T4HBTW.js";import{m as bo}from"./trillion3d-chunk-RLDDQEQJ.js";import{a as To,b as Ro}from"./trillion3d-chunk-NVYEQ3JS.js";import"./trillion3d-chunk-GTR23Z5K.js";import"./trillion3d-chunk-NNF42O54.js";import"./trillion3d-chunk-W4L4ZLLZ.js";import"./trillion3d-chunk-FJ6PAVLE.js";import"./trillion3d-chunk-25C7OMDW.js";import"./trillion3d-chunk-BKON7HDQ.js";import"./trillion3d-chunk-7U7CHALH.js";import"./trillion3d-chunk-YBKRRMOT.js";import"./trillion3d-chunk-KKECIVIP.js";import"./trillion3d-chunk-WCVRKGQD.js";import"./trillion3d-chunk-3SIG4G43.js";import{A as Zo,B as Qo,v as xr,y as Xo}from"./trillion3d-chunk-WJ4XQVTQ.js";import{d as oe,e as q,g as ie,i as le}from"./trillion3d-chunk-UT5VM3B7.js";import{B as Rt,n as vr}from"./trillion3d-chunk-XYZRT3VR.js";import"./trillion3d-chunk-5TB32DUC.js";import{h as Lo,k as vt,n as ee,v as be,z as _r}from"./trillion3d-chunk-ZUQDRSYB.js";import"./trillion3d-chunk-GKWIL5RN.js";import{e as ut}from"./trillion3d-chunk-3CTKK6Y4.js";import{i as Er,j as U,k as Ee}from"./trillion3d-chunk-MCNOP7UR.js";import{c as he}from"./trillion3d-chunk-KLIGAVUH.js";import{f as wo,g as Eo,h as vo,i as yo,o as ft,p as Q}from"./trillion3d-chunk-L2FRHLXI.js";import"./trillion3d-chunk-AIB6NXH4.js";import"./trillion3d-chunk-P3ZHQQSN.js";import"./trillion3d-chunk-KUJMKMT4.js";import"./trillion3d-chunk-UXRWIFOC.js";import"./trillion3d-chunk-DX5UNL5O.js";import"./trillion3d-chunk-UL5AQCHN.js";import{B as co,e as ao,o as no,q as so,r as lo}from"./trillion3d-chunk-IJJXMYSL.js";import{b as W}from"./trillion3d-chunk-YKZXAXMM.js";import{P as go,e as ct,f as ht,o as uo,u as Z,x as po}from"./trillion3d-chunk-ARDABN2G.js";import{d as De,g as we,h as Y,j as D,k as I,m as A}from"./trillion3d-chunk-GUUF3TMW.js";import{a as lt,f as ve}from"./trillion3d-chunk-J7ML34IT.js";import"./trillion3d-chunk-HV2YN5CF.js";import"./trillion3d-chunk-3OWQBLPF.js";import"./trillion3d-chunk-3F65K5TK.js";import"./trillion3d-chunk-VL44QEQI.js";import"./trillion3d-chunk-XQSU4SY6.js";import"./trillion3d-chunk-KRV5VQCR.js";import"./trillion3d-chunk-HDQGK2TL.js";import"./trillion3d-chunk-IWHRMC6W.js";import"./trillion3d-chunk-NHC4DXYP.js";import"./trillion3d-chunk-BARQSI5Q.js";import"./trillion3d-chunk-BIGALHRE.js";import"./trillion3d-chunk-WR43FBB3.js";import"./trillion3d-chunk-ESEYMHSX.js";import"./trillion3d-chunk-YMR3WF2W.js";import"./trillion3d-chunk-B6VX7U2Q.js";import"./trillion3d-chunk-7LIWCQGR.js";import"./trillion3d-chunk-6LESCRFX.js";import"./trillion3d-chunk-5SJT7EQ3.js";import"./trillion3d-chunk-KHX62ALQ.js";import"./trillion3d-chunk-HCG3ESSV.js";import"./trillion3d-chunk-QI3JLGEE.js";import"./trillion3d-chunk-XZPUDNQA.js";import"./trillion3d-chunk-SAVFDWTS.js";import"./trillion3d-chunk-UCIL746V.js";import{$k as at,$n as He,$w as dt,Dp as st,Ep as ho,Mf as _,Po as wr,QB as mt,RB as We,RE as Fi,SB as Be,TB as ko,UB as yr,UE as Pi,VB as Co,VE as Gi,WB as Fo,WE as Mi,XB as Po,XE as Hi,YB as Tr,_n as oo,bo as io,co as v,kC as Go,lC as Mo,mC as Ho,ol as to,ql as Me,ro as pr,un as ro,vn as M,xn as nt,yo as gr,zn as X}from"./trillion3d-chunk-PJN3TXFS.js";var Kt=v("REFLECTION_NEIGHBOUR_EDGE_WGSL",[S,R,ve,ct,ht,Dt],`fn reflectionLobeHalfAngle(rough:f32,share:f32)->f32{
|
|
2
|
+
return clamp((fastAtan(reflectionLobeTangent(rough))+0.01)*mix(1.0,4.0,share),0.01,0.5*PI);
|
|
3
|
+
}
|
|
4
|
+
fn reflectionNeighbourEdge(tap:vec2i,layer:u32,P:vec3f,N:vec3f,depth:f32,halfAngle:f32)->f32{
|
|
5
|
+
let normal=surfaceNormalAt(tap).xyz;
|
|
6
|
+
if(!(dot(normal,normal)>0.0)){return 0.0;}
|
|
7
|
+
let off=abs(dot(surfacePointAt(layer,tap)-P,N))/depth;
|
|
8
|
+
let angle=fastAcos(saturate(dot(N,normalize(normal))));
|
|
9
|
+
return edgeWeight(-reflectionView.reach.w,off,1.0-saturate(angle/halfAngle));
|
|
10
|
+
}`);var Ae=2,C=m+2*Ae,jt=v("REFLECTION_TEMPORAL_WINDOW_WGSL",[S,R,Oe,Va,Kt],`@group(0) @binding(${u.temporalIn}) var temporalIn:texture_2d<u32>;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var<workgroup> temporalShared:array<vec2u,${C*C}>;
|
|
14
|
+
fn temporalShare(s:vec2i)->vec4f{
|
|
15
|
+
let p=temporalShared[u32(s.y)*${C}u+u32(s.x)];
|
|
16
|
+
return vec4f(unpack2x16float(p.x&~REFLECTION_RESOLVED_LEFT),unpack2x16float(p.y));
|
|
17
|
+
}
|
|
18
|
+
/** Whether a resolved pixel of the window round the pixel of the tile \`local\` \u2014 5 \xD7 5 but its corners, its own included \u2014 weighed a ray
|
|
19
|
+
* that went through a place a mover left this image: the rays of the neighbourhood the clamp reads, so that a lobe's tail, which one
|
|
20
|
+
* pixel's few rays cross by chance, is told by its neighbours' many (\`temporalPixel\`). */
|
|
21
|
+
fn temporalLeftAround(local:vec2u)->bool{
|
|
22
|
+
for(var k=0;k<25;k++){
|
|
23
|
+
if(k==0||k==4||k==20||k==24){continue;}
|
|
24
|
+
let s=vec2i(local)+vec2i(${Ae})+vec2i(k%5-2,k/5-2);
|
|
25
|
+
if((temporalShared[u32(s.y)*${C}u+u32(s.x)].x&REFLECTION_RESOLVED_LEFT)!=0u){return true;}
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
fn temporalStage(origin:vec2i,lane:u32){
|
|
32
|
+
let size=vec2i(reflectionViewport());
|
|
33
|
+
for(var turn=0u;turn<${_(C*C,m*m)}u;turn++){
|
|
34
|
+
let i=lane+turn*${m*m}u;
|
|
35
|
+
if(i<${C*C}u){
|
|
36
|
+
let s=vec2i(i32(i%${C}u),i32(i/${C}u));
|
|
37
|
+
let at=origin+s-vec2i(${Ae});
|
|
38
|
+
let corner=(s.x==0||s.x==${C-1})&&(s.y==0||s.y==${C-1});
|
|
39
|
+
var v=vec4f(0.0);
|
|
40
|
+
var left=0u;
|
|
41
|
+
if(!corner&&all(at>=vec2i(0))&&all(at<size)){
|
|
42
|
+
let t=textureLoad(temporalIn,at,0).xy;
|
|
43
|
+
if(freshValid(t)){v=vec4f(toYcocg(reflectionDenoised(texelRadiance(t))),1.0);left=t.x&REFLECTION_RESOLVED_LEFT;}
|
|
44
|
+
}
|
|
45
|
+
temporalShared[i]=vec2u(pack2x16float(v.xy)|left,pack2x16float(v.zw));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** A window of the neighbourhood around the pixel of the tile \`local\` whose own
|
|
50
|
+
* value is \`centre\`: its mean, the centre, its extent, and the least and the most of the 3 \xD7 3 round it that hold a value, its own
|
|
51
|
+
* included (\`low\`, \`high\`), in YCoCg. */
|
|
52
|
+
struct TemporalWindow{centre:vec3f,extent:vec3f,low:vec3f,high:vec3f,}
|
|
53
|
+
fn temporalWindow(local:vec2u,centre:vec3f)->TemporalWindow{
|
|
54
|
+
var sum=centre;
|
|
55
|
+
var square=centre*centre;
|
|
56
|
+
var n=1.0;
|
|
57
|
+
var low=centre;
|
|
58
|
+
var high=centre;
|
|
59
|
+
for(var k=0;k<25;k++){
|
|
60
|
+
let o=vec2i(k%5-2,k/5-2);
|
|
61
|
+
if((abs(o.x)==2&&abs(o.y)==2)||all(o==vec2i(0))){continue;}
|
|
62
|
+
let v=temporalShare(vec2i(local)+vec2i(${Ae})+o);
|
|
63
|
+
sum+=v.xyz;
|
|
64
|
+
square+=v.xyz*v.xyz;
|
|
65
|
+
n+=v.w;
|
|
66
|
+
if(all(abs(o)<=vec2i(1))&&v.w>0.5){low=min(low,v.xyz);high=max(high,v.xyz);}
|
|
67
|
+
}
|
|
68
|
+
let m=sum/n;
|
|
69
|
+
return TemporalWindow(m,reflectionView.denoise.y*sqrt(max(square/n-m*m,vec3f(0.0))),low,high);
|
|
70
|
+
}
|
|
71
|
+
/** The spread of the light this image's rays round the pixel at \`coord\` brought (\`freshIn\`), on its surface \`layer\` \u2014 its point \`P\`, its
|
|
72
|
+
* lobe of roughness \`rough\` \u2014, the mean square of their luminances' distance from their mean in the denoiser's space, which a restart's
|
|
73
|
+
* second moment adds to its light's square (\`temporalPixel\`): the rays of the 3 \xD7 3 blocks round its own, each traced
|
|
74
|
+
* from its block's picked pixel (\`reflectionPickedPixel\`) and weighed by that pixel's edge on the pixel's surface
|
|
75
|
+
* (\`reflectionNeighbourEdge\`, at the young filter's half angle): nothing across an edge. Each block casts its own ray, drawn apart from
|
|
76
|
+
* its neighbours', so their spread is one ray's noise: never under the noise of the resolved light, which weighs one ray or several \u2014
|
|
77
|
+
* where the resolved pixels share their rays, the spread of the window's own (\`temporalWindow\`'s extent) lies far under it. None where
|
|
78
|
+
* one ray alone weighs. What a history that restarts holds of its own noise before its images tell it (\`temporalPixel\`). */
|
|
79
|
+
fn temporalRaysSpread(coord:vec2i,layer:u32,P:vec3f,rough:f32)->f32{
|
|
80
|
+
let N=normalize(surfaceNormalAt(coord).xyz);
|
|
81
|
+
let depth=surfaceLinearDepth(P);
|
|
82
|
+
let halfAngle=reflectionLobeHalfAngle(rough,1.0);
|
|
83
|
+
let block=vec2i(reflectionBlock());
|
|
84
|
+
let last=(vec2i(reflectionViewport())-vec2i(1))/block;
|
|
85
|
+
let own=coord/block;
|
|
86
|
+
var sum=0.0;
|
|
87
|
+
var square=0.0;
|
|
88
|
+
var total=0.0;
|
|
89
|
+
for(var k=0;k<9;k++){
|
|
90
|
+
let g=own+vec2i(k%3-1,k/3-1);
|
|
91
|
+
if(any(g<vec2i(0))||any(g>last)){continue;}
|
|
92
|
+
let t=textureLoad(freshIn,g,0).xy;
|
|
93
|
+
if(!freshValid(t)){continue;}
|
|
94
|
+
let w=reflectionNeighbourEdge(vec2i(reflectionPickedPixel(vec2u(g))),layer,P,N,depth,halfAngle);
|
|
95
|
+
if(!(w>0.0)){continue;}
|
|
96
|
+
let l=luminance(reflectionDenoised(texelRadiance(t)));
|
|
97
|
+
sum+=w*l;
|
|
98
|
+
square+=w*l*l;
|
|
99
|
+
total+=w;
|
|
100
|
+
}
|
|
101
|
+
if(!(total>0.0)){return 0.0;}
|
|
102
|
+
let mean=sum/total;
|
|
103
|
+
return max(square/total-mean*mean,0.0);
|
|
104
|
+
}`);var Xt=v("REFLECTION_TEMPORAL_MOTION_WGSL",[k,S,R,ee,vt,vi,$,Mt,yi,Ut],`@group(0) @binding(${u.layerMotion}) var frontMotion:texture_2d<f32>;
|
|
105
|
+
/** How far, in device position, the surface of the pixel \`coord\` moves by itself beyond the camera's
|
|
106
|
+
* motion, from the vector the velocity stage drew (\`temporalVectors\`): where the camera alone puts the
|
|
107
|
+
* surface's point in the last image (\`stillPast\` of \`camera\`, the point's clip position through the last
|
|
108
|
+
* view-projection) less where the vector says it stood (\`surfacePast\`: the pixel's centre less the vector) \u2014
|
|
109
|
+
* what a history is carried by in the last image where the pixel is dynamic. Both lie where the history is
|
|
110
|
+
* read (\`temporalHistory\`), the change of jitter between the two images taken out by the one function every
|
|
111
|
+
* reprojection shares: the vectors, drawn without a jitter, carry the pixel's centre there, so the difference
|
|
112
|
+
* holds none. Zero for a pixel that moves by the camera alone, and for the transparents' front surface,
|
|
113
|
+
* which has no vector. */
|
|
114
|
+
fn temporalOwnMotion(coord:vec2i,camera:vec4f)->vec2f{
|
|
115
|
+
if(REFLECTION_LAYER!=0u){return vec2f(0.0);}
|
|
116
|
+
let word=temporalVectorsAt(coord).r;
|
|
117
|
+
let still=stillPast(camera);
|
|
118
|
+
return still-surfacePast(word,pixelToNdc(vec2f(coord)+vec2f(0.5),vec2f(reflectionViewport())),still);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
fn temporalOwnDepth(coord:vec2i,nowZ:f32,cameraZ:f32)->f32{
|
|
125
|
+
if(REFLECTION_LAYER!=0u){return 0.0;}
|
|
126
|
+
let words=temporalVectorsAt(coord);
|
|
127
|
+
if(!hasOwnMotion(words.r)){return 0.0;}
|
|
128
|
+
return depthStepOf(words.g)-(nowZ-cameraZ);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
fn reflectionImageStill()->bool{return (reflectionView.temporal.w&1u)!=0u;}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
fn reflectionNoMovers()->bool{return (reflectionView.temporal.w&2u)!=0u;}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
fn reflectionFrontStill()->bool{return (reflectionView.temporal.w&6u)!=0u;}
|
|
140
|
+
/** Whether the front surface at the pixel \`coord\` moves by the camera alone: all over the image (\`reflectionFrontStill\`), or, where the
|
|
141
|
+
* view says the layers' motion the last image drew is their own at this image's pixels (\`ReflectionView.temporal.w\`'s fourth bit,
|
|
142
|
+
* \`layersOwnMotion\`: drawn by the image before, the camera standing since, on this grid), where the layer covering the pixel there drew
|
|
143
|
+
* none of its own, within \`LAYER_APART\` of a render pixel on each axis \u2014 an unknown motion or no layer, \`NO_LAYER_MOTION\`, lies past it.
|
|
144
|
+
* A tower's pane stands beside a car's window that drives: the front surface has no vector, its layer's motion tells it pixel by pixel. A
|
|
145
|
+
* layer that began to move this image, or stopped, is told so an image late, its history then held to the box as any other. */
|
|
146
|
+
fn frontStillAt(coord:vec2i)->bool{
|
|
147
|
+
if(reflectionFrontStill()){return true;}
|
|
148
|
+
if((reflectionView.temporal.w&8u)==0u){return false;}
|
|
149
|
+
return all(abs(textureLoad(frontMotion,coord,0).rg)<=vec2f(${lt(Di)}));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
struct TemporalHitMotion{known:bool,shift:vec3f,moves:bool,}
|
|
155
|
+
/** The motion of the hit of the pixel \`coord\`, its point \`P\` seen from \`V\`, its lobe's normal \`N\`, its ray met \`hit\` metres on
|
|
156
|
+
* along the mirror direction:
|
|
157
|
+
* - still on a still image (\`reflectionImageStill\`) and on one where nothing moves by itself (\`reflectionNoMovers\`): the hit moved
|
|
158
|
+
* by the camera alone, if at all, on the screen or off it, seen or hidden, on either surface \u2014 no vector is read;
|
|
159
|
+
* - unknown on a mirror that moves by itself (its vector says so: its reflection moves by the mirror's motion mirrored, which the
|
|
160
|
+
* surface's own motion follows only roughly) and on the transparents' front surface, which has no vector, but where no see-through
|
|
161
|
+
* surface moves by itself, nor the layer covering the pixel (\`frontStillAt\`): it then stands, and its hit is read as below;
|
|
162
|
+
* - still for a ray that met nothing within the longest ray a texel holds (\`REFLECTION_DISTANCE_MAX\`, within a half's step there):
|
|
163
|
+
* the environment, which no object moves;
|
|
164
|
+
* - unknown where the hit is not on this image's screen \u2014 behind the eye, past its edge \u2014 or lies behind something there, the depth
|
|
165
|
+
* seen at its pixel not its own within the history's distance threshold: no vector tells its motion;
|
|
166
|
+
* - still where its pixel's vector says it moves by the camera alone;
|
|
167
|
+
* - followed where it says it moves by itself: where it stood \u2014 its pixel's past by the one reading of a point's past (\`screenPast\`),
|
|
168
|
+
* the change of jitter it puts back (\`stillPast\`'s) taken off so that it lies in the last image's own raster, taken back to the
|
|
169
|
+
* world through the last view's inverse (\`ReflectionView.radianceInverse\`), exactly \u2014, the hit less it, mirrored across the
|
|
170
|
+
* mirror's plane. */
|
|
171
|
+
fn temporalHitMotion(coord:vec2i,P:vec3f,V:vec3f,N:vec3f,hit:f32)->TemporalHitMotion{
|
|
172
|
+
let unknown=TemporalHitMotion(false,vec3f(0.0),false);
|
|
173
|
+
let still=TemporalHitMotion(true,vec3f(0.0),false);
|
|
174
|
+
if(reflectionImageStill()||reflectionNoMovers()){return still;}
|
|
175
|
+
if(REFLECTION_LAYER!=0u){if(!frontStillAt(coord)){return unknown;}}
|
|
176
|
+
else if(hasOwnMotion(temporalVectorsAt(coord).r)){return unknown;}
|
|
177
|
+
if(hit>=REFLECTION_DISTANCE_MAX-0.5){return still;}
|
|
178
|
+
let H=P+reflect(-V,N)*hit;
|
|
179
|
+
let clip=reflectionView.viewProj*vec4f(H,1.0);
|
|
180
|
+
if(clip.w<=0.0){return unknown;}
|
|
181
|
+
let size=vec2f(reflectionViewport());
|
|
182
|
+
let ndc=clip.xy/clip.w;
|
|
183
|
+
let S=ndcToPixel(ndc,size);
|
|
184
|
+
if(any(S<vec2f(0.0))||any(S>=size)){return unknown;}
|
|
185
|
+
let depth=reflectionLinearDepth(clip);
|
|
186
|
+
if(abs(reflectionLinearOfDevice(surfaceDepthAt(0u,vec2i(S)))-depth)>=depth*reflectionView.denoise.z){return unknown;}
|
|
187
|
+
if(!reflectionMovesAt(S)){return still;}
|
|
188
|
+
let past=screenPast(temporalVectors,H,S,clip.z/clip.w);
|
|
189
|
+
// Its device position in the last image's raster: \`screenPast\` puts this image's jitter in place of the last one's, as \`stillPast\` does.
|
|
190
|
+
let raster=pixelToNdc(past.pixel,reflectionView.radiance.xy)-stillPast(vec4f(0.0,0.0,0.0,1.0));
|
|
191
|
+
let before=reflectionView.radianceInverse*vec4f(raster,past.z,1.0);
|
|
192
|
+
if(before.w==0.0){return unknown;}
|
|
193
|
+
let own=H-before.xyz/before.w;
|
|
194
|
+
return TemporalHitMotion(true,own-2.0*dot(own,N)*N,true);
|
|
195
|
+
}
|
|
196
|
+
/** Whether what a marked history reflected may have moved this image, \`left\` whether the rays round its pixel went through a place a mover
|
|
197
|
+
* left (\`temporalLeftAround\`): where the movers' list holds this image's movers, that alone \u2014 the light the history took there no longer
|
|
198
|
+
* where it was, a rough lobe's tail as its axis, by the rays that sample it; elsewhere, whether anything in the image moves by itself
|
|
199
|
+
* (\`reflectionNoMovers\`), a mover the list does not hold \u2014 a skinned body's limbs \u2014 told by its vectors alone. None on an image where
|
|
200
|
+
* nothing moves, nor where only movers no ray round the pixel saw past do: a mover that stopped, or stands, keeps its light marked. Read
|
|
201
|
+
* by the lobe's axis grown by its 3r\xB2 cone, a rough lobe's tail past that cone kept the light a jumping block left there, its widening at
|
|
202
|
+
* rest holding it: a blue haze where the block had stood, about fifty images long. */
|
|
203
|
+
fn temporalMoverMoved(left:bool)->bool{return select(!reflectionNoMovers(),left,reflectionMoversListed());}`);var on=v("REFLECTION_TEMPORAL_READ_WGSL",[k,S,R,ee,vt,be,$,Mt,ye,Xt],`@group(0) @binding(${u.historyIn}) var historyIn:texture_2d<u32>;
|
|
204
|
+
/** A history: its radiance in the denoiser's space, its luminance's second moment there, its count,
|
|
205
|
+
* whether it holds, whether it was read at rest \u2014 a still view's one texel, which softens nothing \u2014, whether what it reflected
|
|
206
|
+
* moved by itself (\`historyMover\`, any texel it kept), and the images in a row it stood settled (\`historySettled\`; none for a read
|
|
207
|
+
* between texels, which is no read at rest). */
|
|
208
|
+
struct TemporalHistory{radiance:vec3f,moment:f32,count:f32,valid:bool,still:bool,mover:bool,settled:u32,}
|
|
209
|
+
/** Whether the history texel \`t\` holds one the read keeps: one that holds, of the surface the read expects \u2014 its depth within
|
|
210
|
+
* \`threshold\` of \`depth\`, the depth the read expects that surface at in the last view, as a share of it (none kept where it expects
|
|
211
|
+
* none, a depth of zero). */
|
|
212
|
+
fn temporalKeeps(t:vec4u,depth:f32,threshold:f32)->bool{
|
|
213
|
+
return historyValid(t)&&abs(historyDepth(t)-depth)<depth*threshold;
|
|
214
|
+
}
|
|
215
|
+
/** The mirror's plane through \`P\`, of normal \`N\`, as the last view saw it: its crossing with the last eye's line of sight through a
|
|
216
|
+
* device position of that view's raster is affine in it \u2014 \u03C0\xB7Q, \u03C0 the plane, Q = \`radianceInverse\` \xB7 (x, y, 0, 1) \u2014, so four dots
|
|
217
|
+
* give it everywhere: along x, along y and the constant (\`across\`), and the plane at the last eye, the inverse's third column
|
|
218
|
+
* (\`eye\`). */
|
|
219
|
+
struct TemporalPlane{across:vec3f,eye:f32,}
|
|
220
|
+
fn temporalPlaneOf(P:vec3f,N:vec3f)->TemporalPlane{
|
|
221
|
+
let plane=vec4f(N,-dot(N,P));
|
|
222
|
+
let inverse=reflectionView.radianceInverse;
|
|
223
|
+
return TemporalPlane(vec3f(dot(plane,inverse[0]),dot(plane,inverse[1]),dot(plane,inverse[3])),dot(plane,inverse[2]));
|
|
224
|
+
}
|
|
225
|
+
/** The linear depth, in the last view, at which the last eye saw the plane \`plane\` at the device position \`at\` of its raster: the
|
|
226
|
+
* crossing X = (\u03C0\xB7E) Q \u2212 (\u03C0\xB7Q) E of its line of sight \u2014 from the eye E through Q \u2014 with the plane, whose clip position through the last
|
|
227
|
+
* view-projection is ((\u03C0\xB7E) at, \u2212\u03C0\xB7Q, \u03C0\xB7E) over X's \`w\`: its \`w\`, \u03C0\xB7E over X's, under a perspective; its \`z\`, \u2212\u03C0\xB7Q over X's, under
|
|
228
|
+
* an orthographic projection (E a direction there, its \`w\` zero). None (zero) where the line runs along the plane or meets it behind
|
|
229
|
+
* the last eye. */
|
|
230
|
+
fn temporalPlaneDepth(plane:TemporalPlane,at:vec2f)->f32{
|
|
231
|
+
let inverse=reflectionView.radianceInverse;
|
|
232
|
+
let crosses=dot(plane.across,vec3f(at,1.0));
|
|
233
|
+
let along=plane.eye*dot(vec3f(inverse[0].w,inverse[1].w,inverse[3].w),vec3f(at,1.0))-crosses*inverse[2].w;
|
|
234
|
+
if(along==0.0){return 0.0;}
|
|
235
|
+
return max(select(-crosses,plane.eye,slabPerspective(reflectionView.slab))/along,0.0);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
struct TemporalExpect{depth:f32,plane:TemporalPlane,mirror:bool,threshold:f32,}
|
|
241
|
+
fn temporalExpected(expect:TemporalExpect,texel:vec2f)->f32{
|
|
242
|
+
if(!expect.mirror){return expect.depth;}
|
|
243
|
+
let plane=temporalPlaneDepth(expect.plane,pixelToNdc(texel+vec2f(0.5),reflectionView.radiance.xy));
|
|
244
|
+
return select(0.0,plane+expect.depth,plane>0.0);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
fn temporalBilinear(screen:vec2f,expect:TemporalExpect)->TemporalHistory{
|
|
249
|
+
var held=TemporalHistory(vec3f(0.0),0.0,0.0,false,false,false,0u);
|
|
250
|
+
let size=reflectionView.radiance.xy;
|
|
251
|
+
if(any(screen<vec2f(0.0))||any(screen>size)){return held;}
|
|
252
|
+
let at=clamp(screen,vec2f(0.51),size-vec2f(0.51))-vec2f(0.5);
|
|
253
|
+
let corner=vec2i(floor(at));
|
|
254
|
+
let f=at-floor(at);
|
|
255
|
+
var sum=vec3f(0.0);
|
|
256
|
+
var moment=0.0;
|
|
257
|
+
var weights=0.0;
|
|
258
|
+
var count=0.0;
|
|
259
|
+
var kept=false;
|
|
260
|
+
var mover=false;
|
|
261
|
+
for(var k=0u;k<4u;k++){
|
|
262
|
+
let o=vec2u(k&1u,k>>1u);
|
|
263
|
+
let texel=corner+vec2i(o);
|
|
264
|
+
let t=textureLoad(historyIn,texel,0);
|
|
265
|
+
if(!temporalKeeps(t,temporalExpected(expect,vec2f(texel)),expect.threshold)){continue;}
|
|
266
|
+
let w=mix(1.0-f.x,f.x,f32(o.x))*mix(1.0-f.y,f.y,f32(o.y));
|
|
267
|
+
kept=kept||w>0.01;
|
|
268
|
+
mover=mover||(w>0.01&&historyMover(t));
|
|
269
|
+
sum+=w*reflectionDenoised(texelRadiance(t.xy));
|
|
270
|
+
moment+=w*historyMoment(t);
|
|
271
|
+
count+=w*historyCount(t);
|
|
272
|
+
weights+=w;
|
|
273
|
+
}
|
|
274
|
+
if(!kept){return held;}
|
|
275
|
+
return TemporalHistory(sum/weights,moment/weights,count/weights,true,false,mover,0u);
|
|
276
|
+
}
|
|
277
|
+
/** The history at \`screen\`, pixels of the last image, the change of jitter taken out, \`seen\` the place the last image drew the point at
|
|
278
|
+
* (the jitter left in), its texels kept where they hold what the read expects. A point within \`REFLECTION_STILL_READ\` of a texel's
|
|
279
|
+
* centre, a still view's, reads that texel alone, a read at rest; where that texel holds another surface \u2014 an edge the change of jitter
|
|
280
|
+
* moves the pixel across, a window's frame under one image's jitter and its glass under the next's \u2014, the four round \`seen\`,
|
|
281
|
+
* bilinearly, which hold the point's own surface: such a pixel lost its history at every image the jitter moved it across. Any other
|
|
282
|
+
* point reads its four, bilinearly. */
|
|
283
|
+
fn temporalHistory(screen:vec2f,seen:vec2f,expect:TemporalExpect)->TemporalHistory{
|
|
284
|
+
let size=reflectionView.radiance.xy;
|
|
285
|
+
if(any(screen<vec2f(0.0))||any(screen>size)){return TemporalHistory(vec3f(0.0),0.0,0.0,false,false,false,0u);}
|
|
286
|
+
let at=clamp(screen,vec2f(0.51),size-vec2f(0.51))-vec2f(0.5);
|
|
287
|
+
let nearest=round(at);
|
|
288
|
+
if(!all(abs(at-nearest)<vec2f(REFLECTION_STILL_READ))){return temporalBilinear(screen,expect);}
|
|
289
|
+
let t=textureLoad(historyIn,vec2i(nearest),0);
|
|
290
|
+
if(temporalKeeps(t,temporalExpected(expect,nearest),expect.threshold)){
|
|
291
|
+
return TemporalHistory(reflectionDenoised(texelRadiance(t.xy)),historyMoment(t),historyCount(t),true,true,historyMover(t),historySettled(t));
|
|
292
|
+
}
|
|
293
|
+
return temporalBilinear(seen,expect);
|
|
294
|
+
}
|
|
295
|
+
/** The history a pixel that resolves nothing this image writes (\`temporalPixel\`), on the surface \`layer\`: a reflecting pixel whose lobe
|
|
296
|
+
* traces no ray this image \u2014 the jitter put it on a rough frame beside the glass it showed the image before \u2014 keeps, at rest, the history
|
|
297
|
+
* its texel holds as the last image left it, for the next image that resolves one there to read whole: its own point drawn at that
|
|
298
|
+
* texel's centre in the last image, within \`REFLECTION_STILL_READ\`, the change of jitter taken out, its surface moved by nothing of its
|
|
299
|
+
* own (the front surface has no vector to tell it: only where its layer moves by nothing of its own, \`frontStillAt\`). None
|
|
300
|
+
* elsewhere, nor where no history is read. Such a pixel lost the glass's history at every image the jitter moved it onto the frame, and read it back young.
|
|
301
|
+
* The front surface hands it on so too where it reflects nothing at the pixel this image \u2014 none of it there: the jitter put the pixel on
|
|
302
|
+
* a tower's mullion beside the pane it showed the image before \u2014, its place told by the opaque surface's point there, the front layer
|
|
303
|
+
* holding none: a pixel on a mullion's edge, on the pane one image in two, read its history back from none at every image it came back
|
|
304
|
+
* to the pane, never past a count of one or two, under a camera that stood. The last pass reads no history of a pixel with no surface's
|
|
305
|
+
* normal (\`bilateralTop\`). \`left\`: whether the rays round the pixel went through a place a mover left (\`temporalLeftAround\`). */
|
|
306
|
+
fn temporalHeld(coord:vec2i,layer:u32,left:bool)->vec4u{
|
|
307
|
+
let none=vec4u(0u);
|
|
308
|
+
if(reflectionView.traced.x==0u||!reflectionDone(REFLECTION_TEMPORAL)){return none;}
|
|
309
|
+
let reflects=surfaceReflects(surfaceFlagsAt(coord));
|
|
310
|
+
if(layer==0u){if(!reflects||hasOwnMotion(temporalVectorsAt(coord).r)){return none;}}
|
|
311
|
+
else if(!frontStillAt(coord)){return none;}
|
|
312
|
+
let P=surfacePointAt(select(0u,layer,reflects),coord);
|
|
313
|
+
let camera=reflectionView.radianceViewProj*vec4f(P,1.0);
|
|
314
|
+
if(!(camera.w>0.0)){return none;}
|
|
315
|
+
let at=ndcToPixel(stillPast(camera),reflectionView.radiance.xy)-vec2f(0.5);
|
|
316
|
+
if(any(abs(at-vec2f(coord))>=vec2f(REFLECTION_STILL_READ))){return none;}
|
|
317
|
+
let held=textureLoad(historyIn,coord,0);
|
|
318
|
+
// A marked history whose mover may have moved (\`temporalMoverMoved\`) is handed on by no light of this image that would keep it: none.
|
|
319
|
+
if(historyMover(held)&&temporalMoverMoved(left)){return none;}
|
|
320
|
+
return held;
|
|
321
|
+
}`);var an=v("REFLECTION_TEMPORAL_MIRROR_WGSL",[k,S,R,$],"/** The point the reflection at `P`, seen from `V`, seems to lie at, its ray's hit `hit` metres on: the hit's distance on beyond `P`\n * along the pixel's view ray, where a flat mirror shows its hit \u2014 the hit's image across the mirror's plane \u2014, under either projection.\n * Not at the depth plus the hit's distance: that point lies further by the hit's distance times 1 / cos \u03B8 \u2212 1, \u03B8 the pixel's angle off\n * the view's axis, and a moving eye would read its history beside the reflection's. */\nfn temporalHitPoint(P:vec3f,V:vec3f,hit:f32)->vec3f{return P-V*hit;}\n/** Along the screen's axis `axis` from the pixel `coord`, its point `P` on a mirror of lobe normal `N` whose ray met the scene `hit`\n * metres on: the neighbour on the side nearer flat (the other may be another surface), its lobe's normal against the pixel's \u2014 the\n * coat's with a coat's, the base's with a base's (`surfaceTopRawAt`, as the pixel's own) \u2014, the step to it signed along the axis\n * (`xyz`), and the power g = 2 \xB7 curvature \xB7 hit of a mirror of the curvature the two measure, the change of the normal along the step\n * over the step's length squared, convex positive (`w`): a mirror of that power shows the hit hit / (1 + g) behind it \u2014 a car door\n * of a 2 m radius shows a facade 30 m off about 1 m behind it; ripples of a normal map count, their reflection no flat mirror's either.\n * None (zero) where no neighbour along the axis lies in the viewport. */\nfn temporalBendAlong(coord:vec2i,P:vec3f,N:vec3f,hit:f32,axis:vec2i)->vec4f{\n let last=vec2i(reflectionViewport())-vec2i(1);\n var nearest=vec4f(0.0);\n var seen=false;\n for(var side=-1;side<=1;side+=2){\n let at=clamp(coord+axis*side,vec2i(0),last);\n if(all(at==coord)){continue;}\n let step=surfacePointAt(REFLECTION_LAYER,at)-P;\n let span=dot(step,step);\n if(!(span>0.0)){continue;}\n let g=2.0*hit*dot(surfaceTopRawAt(at,surfaceFlagsAt(at)).xyz-N,step)/span;\n if(!seen||abs(g)<abs(nearest.w)){nearest=vec4f(step*f32(side),g);}\n seen=true;\n }\n return nearest;\n}\n/** The mirror at the pixel `coord` as its neighbours tell it (`temporalBendAlong`), its point `P` seen from `V`, its lobe's normal `N`,\n * its hit `hit` metres on: its power along each axis of the screen (`bend`), and the normal of the plane its geometry lies in, the\n * two steps' (`normal`, facing the eye; the lobe's where they span none), which a normal map does not turn. */\nstruct TemporalMirror{bend:vec2f,normal:vec3f,}\nfn temporalMirrorOf(coord:vec2i,P:vec3f,N:vec3f,V:vec3f,hit:f32)->TemporalMirror{\n let x=temporalBendAlong(coord,P,N,hit,vec2i(1,0));\n let y=temporalBendAlong(coord,P,N,hit,vec2i(0,1));\n let across=cross(x.xyz,y.xyz);\n if(!(dot(across,across)>0.0)){return TemporalMirror(vec2f(x.w,y.w),N);}\n return TemporalMirror(vec2f(x.w,y.w),normalize(across)*select(1.0,-1.0,dot(across,V)<0.0));\n}\n/** Where, in the last image's raster (device position, the change of jitter taken out: `stillPast`), the image a mirror of power `g`\n * showed: on the line from the mirror's point to the flat mirror's image, at 1 / (1 + g) of it, whose clip position through the last\n * view-projection is g \xB7 `camera` + `image` (the point's and the flat image's) over 1 + g \u2014 the place on the screen that line's\n * point projects to whatever the sign of 1 + g, so affine in g, exact under either projection: the flat image itself at g = 0, the\n * mirror's own point as g grows (a bump's glint moves with its surface), past it toward the eye where 1 + g falls under zero (a real\n * image before a concave mirror) (`xy`); and that clip position's `w` (`z`), none where the image stood on the last eye's plane, its\n * place at no finite point of the screen, its sign turning as the image crosses that plane. */\nfn temporalCurvedPast(camera:vec4f,image:vec4f,g:f32)->vec3f{\n let clip=camera*g+image;\n return vec3f(stillPast(clip),clip.w);\n}\n/** Whether the last eye saw the mirror's point and its flat image along one line of sight: their clip positions through the last\n * view-projection (`camera`, `image`, both before it) at one place of its raster, within `REFLECTION_STILL_READ` of a pixel \u2014 an eye\n * that stood still, turned, or moved along the pixel's line of sight. The image a mirror of any power shows lies on that line (its clip\n * position g \xB7 `camera` + `image`, whatever the sign of its `w`), so its place is that one whatever the mirror's curvature and the\n * incidence: there is nothing to measure nor to bound (`temporalCurvedRead`). */\nfn temporalAligned(camera:vec4f,image:vec4f)->bool{\n if(!(camera.w>0.0&&image.w>0.0)){return false;}\n let gap=abs(camera.xy/camera.w-image.xy/image.w)*0.5*reflectionView.radiance.xy;\n return all(gap<vec2f(REFLECTION_STILL_READ));\n}\n/** Where a mirror's hit's history is read in the last image's raster (`past`), whether it is seen there (`valid`: the flat image\n * before the last eye, neither axis's image on its plane), and the most images that place can hold (`images`; a mirror the last eye\n * saw along one line with its image is read flat, `temporalAligned`, its place known whatever its power): astigmatic, a curved\n * mirror's image lies at one distance along each axis of the screen, so each axis is read where the image of its own power `bend` stood\n * (`temporalCurvedPast`) \u2014 one point, two shares \u2014; the powers its neighbours measure are a normal incidence's, the true one along an\n * axis lies between g \xB7 cos \u03B8 and g / cos \u03B8 (Coddington's sagittal and tangential; `facing` the cosine), so the place is known to within\n * the farther of the two ends' places, e pixels an image, and a history of n images lags (n \u2212 1) e behind its reflection: 1 + 0.5 / e\n * images keep it within half a pixel, continuously; none bound on a flat mirror, e nil; one where the image may cross the last eye's\n * plane between the two ends (the sign of its `w` turns: it is linear in g), its place anywhere. `camera` and `image` are the\n * mirror's point's and the flat image's clip positions through the last view-projection. */\nstruct TemporalCurved{past:vec2f,valid:bool,images:f32,}\nfn temporalCurvedRead(camera:vec4f,image:vec4f,bend:vec2f,facing:f32)->TemporalCurved{\n let x=temporalCurvedPast(camera,image,bend.x);\n let y=temporalCurvedPast(camera,image,bend.y);\n let past=vec2f(x.x,y.y);\n let c=clamp(facing,1e-3,1.0);\n var off=vec2f(0.0);\n var seen=true;\n // A flat mirror's ends are its read itself (a still image's, which reads no neighbour): nothing to measure.\n for(var end=0;end<select(0,2,any(bend!=vec2f(0.0)));end++){\n let k=select(1.0/c,c,end==0);\n let ex=temporalCurvedPast(camera,image,bend.x*k);\n let ey=temporalCurvedPast(camera,image,bend.y*k);\n seen=seen&&ex.z*x.z>0.0&&ey.z*y.z>0.0;\n off=max(off,abs(vec2f(ex.x,ey.y)-past));\n }\n let e=length(off*0.5*reflectionView.radiance.xy);\n return TemporalCurved(past,image.w>0.0&&x.z!=0.0&&y.z!=0.0,select(1.0,1.0+0.5/max(e,1e-30),seen));\n}");var nn=v("REFLECTION_TEMPORAL_BLEND_WGSL",[S,R,Se,Le,xo,jt],`/** The images a pixel's history holds at most, \`rough\` the roughness of the lobe it traces, \`still\` whether the history it carries is
|
|
322
|
+
* the one read from its hit, a hit whose motion is known (\`temporalHitMotion\`), read at rest \u2014 a still view's one texel
|
|
323
|
+
* (\`TemporalHistory.still\`): the setting's. At full resolution the short law (\`reflectionHistoryLaw\`), two lerped up to the setting's
|
|
324
|
+
* by the roughness over \`REFLECTION_MIRROR_ROUGHNESS\`, for a history read from the surface, which a mirror's reflection moves unlike,
|
|
325
|
+
* from a hit whose motion is not known, or read between texels, and for a true mirror's (a roughness of zero) whatever it is read from;
|
|
326
|
+
* a near mirror's history read at rest, the setting's: a read that softens nothing, its images averaging noise alone. In motion every
|
|
327
|
+
* history is resampled, each image softening what it holds, and the short law holds: a sharper kernel keeps more of the noise at every
|
|
328
|
+
* frequency it keeps more of the content at, so no longer law read through it stays as near the truth as the short one read
|
|
329
|
+
* bilinearly for every share of noise (\`docs/engine/light-that-bounces.md\`). A history settled at rest, the clamp leaving it in place,
|
|
330
|
+
* holds more, whatever it is read from (\`temporalRestImages\`). Where the pixel's light is a mover's (\`mover\`) at full resolution, a true
|
|
331
|
+
* mirror's ray is its own pixel's, exact, and its history either resampled where the moving reflection's image stood, each image blurring
|
|
332
|
+
* its edges, or read where it no longer stands: one image, lerped up to the setting's by the roughness over the mirror's. Held to two,
|
|
333
|
+
* the image after a mover stopped kept a third of the motion's blurred edges, which the 3 \xD7 3's least and most of an edge hold, and
|
|
334
|
+
* forgot them as one over the count: the reflected block's outline more than four images after it stopped. Full resolution is a pixel's
|
|
335
|
+
* whose surface traces a ray a pixel, or whose light is its own ray's alone (\`own\`, \`resolvedOwn\`). */
|
|
336
|
+
fn temporalMostImages(rough:f32,still:bool,mover:bool,own:bool)->f32{
|
|
337
|
+
let full=own||all(reflectionBlock()==vec2u(1u));
|
|
338
|
+
let most=reflectionView.denoise.x;
|
|
339
|
+
if(mover&&full){return mix(min(1.0,most),most,saturate(rough/REFLECTION_MIRROR_ROUGHNESS));}
|
|
340
|
+
return select(reflectionHistoryLaw(rough,full),most,still&&full&&rough>0.0);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
const REFLECTION_NOISE_TURNS:f32=${lt(Ao)};
|
|
348
|
+
fn temporalRestImages(most:f32,mirror:f32)->f32{
|
|
349
|
+
return max(most,reflectionView.denoise.x*mix(1.0,REFLECTION_NOISE_TURNS,mirror));
|
|
350
|
+
}
|
|
351
|
+
/** The box a history is held to, in YCoCg (\`temporalPixel\`): the window's centre \xB1 \`extent\` for a rough lobe, the 3 \xD7 3's least and most
|
|
352
|
+
* for a mirror, between by \`mirror\`, the lobe's share of a mirror; widened to \`scatter\` round the centre at least. */
|
|
353
|
+
struct TemporalBox{lo:vec3f,hi:vec3f,}
|
|
354
|
+
fn temporalBox(window:TemporalWindow,extent:vec3f,scatter:f32,mirror:f32)->TemporalBox{
|
|
355
|
+
let wide=max(extent,vec3f(scatter));
|
|
356
|
+
return TemporalBox(min(mix(window.centre-wide,window.low,mirror),window.centre-vec3f(scatter)),max(mix(window.centre+wide,window.high,mirror),window.centre+vec3f(scatter)));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
fn temporalHeldTo(hit:vec3f,surface:vec3f,alpha:f32,box:TemporalBox)->vec3f{
|
|
360
|
+
return mix(clamp(hit,box.lo,box.hi),clamp(surface,box.lo,box.hi),alpha);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
fn temporalBlend(kept:vec3f,now:vec3f,share:f32,rough:f32)->vec3f{
|
|
368
|
+
let full=reflectionToneScale();
|
|
369
|
+
let scale=full*saturate(rough/REFLECTION_MIRROR_ROUGHNESS);
|
|
370
|
+
if(scale==full){return mix(kept,now,share);}
|
|
371
|
+
let a=weightedTonemap(reflectionLinear(kept),scale);
|
|
372
|
+
let b=weightedTonemap(reflectionLinear(now),scale);
|
|
373
|
+
return reflectionDenoised(weightedUntonemap(mix(a,b,share),scale));
|
|
374
|
+
}
|
|
375
|
+
/** The light \`light\` the history of the pixel \`coord\` stores, rounded into its halves (\`historyPack\`) up or down with the odds that
|
|
376
|
+
* make it right on average (\`ditherIntoFloat\`), by a draw of the pixel at the image's index, which runs on: no cycle of draws biases a
|
|
377
|
+
* pixel's mean. Rounded by the device, to the nearest half or toward zero, a history blended at one over 96 moved by nothing where the
|
|
378
|
+
* blend moved it by less than half a step of its halves, and kept for ever a leftover under 48 steps, 2.4 to 4.9 % of its light. The
|
|
379
|
+
* noise it adds is about \u221A(count / 12) steps of a half: at 96 images, about a fifth of an 8-bit display's step. */
|
|
380
|
+
fn temporalStored(light:vec3f,coord:vec2i)->vec3f{
|
|
381
|
+
return ${So("light","frameRandom(coord,reflectionView.temporal.z).x","rgba16float")};
|
|
382
|
+
}`);var Zt=v("REFLECTION_TEMPORAL_WGSL",[k,j,S,R,Yt,Oe,ee,$,Z,ft,Q,jt,Xt,on,an,nn],`@group(0) @binding(${u.historyOut}) var historyOut:texture_storage_2d<${Vo},write>;
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
fn temporalReconstructed(coord:vec2i,resolved:vec2u)->bool{
|
|
386
|
+
return !resolvedOwn(resolved)&&any(vec2u(coord)!=reflectionPickedPixel(vec2u(coord)/reflectionBlock()));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
fn temporalPixel(coord:vec2i,local:vec2u,layer:u32)->vec4u{
|
|
390
|
+
let mine=temporalShare(vec2i(local)+vec2i(${Ae}));
|
|
391
|
+
// Whether the rays round the pixel went through a place a mover left (\`temporalLeftAround\`), read where the list is this image's alone.
|
|
392
|
+
let left=reflectionMoversListed()&&temporalLeftAround(local);
|
|
393
|
+
if(mine.w<0.5){return temporalHeld(coord,layer,left);}
|
|
394
|
+
var lighting=fromYcocg(mine.xyz);
|
|
395
|
+
|
|
396
|
+
var moment=luminance(lighting)*luminance(lighting);
|
|
397
|
+
// The lobe as it is traced: its roughness biased toward a mirror (\`reflectionSmoothed\`), the rays', the resolve's and the last filter's.
|
|
398
|
+
let top=surfaceTopAt(coord,surfaceFlagsAt(coord));
|
|
399
|
+
let P=surfacePointAt(layer,coord);
|
|
400
|
+
let V=viewToEye(P);
|
|
401
|
+
var count=0.0;
|
|
402
|
+
// The images in a row its history has stood settled, this one included (\`historySettled\`): none but where it settles.
|
|
403
|
+
var settledRun=0u;
|
|
404
|
+
// Whether the pixel's hit moves by itself and was followed (\`temporalHitMotion\`), or the light the resolve gave it is, whole or in part,
|
|
405
|
+
// that of a surface that moves by itself (\`freshMoves\`: a texel it weighs, its own ray's or a neighbour's, took a mover's light): what
|
|
406
|
+
// its history is told it reflected (\`historyPack\`). Judged by its own ray alone, a pixel that borrowed the mover's light from its
|
|
407
|
+
|
|
408
|
+
var moverHit=false;
|
|
409
|
+
// Whether the history kept carries a mover's mark into the light it blends (\`historyMover\`, by the share of it each history keeps): the
|
|
410
|
+
|
|
411
|
+
var carried=false;
|
|
412
|
+
if(reflectionView.traced.x!=0u&&reflectionDone(REFLECTION_TEMPORAL)){
|
|
413
|
+
|
|
414
|
+
let noise=interleavedGradientNoise(vec2f(coord),f32(reflectionView.temporal.y));
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
let threshold=reflectionView.denoise.z*mix(0.5,1.5,noise);
|
|
418
|
+
let widened=threshold/clamp(dot(V,top.xyz),0.1,1.0);
|
|
419
|
+
let size=reflectionView.radiance.xy;
|
|
420
|
+
let camera=reflectionView.radianceViewProj*vec4f(P,1.0);
|
|
421
|
+
let now=reflectionView.viewProj*vec4f(P,1.0);
|
|
422
|
+
let own=select(vec3f(0.0),vec3f(temporalOwnMotion(coord,camera),temporalOwnDepth(coord,now.z/now.w,camera.z/camera.w)),camera.w>0.0&&now.w>0.0);
|
|
423
|
+
|
|
424
|
+
let depth=select(reflectionLinearDepth(camera),reflectionLinearOfDevice(camera.z/camera.w-own.z),own.z!=0.0);
|
|
425
|
+
// Where the last image drew a point: where it is read, less the change of jitter \`stillPast\` puts back.
|
|
426
|
+
let jitterMoved=stillPast(vec4f(0.0,0.0,0.0,1.0));
|
|
427
|
+
var fromHit=TemporalHistory(vec3f(0.0),0.0,0.0,false,false,false,0u);
|
|
428
|
+
|
|
429
|
+
var known=false;
|
|
430
|
+
var followed=false;
|
|
431
|
+
// The most images a mirror's hit's read can hold (\`temporalCurvedRead\`): none bound but on a curved mirror in motion.
|
|
432
|
+
var held=1e30;
|
|
433
|
+
|
|
434
|
+
let resolved=textureLoad(temporalIn,coord,0).xy;
|
|
435
|
+
moverHit=freshMoves(resolved);
|
|
436
|
+
// The dominant-direction factor of the lobe it traces, r its roughness: s\xB7(\u221As + r), s = 1 \u2212 r
|
|
437
|
+
|
|
438
|
+
let s=saturate(1.0-top.w);
|
|
439
|
+
if(s*(sqrt(s)+top.w)>0.5){
|
|
440
|
+
let hit=freshHit(resolved);
|
|
441
|
+
var image=temporalHitPoint(P,V,hit);
|
|
442
|
+
// A hit whose motion is known is read where its image stood, whatever the lobe \u2014 a hit moving by itself followed, the history then
|
|
443
|
+
// carried by following it alone \u2014; a near mirror's so known holds, at rest, the setting's images. Any other where a still hit's image
|
|
444
|
+
|
|
445
|
+
let motion=temporalHitMotion(coord,P,V,top.xyz,hit);
|
|
446
|
+
known=motion.known;
|
|
447
|
+
followed=motion.moves;
|
|
448
|
+
moverHit=moverHit||followed;
|
|
449
|
+
image-=motion.shift;
|
|
450
|
+
let imaged=reflectionView.radianceViewProj*vec4f(image,1.0);
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
// eye's, though something else in the image moves: \`temporalAligned\`) \u2014 the image of any power stands at that place, and a bound
|
|
454
|
+
// measured there held a grazing pane whose neighbours' normals turn by a tenth of a degree to one image \u2014, its mirror flat, its plane
|
|
455
|
+
// through its point, which its own texel holds; a rougher lobe neither: its plane faces the eye through its point \u2014 the surface's
|
|
456
|
+
// depth, as its own history is read, the threshold widened as the surface's \u2014, never the lobe's normal, which a normal map may turn
|
|
457
|
+
|
|
458
|
+
let measured=!(reflectionImageStill()||temporalAligned(camera,imaged))&&top.w<REFLECTION_MIRROR_ROUGHNESS;
|
|
459
|
+
var mirror=TemporalMirror(vec2f(0.0),V);
|
|
460
|
+
if(measured){mirror=temporalMirrorOf(coord,P,top.xyz,V,hit);}
|
|
461
|
+
let read=temporalCurvedRead(camera,imaged,mirror.bend,dot(V,top.xyz));
|
|
462
|
+
held=read.images;
|
|
463
|
+
|
|
464
|
+
if(read.valid){
|
|
465
|
+
let kept=select(widened,threshold,measured);
|
|
466
|
+
let expect=TemporalExpect(depth-reflectionLinearDepth(camera),temporalPlaneOf(P,mirror.normal),true,kept);
|
|
467
|
+
fromHit=temporalHistory(ndcToPixel(read.past-own.xy,size),ndcToPixel(read.past-jitterMoved-own.xy,size),expect);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
var fromSurface=TemporalHistory(vec3f(0.0),0.0,0.0,false,false,false,0u);
|
|
471
|
+
if(camera.w>0.0){
|
|
472
|
+
let expect=TemporalExpect(depth,TemporalPlane(vec3f(0.0),0.0),false,widened);
|
|
473
|
+
let past=stillPast(camera)-own.xy;
|
|
474
|
+
fromSurface=temporalHistory(ndcToPixel(past,size),ndcToPixel(past-jitterMoved,size),expect);
|
|
475
|
+
}
|
|
476
|
+
// A history that reflected what moves by itself holds it where it stood: on an image what it reflected may have moved \u2014 a ray round the
|
|
477
|
+
// pixel went through a place a mover left (\`temporalMoverMoved\`) \u2014, the surface's, which follows the surface, never stands for it; the
|
|
478
|
+
|
|
479
|
+
// On an image where it did not move \u2014 it stopped, it stands, another mover elsewhere moved \u2014, both are kept, their mark with them: the
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
if(fromSurface.mover||fromHit.mover){
|
|
484
|
+
let moved=temporalMoverMoved(left);
|
|
485
|
+
if(fromSurface.mover&&moved){fromSurface.valid=false;}
|
|
486
|
+
if(fromHit.mover&&!moverHit&&moved){fromHit.valid=false;}
|
|
487
|
+
}
|
|
488
|
+
if(fromSurface.valid||fromHit.valid){
|
|
489
|
+
let reconstructed=temporalReconstructed(coord,resolved);
|
|
490
|
+
let window=temporalWindow(local,mine.xyz);
|
|
491
|
+
let hitY=toYcocg(fromHit.radiance);
|
|
492
|
+
let surfaceY=toYcocg(fromSurface.radiance);
|
|
493
|
+
// The lobe's share of a mirror: one less its roughness over \`REFLECTION_MIRROR_ROUGHNESS\`.
|
|
494
|
+
let mirrorShare=1.0-saturate(top.w/REFLECTION_MIRROR_ROUGHNESS);
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
// the surface's history, read where the surface stood, shows only where nothing the mirror reflects differs from its neighbour \u2014 under
|
|
499
|
+
// a moving eye it brought a reflection's edge from where the surface had seen it, which the 3 \xD7 3 round an edge holds.
|
|
500
|
+
var alpha=0.0;
|
|
501
|
+
if(fromSurface.valid&&length(window.centre-hitY)>length(window.centre-surfaceY)+0.01/max(view.preExposure.x,REFLECTION_EPSILON)){alpha=0.8*(1.0-mirrorShare);}
|
|
502
|
+
alpha=select(1.0,alpha,fromHit.valid);
|
|
503
|
+
carried=(fromHit.valid&&fromHit.mover&&alpha<1.0)||(fromSurface.valid&&fromSurface.mover&&alpha>0.0);
|
|
504
|
+
let history=mix(hitY,surfaceY,alpha);
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
let heldMoment=mix(fromHit.moment,fromSurface.moment,alpha);
|
|
508
|
+
let heldLuminance=luminance(fromYcocg(history));
|
|
509
|
+
let heldSpread=max(heldMoment-heldLuminance*heldLuminance,0.0);
|
|
510
|
+
|
|
511
|
+
let surfaceChosen=alpha>0.5;
|
|
512
|
+
let atRest=select(fromHit.still,fromSurface.still,surfaceChosen);
|
|
513
|
+
|
|
514
|
+
// past the window's extent: the box reaches the setting's deviations of the history's own noise round it, at the window's light \u2014
|
|
515
|
+
// as much where the light holds, less as it falls, none on a light gone out \u2014, so a converged history is not clamped by the noise.
|
|
516
|
+
|
|
517
|
+
// no neighbour, so the 3 \xD7 3 round it holds its answers' mean, and a widening by its own spread only ever kept what this image no
|
|
518
|
+
// longer shows \u2014 where a mover's reflection had stood, the light it left there, swelling the very spread that kept it (a thin outline
|
|
519
|
+
|
|
520
|
+
let centreLuminance=luminance(fromYcocg(window.centre));
|
|
521
|
+
let atLight=saturate(centreLuminance/max(heldLuminance,REFLECTION_EPSILON));
|
|
522
|
+
let scatter=select(0.0,reflectionView.denoise.y*sqrt(heldSpread)*atLight*(1.0-mirrorShare),atRest);
|
|
523
|
+
let spread=window.extent*select(1.0,2.0,reconstructed);
|
|
524
|
+
let extent=max(spread,vec3f(scatter));
|
|
525
|
+
// The box: the mean \xB1 the extent for a rough lobe, the 3 \xD7 3's least and most for a mirror, between by the roughness, at rest no
|
|
526
|
+
|
|
527
|
+
let clamped=temporalHeldTo(hitY,surfaceY,alpha,temporalBox(window,spread,scatter,mirrorShare));
|
|
528
|
+
let least=vec3f(REFLECTION_CLAMP_FLOOR/max(view.preExposure.x,REFLECTION_EPSILON));
|
|
529
|
+
let trust=0.75*saturate(1.0-length(abs(clamped-history)/max(extent,least)))+0.25;
|
|
530
|
+
|
|
531
|
+
// youngest (\`bilateralTop\`), yet holds that image's light. Counted as none, the fresh light was taken whole and the image the pixel
|
|
532
|
+
|
|
533
|
+
let chosen=max(select(fromHit.count,fromSurface.count,surfaceChosen),1.0);
|
|
534
|
+
|
|
535
|
+
// that is a mover's, its own image (\`temporalMostImages\`).
|
|
536
|
+
let most=min(temporalMostImages(top.w,known&&fromHit.still&&!surfaceChosen,moverHit,resolvedOwn(resolved)),held);
|
|
537
|
+
|
|
538
|
+
// by nothing of its own, \`frontStillAt\`), the box this image alone draws leaving it where it was. Its rays' answers turn image after image between what
|
|
539
|
+
// the per-image draws pick \u2014 a hit or the next stage, the screen's light or the cache's, a step of the march \u2014 and a still eye's jitter, whose cycle is prime, never
|
|
540
|
+
|
|
541
|
+
// setting's for each turn of the view's noise (\`temporalRestImages\`), never shortened while it stays so but to what its hit's read can
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
// alone keeps from the clamp holds the setting's images at most and a leftover falls by the setting's law \u2014 where it settled, a
|
|
545
|
+
|
|
546
|
+
// settled longer than the setting's law takes to forget what it held before (\`ReflectionView.forgetImages\`, \`historySettled\`): until
|
|
547
|
+
// then, the setting's. What the eye's motion left in it \u2014 an edge resampled between texels, a reflection read from a place the
|
|
548
|
+
// mirror's neighbours hold too \u2014 lies within the box an edge's 3 \xD7 3 draws, which tells it from nothing, and a history that grew from
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
let still=atRest&&!moverHit&&(layer==0u||frontStillAt(coord))&&all(clamped==history);
|
|
552
|
+
let settled=still&&all(temporalHeldTo(hitY,surfaceY,alpha,temporalBox(window,spread,0.0,mirrorShare))==history);
|
|
553
|
+
if(settled){settledRun=select(fromHit.settled,fromSurface.settled,surfaceChosen)+1u;}
|
|
554
|
+
if(settled&&f32(settledRun)>reflectionView.forgetImages){count=min(min(chosen+1.0,max(temporalRestImages(most,mirrorShare),chosen)),held);}
|
|
555
|
+
else if(still){count=min(min(chosen+1.0,reflectionView.denoise.x),held);}
|
|
556
|
+
else{count=accumulationCount(min(chosen,reflectionView.denoise.x)*trust,1.0,most);}
|
|
557
|
+
let fresh=1.0/(count+select(0.0,4.0,reconstructed));
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
let clampedLuminance=luminance(fromYcocg(clamped));
|
|
561
|
+
moment=mix(heldSpread+clampedLuminance*clampedLuminance,moment,fresh);
|
|
562
|
+
lighting=temporalBlend(fromYcocg(clamped),lighting,fresh,top.w);
|
|
563
|
+
}
|
|
564
|
+
else if(top.w>0.0){
|
|
565
|
+
// A restart, no history kept: its moment holds the noise this image's rays round it show (\`temporalRaysSpread\`), a rough lobe's \u2014
|
|
566
|
+
// none for a true mirror, whose rays carry no lobe's noise, a share between by the roughness over \`REFLECTION_MIRROR_ROUGHNESS\`.
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
// quarter, its count held at 4 / 3 \u2014 one image's light and the clamp's \u2014 and its moment learning the clamped light's spread alone,
|
|
570
|
+
|
|
571
|
+
// the spread down (the seed's share falls as one over the count) and the last filter reads it noisy while it holds (\`bilateralTop\`).
|
|
572
|
+
moment+=temporalRaysSpread(coord,layer,P,top.w)*saturate(top.w/REFLECTION_MIRROR_ROUGHNESS);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
return historyPack(temporalStored(reflectionLinear(max(makeFinite3(lighting),vec3f(0.0))),coord),surfaceLinearDepth(P),max(makeFinite(moment),0.0),count,moverHit||carried,settledRun);
|
|
577
|
+
}
|
|
578
|
+
@compute @workgroup_size(${m},${m})
|
|
579
|
+
fn temporalSurface(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
580
|
+
let t=reflectionTileOf(tile,groups);
|
|
581
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
582
|
+
let origin=reflectionTileOrigin(t);
|
|
583
|
+
temporalStage(vec2i(origin),lane);
|
|
584
|
+
workgroupBarrier();
|
|
585
|
+
let id=origin+local.xy;
|
|
586
|
+
if(any(id>=reflectionViewport())){return;}
|
|
587
|
+
textureStore(historyOut,id,temporalPixel(vec2i(id),local.xy,REFLECTION_LAYER));
|
|
588
|
+
}`);var zs={resolve:e=>`let seen=bilateralSeen(coord,own,${e}u);`,clear:e=>`let seen=bilateralField(own,${e}u);`},Ys=[`let entirely=bilateralProbesLeft||!(seen.share.x>0.0);
|
|
589
|
+
textureStore(reflectionOut,coord,0,vec4f(seen.ray*(seen.share.x+seen.share.y),select(seen.share.x,REFLECTION_PROBES_LEFT,entirely)));
|
|
590
|
+
if(hasCoat()){textureStore(reflectionOut,coord,1,vec4f(0.0,0.0,0.0,1.0-seen.share.y));}`,`let blended=bilateralBlended(seen);
|
|
591
|
+
textureStore(frontOut,coord,vec4u(frontPack(blended.base),frontPack(blended.coat),bitcast<u32>(reflectionFrontDepth(coord)),0u));`],Us=["","textureStore(frontOut,coord,vec4u(0u,0u,bitcast<u32>(reflectionFrontDepth(coord)),0u));"],qs=["let own=reflectingSurfaceAt(coord,flags);","let own=reflectingPixelAt(1u,coord,flags);"],sn={resolve:"",clear:"if((t&REFLECTION_EMPTY_RESOLVED)==0u){textureStore(resolvedOut,coord,vec4u(0u));}if((t&REFLECTION_EMPTY_HISTORY)==0u){textureStore(historyOut,coord,vec4u(0u));}"},Or=(e,t,r)=>`@compute @workgroup_size(${m},${m})
|
|
592
|
+
fn ${e}(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u){
|
|
593
|
+
let t=reflectionTileOf(tile,groups);
|
|
594
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
595
|
+
let id=reflectionTileOrigin(t)+local.xy;
|
|
596
|
+
if(any(id>=reflectionViewport())){return;}
|
|
597
|
+
let coord=vec2i(id);
|
|
598
|
+
${sn[r]}
|
|
599
|
+
let flags=surfaceFlagsAt(coord);
|
|
600
|
+
if(!surfaceReflects(flags)){${Us[t]}return;}
|
|
601
|
+
${qs[t]}
|
|
602
|
+
${zs[r](t)}
|
|
603
|
+
${Ys[t]}
|
|
604
|
+
}`,Ks=`@compute @workgroup_size(${m},${m})
|
|
605
|
+
fn clearOpaque(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u){
|
|
606
|
+
let t=reflectionTileOf(tile,groups);
|
|
607
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
608
|
+
let id=reflectionTileOrigin(t)+local.xy;
|
|
609
|
+
if(any(id>=reflectionViewport())){return;}
|
|
610
|
+
let coord=vec2i(id);
|
|
611
|
+
${sn.clear}
|
|
612
|
+
if(!surfaceReflects(surfaceFlagsAt(coord))){return;}
|
|
613
|
+
textureStore(reflectionOut,coord,0,vec4f(0.0,0.0,0.0,REFLECTION_PROBES_LEFT));
|
|
614
|
+
}`,ln=[Or("bilateralOpaque",0,"resolve"),Ks,Or("bilateralFront",1,"resolve"),Or("clearFront",1,"clear")].join(`
|
|
615
|
+
`);var Nr=v("REFLECTION_YOUNG_FILTER_WGSL",[_e(b),R,bi,_i,xi],`fn reflectionFilterTaps(share:f32,frames:f32)->u32{
|
|
616
|
+
let least=reflectionView.taps.y;
|
|
617
|
+
return select(least,youngTaps(f32(2u*least),f32(least),frames),share>0.0);
|
|
618
|
+
}
|
|
619
|
+
fn reflectionYoungShare(frames:f32,law:f32,noisy:bool)->f32{
|
|
620
|
+
if(!(u32(law)>1u&&reflectionView.spread.w>0.0)){return 0.0;}
|
|
621
|
+
let share=youngShare(frames,max(reflectionView.spread.w,law));
|
|
622
|
+
let weighs=f32(reflectionFilterTaps(share,frames))*share*share*sqrt(frames+1.0)>=1.0;
|
|
623
|
+
return select(0.0,share,noisy||weighs);
|
|
624
|
+
}
|
|
625
|
+
fn reflectionFilterRadius(lobe:f32,exact:bool,share:f32,frames:f32)->f32{
|
|
626
|
+
if(exact){return 0.0;}
|
|
627
|
+
return min(max(lobe,select(0.0,youngRadius(reflectionView.spread.y,frames),share>0.0)),reflectionView.spread.y);
|
|
628
|
+
}`),js=He("bilateralHitNoisy",[],"fn bilateralHitNoisy()->bool{return false;}",{weak:!0}),cn=He("bilateralHitNoisy",[wt],"fn bilateralHitNoisy()->bool{return hitLightOn()&&(hitLightShadowMode()==2u||hitLightBounces()>1u);}"),hn=v("REFLECTION_BILATERAL_WGSL",[j,Ht,R,za,be,Nr,js,Se,Le,Kt,qt,Zt,ua(!0),Aa,ye,ma],`@group(0) @binding(${u.bilateralIn}) var bilateralIn:texture_2d<u32>;
|
|
629
|
+
@group(0) @binding(${u.target}) var reflectionOut:texture_storage_2d_array<${at},write>;
|
|
630
|
+
@group(0) @binding(${u.frontTarget}) var frontOut:texture_storage_2d<${zo},write>;
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
fn bilateralFootprint(coord:vec2i,own:ReflectingPixel,depth:f32,hit:f32)->f32{
|
|
635
|
+
if(slabPerspective(reflectionView.slab)&&reflectionLobeTangent(own.top)<reflectionView.slab.x){return 0.0;}
|
|
636
|
+
if(hit<0.0){return reflectionLobeFootprint(own.top,depth,freshHit(textureLoad(temporalIn,coord,0).xy));}
|
|
637
|
+
return reflectionLobeFootprint(own.top,depth,hit);
|
|
638
|
+
}
|
|
639
|
+
/** How young the history of \`frames\` images of the pixel at \`coord\`, of roughness \`rough\`, is (x, \`reflectionYoungShare\`): by the law of a pixel that holds its own ray
|
|
640
|
+
* (\`reflectionHistoryLaw\`) where the surface traces a ray a pixel or the resolved pixel's light is its own ray's (\`resolvedOwn\`), else by a block's. The resolved pixel is read only
|
|
641
|
+
* where the block's law finds the history young \u2014 the other law is never the longer \u2014, its hit handed on to the filter's footprint (y, \`bilateralFootprint\`; negative where not read). */
|
|
642
|
+
fn bilateralShare(coord:vec2i,rough:f32,frames:f32,noisy:bool)->vec2f{
|
|
643
|
+
let full=all(reflectionBlock()==vec2u(1u));
|
|
644
|
+
var share=reflectionYoungShare(frames,reflectionHistoryLaw(rough,full),noisy);
|
|
645
|
+
if(full||!(share>0.0)){return vec2f(share,-1.0);}
|
|
646
|
+
let resolved=textureLoad(temporalIn,coord,0).xy;
|
|
647
|
+
if(resolvedOwn(resolved)){share=reflectionYoungShare(frames,reflectionHistoryLaw(rough,true),noisy);}
|
|
648
|
+
return vec2f(share,freshHit(resolved));
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
fn bilateralRadius(coord:vec2i,own:ReflectingPixel,depth:f32,share:f32,frames:f32,hit:f32)->f32{
|
|
655
|
+
var lobe=0.0;
|
|
656
|
+
if(own.top>0.0){lobe=bilateralFootprint(coord,own,depth,hit);}
|
|
657
|
+
return reflectionFilterRadius(lobe,!(own.top>0.0)&&!bilateralHitNoisy(),share,frames);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
fn bilateralTop(coord:vec2i,own:ReflectingPixel,held:vec4u,layer:u32)->vec3f{
|
|
661
|
+
let frames=historyCount(held);
|
|
662
|
+
let mine=reflectionDenoised(texelRadiance(held.xy));
|
|
663
|
+
let lum=luminance(mine);
|
|
664
|
+
let deviation=sqrt(max(historyMoment(held)-lum*lum,0.0));
|
|
665
|
+
|
|
666
|
+
// (\`temporalPixel\`) carries it over \u221A(images / setting) less \u2014 its mean, not its samples, is what is shown.
|
|
667
|
+
let noisy=deviation*sqrt(min(1.0,reflectionView.denoise.x/max(frames,1.0)))/max(lum,0.1)>0.5;
|
|
668
|
+
|
|
669
|
+
let law=bilateralShare(coord,own.top,frames,noisy);
|
|
670
|
+
let share=law.x;
|
|
671
|
+
let young=share>0.0;
|
|
672
|
+
|
|
673
|
+
if(!(reflectionDone(REFLECTION_BILATERAL)&&(noisy||young))){return texelRadiance(held.xy);}
|
|
674
|
+
// The pixel's point, its depth read here, where a filter may run: the opaque surface's last pass reads none before (\`reflectingSurfaceAt\`).
|
|
675
|
+
let P=surfacePointAt(layer,coord);
|
|
676
|
+
let depth=surfaceLinearDepth(P);
|
|
677
|
+
let radius=bilateralRadius(coord,own,depth,share,frames,law.y);
|
|
678
|
+
if(!(radius>=1.0)){return texelRadiance(held.xy);}
|
|
679
|
+
let taps=reflectionFilterTaps(share,frames);
|
|
680
|
+
|
|
681
|
+
let halfAngle=reflectionLobeHalfAngle(own.top,share);
|
|
682
|
+
|
|
683
|
+
let reach=select(share*share,1.0,noisy);
|
|
684
|
+
let size=vec2i(reflectionViewport());
|
|
685
|
+
// A 2 \xD7 2 seed, the same taps for the four pixels of a block, so their reads stay coherent.
|
|
686
|
+
let seed=reflectionReuseSeed(coord%vec2i(2));
|
|
687
|
+
var sum=weightedTonemap(mine,share);
|
|
688
|
+
var total=1.0;
|
|
689
|
+
for(var k=0u;k<taps;k++){
|
|
690
|
+
let tap=vec2i(vec2f(coord)+radius*reflectionReuseTap(k,taps,seed)+vec2f(0.5));
|
|
691
|
+
if(any(tap<vec2i(0))||any(tap>=size)){continue;}
|
|
692
|
+
let n=textureLoad(bilateralIn,tap,0);
|
|
693
|
+
if(!historyValid(n)){continue;}
|
|
694
|
+
// Its edge on the pixel's surface (\`reflectionNeighbourEdge\`): depth and normal, the neighbour's distance from the pixel's plane over
|
|
695
|
+
// the pixel's depth and the angle between the two normals over the lobe's half angle; none where it holds no surface's normal \u2014 the
|
|
696
|
+
// front surface absent there this image, its history handed on for the next image (\`temporalHeld\`), its depth none. A neighbour that
|
|
697
|
+
|
|
698
|
+
let edge=reflectionNeighbourEdge(tap,layer,P,own.N,depth,halfAngle);
|
|
699
|
+
if(!(edge>0.0)){continue;}
|
|
700
|
+
let theirs=reflectionDenoised(texelRadiance(n.xy));
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
let near=mix(exp2(-abs(lum-luminance(theirs))/max(deviation,0.001)),1.0,share);
|
|
704
|
+
let w=edge*near*reach;
|
|
705
|
+
sum+=w*weightedTonemap(theirs,share);
|
|
706
|
+
total+=w;
|
|
707
|
+
}
|
|
708
|
+
return reflectionLinear(weightedUntonemap(sum/total,share));
|
|
709
|
+
}
|
|
710
|
+
/** The pixel \`coord\` of flags \`flags\` of the opaque surface as its last pass reads it before it filters (\`bilateralOpaque\`):
|
|
711
|
+
* \`reflectingPixelAt\`'s normal, roughness, lobe and flags, and of the lobes' state what its shares and its write read (\`hasCoat\`: on where
|
|
712
|
+
* the flags carry lobes, the coat's weight, \`packedCoat\` \u2014 as \`lobesAt\` sets them, a cloth's texel holding no coat), nothing else
|
|
713
|
+
* decoded and no depth read: its point and view none, read where a filter runs (\`bilateralTop\`). */
|
|
714
|
+
fn reflectingSurfaceAt(coord:vec2i,flags:u32)->ReflectingPixel{
|
|
715
|
+
let normal=surfaceNormalAt(coord);
|
|
716
|
+
let w=surfaceLobeWordsAt(coord,flags);
|
|
717
|
+
lobes.on=(flags&${bo}u)!=0u;
|
|
718
|
+
lobes.coat=packedCoat(w).x;
|
|
719
|
+
let raw=surfaceTopOf(w,normal);
|
|
720
|
+
return ReflectingPixel(vec3f(0.0),normalize(normal.xyz),vec3f(0.0),normal.a,raw.xyz,reflectionSmoothed(raw.w),0.0,flags);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
struct BilateralSeen{ray:vec3f,field:vec3f,share:vec2f,}
|
|
726
|
+
|
|
727
|
+
var<private> bilateralProbesLeft:bool=false;
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
fn bilateralEnvironment(own:ReflectingPixel,layer:u32)->vec3f{
|
|
731
|
+
if(layer==1u){return reflectionEnvironmentOf(own.N,own.V,own.rough).base;}
|
|
732
|
+
return vec3f(0.0);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
fn bilateralShares(own:ReflectingPixel)->vec2f{
|
|
737
|
+
if(lobes.on&&lobes.coat>0.0){return vec2f(0.0,1.0);}
|
|
738
|
+
return vec2f(reflectionTraceShare(lobeAlpha(reflectionSmoothed(own.rough)),own.flags),0.0);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
fn bilateralField(own:ReflectingPixel,layer:u32)->BilateralSeen{
|
|
744
|
+
if(layer==0u){bilateralProbesLeft=true;}
|
|
745
|
+
return BilateralSeen(vec3f(0.0),bilateralEnvironment(own,layer),vec2f(0.0));
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
fn bilateralSeen(coord:vec2i,own:ReflectingPixel,layer:u32)->BilateralSeen{
|
|
750
|
+
let held=textureLoad(bilateralIn,coord,0);
|
|
751
|
+
if(!historyValid(held)){return bilateralField(own,layer);}
|
|
752
|
+
let share=bilateralShares(own);
|
|
753
|
+
// A pixel no ray answers this image, whose history was handed on at rest for the next image that traces (\`temporalHeld\`), reflects as one with none.
|
|
754
|
+
if(!(share.x>0.0||share.y>0.0)){return bilateralField(own,layer);}
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
var field=vec3f(0.0);
|
|
758
|
+
if(layer==1u&&(share.x<1.0||share.y<1.0)){field=bilateralEnvironment(own,layer);}
|
|
759
|
+
return BilateralSeen(bilateralTop(coord,own,held,layer),field,share);
|
|
760
|
+
}
|
|
761
|
+
/** What each lobe reflects, the ray's share of it and the environment's through the base lobe for the rest: share \xB7 ray + (1 \u2212 share) \xB7 environment. */
|
|
762
|
+
fn bilateralBlended(seen:BilateralSeen)->Reflected{
|
|
763
|
+
return Reflected(mix(seen.field,seen.ray,seen.share.x),mix(seen.field,seen.ray,seen.share.y));
|
|
764
|
+
}
|
|
765
|
+
${ln}`);var F=8,Ir=` let coord=tile*${m}u+local.xy;
|
|
766
|
+
let inside=all(coord<reflectionGridSize());
|
|
767
|
+
let viewport=reflectionViewport();
|
|
768
|
+
var mask=0u;
|
|
769
|
+
for(var k=0u;inside&&k<reflectionBlock().x*reflectionBlock().y;k++){
|
|
770
|
+
let pixel=reflectionBlockPixel(coord,k);
|
|
771
|
+
if(any(pixel>=viewport)){continue;}
|
|
772
|
+
let flags=surfaceFlagsAt(vec2i(pixel));
|
|
773
|
+
if(surfaceReflects(flags)&&reflectionPixelTraces(vec2i(pixel),flags)){mask|=1u<<k;}
|
|
774
|
+
}
|
|
775
|
+
// The resolve tiles of pixels this tracing tile of texels covers, \`resolves\` across and down: the texels a resolve tile holds, \`texels\` across and down.
|
|
776
|
+
let resolves=reflectionBlock();
|
|
777
|
+
let texels=vec2u(${m}u)/resolves;
|
|
778
|
+
let resolve=local.xy/texels;
|
|
779
|
+
if(mask!=0u){atomicOr(&tileTraces,1u<<(resolve.x+resolves.x*resolve.y));}
|
|
780
|
+
workgroupBarrier();
|
|
781
|
+
let traced=atomicLoad(&tileTraces);
|
|
782
|
+
if(lane==0u){
|
|
783
|
+
let entry=tile.x|(tile.y<<16u);
|
|
784
|
+
if(traced!=0u){tracingOut.entries[tracingOutAppend(1u,1u)]=entry;}
|
|
785
|
+
else{clearTracingOut.entries[clearTracingOutAppend(1u,1u)]=entry;}
|
|
786
|
+
}
|
|
787
|
+
if(lane<resolves.x*resolves.y){
|
|
788
|
+
let resolveTile=tile*resolves+vec2u(lane%resolves.x,lane/resolves.x);
|
|
789
|
+
if(all(resolveTile*${m}u<viewport)){
|
|
790
|
+
let entry=resolveTile.x|(resolveTile.y<<16u);
|
|
791
|
+
if(((traced>>lane)&1u)!=0u){reflectionTileResolved(resolveTile);resolveOut.entries[resolveOutAppend(1u,1u)]=entry;}
|
|
792
|
+
else{clearOut.entries[clearOutAppend(1u,1u)]=entry|reflectionTileCleared(resolveTile,viewport);}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}`,Xs=v("REFLECTION_EMPTY_TILES_WGSL",[],`fn reflectionTileResolved(tile:vec2u){}
|
|
796
|
+
fn reflectionTileCleared(tile:vec2u,viewport:vec2u)->u32{return 0u;}`,{weak:!0}),fn=v("REFLECTION_EMPTY_TILES_WGSL",[j],`@group(0) @binding(${u.emptyResolved}) var reflectionEmptyResolved:texture_storage_2d<${Rr},read_write>;
|
|
797
|
+
@group(0) @binding(${u.emptyHistory}) var reflectionEmptyHistory:texture_storage_2d<${Rr},read_write>;
|
|
798
|
+
fn reflectionTileResolved(tile:vec2u){
|
|
799
|
+
textureStore(reflectionEmptyResolved,tile,vec4u(0u));
|
|
800
|
+
textureStore(reflectionEmptyHistory,tile,vec4u(0u));
|
|
801
|
+
}
|
|
802
|
+
fn reflectionTileCleared(tile:vec2u,viewport:vec2u)->u32{
|
|
803
|
+
let resolved=select(0u,REFLECTION_EMPTY_RESOLVED,textureLoad(reflectionEmptyResolved,tile).x!=0u);
|
|
804
|
+
let history=select(0u,REFLECTION_EMPTY_HISTORY,textureLoad(reflectionEmptyHistory,tile).x!=0u);
|
|
805
|
+
let whole=vec4u(select(0u,1u,all((tile+vec2u(1u))*${m}u<=viewport)));
|
|
806
|
+
textureStore(reflectionEmptyResolved,tile,whole);
|
|
807
|
+
textureStore(reflectionEmptyHistory,tile,whole);
|
|
808
|
+
return resolved|history;
|
|
809
|
+
}`),Qt=v("REFLECTION_CLASSIFY_WGSL",[S,ha,j,Xs,yo,ye,x({name:"tracingOut",group:0,binding:u.tracingOut,entry:"u32",append:!0}),x({name:"clearTracingOut",group:0,binding:u.clearTracingOut,entry:"u32",append:!0}),x({name:"resolveOut",group:0,binding:u.resolveOut,entry:"u32",append:!0}),x({name:"clearOut",group:0,binding:u.clearOut,entry:"u32",append:!0})],`/** The resolve tiles of the workgroup's tracing tile a pixel traces in, a bit each. */
|
|
810
|
+
var<workgroup> tileTraces:atomic<u32>;
|
|
811
|
+
@compute @workgroup_size(${m},${m})
|
|
812
|
+
fn classifyTiles(@builtin(workgroup_id) group:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
813
|
+
// The workgroups run in blocks of ${F}\xB2 tiles, a block after the other along the rows, the tiles of a block along the Z-order curve, so that tiles
|
|
814
|
+
|
|
815
|
+
let at=group.y*groups.x+group.x;
|
|
816
|
+
let inBlock=zOrderDecode(at%${F*F}u);
|
|
817
|
+
let block=at/${F*F}u;
|
|
818
|
+
let across=groups.x/${F}u;
|
|
819
|
+
let tile=vec2u((block%across)*${F}u,(block/across)*${F}u)+inBlock;
|
|
820
|
+
if(any(tile*${m}u>=reflectionGridSize())){return;}
|
|
821
|
+
${Ir}
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
@compute @workgroup_size(${m},${m})
|
|
825
|
+
fn clearTracing(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u){
|
|
826
|
+
let t=reflectionTileOf(tile,groups);
|
|
827
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
828
|
+
let g=reflectionTileOrigin(t)+local.xy;
|
|
829
|
+
if(all(g<reflectionGridSize())){textureStore(surfaceRays,vec2i(g),REFLECTION_RAY_DEPTH,vec4u(bitcast<u32>(REFLECTION_NO_RAY_DEPTH),0u,0u,0u));}
|
|
830
|
+
}`),dn=(e,t,r)=>(r[0]=_(e[0],m*t[0]*F)*F,r[1]=_(e[1],m*t[1]*F)*F,r);var Ar=io("ReflectionSceneTrace",[Ve],"struct ReflectionSceneTrace{answer:RadianceAnswer,open:bool,}"),Zs="/** The factor of the march's step: drawn between `REFLECTION_STEP_DITHER` and its reciprocal by the pixel's noise of\n * this image, and 1 for a ray whose cone (`cone`, radians) spans `REFLECTION_STEP_DITHER_CONE`. */\nfn reflectionStepFactor(coord:vec2u,cone:f32)->f32{\n let drawn=mix(REFLECTION_STEP_DITHER,1.0/REFLECTION_STEP_DITHER,interleavedGradientNoise(vec2f(coord),f32(reflectionView.temporal.y)));\n return mix(drawn,1.0,saturate(cone/REFLECTION_STEP_DITHER_CONE));\n}\n/** Where the march of the ray from `P` along `R` begins, centimetres from the point the ray leaves the surface at: the\n * screen having stopped knowing it at `begin` metres, less `REFLECTION_PULLBACK` half voxels of the clipmap that holds\n * that point, from 0 on. */\nfn reflectionMarchStart(P:vec3f,R:vec3f,begin:f32)->f32{\n let there=begin*REFLECTION_CENTIMETRES;\n let halfVoxel=gdfView.centerExtent[gdfClipmapAt(gdfTranslated(P*REFLECTION_CENTIMETRES)+R*there)].w*gdfView.texel;\n return max(there-REFLECTION_PULLBACK*halfVoxel,0.0);\n}\n/** The ray from `P` along `R` marched through the field from `begin` (`reflectionMarchStart`) over `reach` metres, from the\n * point it leaves the surface at, `bias` metres along itself: the hit time in centimetres from that point, -1 where it met\n * nothing, the clipmap and the steps taken. */\nfn reflectionMarch(P:vec3f,R:vec3f,begin:f32,reach:f32,coord:vec2u,cone:f32)->GdfTraceResult{\n let start=(P+R*reflectionView.reach.x)*REFLECTION_CENTIMETRES;\n return gdfTraceRay(start,R,begin,reach*REFLECTION_CENTIMETRES,reflectionStepFactor(coord,cone),false,false,coord,0.0);\n}",Qs=`/** The answer of a march that met a surface at \`marched\`: the cache's light there, fogged along the ray or the lit
|
|
831
|
+
* image where it agrees (\`reflectionSeenAt\`), read with the ray's cone angle \`cone\` \u2014 where no imprint gave any light, a hit at the march's distance lit all
|
|
832
|
+
* the same (\`reflectionUncarded\`, at the field's face). \`bias\` is the metres the march began from \`P\` along \`R\`. */
|
|
833
|
+
var<private> reflectionHitCarded:bool;
|
|
834
|
+
fn reflectionHitAnswer(P:vec3f,lobe:ReflectionLobe,marched:GdfTraceResult,bias:f32,coord:vec2u,cone:f32)->RadianceAnswer{
|
|
835
|
+
let spread=reflectionHitSpread(cone);
|
|
836
|
+
let origin=(P+lobe.R*bias)*REFLECTION_CENTIMETRES;
|
|
837
|
+
let surface=scGlobalHit(origin,lobe.R,marched,spread,false,-1.0,reflectionDone(REFLECTION_HI_RES_SURFACE),coord);
|
|
838
|
+
let at=(origin+lobe.R*marched.hitTime)/REFLECTION_CENTIMETRES;
|
|
839
|
+
let distanceOf=bias+marched.hitTime/REFLECTION_CENTIMETRES;
|
|
840
|
+
reflectionHitCarded=surface.valid;
|
|
841
|
+
if(!surface.valid){return RadianceAnswer(reflectionUncarded(at,surface.face,coord),true,distanceOf);}
|
|
842
|
+
return RadianceAnswer(reflectionSeenAt(surface.radiance,at,surface.face,coord),true,distanceOf);
|
|
843
|
+
}
|
|
844
|
+
/** The screen's answer to a ray the screen stage left here having met a surface \`begin\` metres along it (\`reflectionScreenMet\`), where the march did not vouch for that surface: it met nothing there, nothing within two voxels of it (a mesh too small for its clipmap,
|
|
845
|
+
* one whose field is not composited yet), or no imprint lights what it met. What the fields and the imprints hold is the scene's, so that a reflection does not follow the camera; the rest stays what the screen shows.
|
|
846
|
+
* The lit image where it holds the point, its \`w\` its share of the ray \u2014 one, its vignette near the screen's border, 0 where it does
|
|
847
|
+
* not hold it, the march's answer then standing. */
|
|
848
|
+
fn reflectionMetAnswers(P:vec3f,N:vec3f,R:vec3f,begin:f32,coord:vec2u)->vec4f{
|
|
849
|
+
let at=P+N*reflectionRayBias(P,N)+R*begin;
|
|
850
|
+
return reflectionLitHolds(at,viewToEye(at),reflectionEdgeNoise(coord));
|
|
851
|
+
}
|
|
852
|
+
/** Puts the screen's answer in \`answer\` where it holds the whole ray (\`reflectionMetAnswers\`): the ray is settled, the triangles have
|
|
853
|
+
* nothing to add past what the screen met. Where it holds a share of it, near the screen's border, the share is kept for the stage's end
|
|
854
|
+
* to blend with what the stage answers (\`reflectionMetBlend\`), and the march's answer stands meanwhile \u2014 never a coin toss between the
|
|
855
|
+
* two. */
|
|
856
|
+
fn reflectionMetAnswer(answer:ptr<function,RadianceAnswer>,P:vec3f,N:vec3f,R:vec3f,begin:f32,coord:vec2u)->bool{
|
|
857
|
+
let held=reflectionMetAnswers(P,N,R,begin,coord);
|
|
858
|
+
if(held.w<=0.0){return false;}
|
|
859
|
+
if(held.w<1.0){
|
|
860
|
+
reflectionMetShare=held.w;
|
|
861
|
+
reflectionMetLight=reflectionClampRay(held.rgb);
|
|
862
|
+
reflectionMetAt=begin;
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
*answer=RadianceAnswer(reflectionClampRay(held.rgb),true,begin);
|
|
866
|
+
return true;
|
|
867
|
+
}
|
|
868
|
+
fn reflectionMarchVouches(marched:GdfTraceResult,begin:f32,distanceOf:f32)->bool{
|
|
869
|
+
return marched.hitTime>=0.0&&reflectionHitCarded&&distanceOf<=begin+4.0*gdfView.centerExtent[marched.clipmap].w*gdfView.texel/REFLECTION_CENTIMETRES;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
fn reflectionDistantStart(P:vec3f,R:vec3f,stop:f32)->f32{
|
|
874
|
+
if(gdfView.clipmaps==0u){return stop;}
|
|
875
|
+
return gdfClipRayOutside(gdfTranslated(P*REFLECTION_CENTIMETRES),R,stop*REFLECTION_CENTIMETRES,reflectionView.scene.y).start/REFLECTION_CENTIMETRES;
|
|
876
|
+
}`,Js=`fn reflectionSceneTrace(P:vec3f,N:vec3f,lobe:ReflectionLobe,begin:f32,coord:vec2u,cone:f32,firstPerson:bool)->ReflectionSceneTrace{
|
|
877
|
+
let none=ReflectionSceneTrace(RadianceAnswer(vec3f(0.0),false,0.0),false);
|
|
878
|
+
reflectionFate=REFLECTION_FATE_NO_FIELD;
|
|
879
|
+
reflectionWork=0u;
|
|
880
|
+
if(gdfView.clipmaps==0u){
|
|
881
|
+
|
|
882
|
+
var met=none.answer;
|
|
883
|
+
if(reflectionScreenMet&&reflectionMetAnswer(&met,P,N,lobe.R,begin,coord)){
|
|
884
|
+
reflectionFate=REFLECTION_FATE_HIT;
|
|
885
|
+
return ReflectionSceneTrace(met,false);
|
|
886
|
+
}
|
|
887
|
+
return none;
|
|
888
|
+
}
|
|
889
|
+
let bias=reflectionView.reach.x;
|
|
890
|
+
let far=reflectionFar();
|
|
891
|
+
let reach=far-bias;
|
|
892
|
+
|
|
893
|
+
if(reach<=max(begin-bias,0.0)){reflectionFate=REFLECTION_FATE_BOUND;return ReflectionSceneTrace(none.answer,true);}
|
|
894
|
+
|
|
895
|
+
var answer=RadianceAnswer(vec3f(0.0),false,far);
|
|
896
|
+
var open=true;
|
|
897
|
+
reflectionOrigin=P;
|
|
898
|
+
if(reflectionDone(REFLECTION_SCENE_TRACES)){
|
|
899
|
+
let start=reflectionMarchStart(P,lobe.R,begin);
|
|
900
|
+
let marched=reflectionMarch(P,lobe.R,start,reach,coord,cone);
|
|
901
|
+
reflectionWork=marched.steps;
|
|
902
|
+
|
|
903
|
+
if(marched.hitTime>=0.0){
|
|
904
|
+
|
|
905
|
+
answer=reflectionHitAnswer(P,lobe,marched,bias,coord,cone);
|
|
906
|
+
open=false;
|
|
907
|
+
}
|
|
908
|
+
if(reflectionScreenMet&&!reflectionMarchVouches(marched,begin,answer.distance)&&reflectionMetAnswer(&answer,P,N,lobe.R,begin,coord)){open=false;}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
reflectionFate=select(REFLECTION_FATE_OPEN,REFLECTION_FATE_HIT,answer.hit);
|
|
912
|
+
return ReflectionSceneTrace(answer,open);
|
|
913
|
+
}`,un=(e,t)=>v(`REFLECTION_SCENE_TRACE_WGSL(${e},${t})`,[St,J,$t,Vt,pi(t),gi(e,t),Ve,ai,Ar,Z],[Zs,Qs,Js].join(`
|
|
914
|
+
`));var el=1,tl=1,mn=~(pt|gt)>>>0,pn="ST_SKIP_TRANSLUCENT|ST_MEET_CARDED",rl=`const REFLECTION_HIT_FOUND:u32=${el}u;
|
|
915
|
+
const REFLECTION_HIT_STEPS_SHIFT:u32=${tl}u;
|
|
916
|
+
@group(0) @binding(${u.hits}) var<storage,read_write> reflectionHits:array<u32>;
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
var<private> reflectionOwnRay:bool=false;
|
|
920
|
+
|
|
921
|
+
fn reflectionRecordOf(coord:vec2u)->u32{
|
|
922
|
+
if(reflectionOwnRay){return reflectionHitAt(coord/reflectionBlock());}
|
|
923
|
+
return reflectionHitAt(coord);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
fn reflectionHitRecord(at:u32)->StHit{
|
|
928
|
+
var hit:StHit;
|
|
929
|
+
hit.hit=true;
|
|
930
|
+
hit.distance=bitcast<f32>(reflectionHits[at+1u]);
|
|
931
|
+
hit.normal=octDecode(unpack2x16snorm(reflectionHits[at+2u]));
|
|
932
|
+
hit.object=reflectionHits[at+3u];
|
|
933
|
+
return hit;
|
|
934
|
+
}`,ol=He("reflectionDistantStart",[],`fn reflectionDistantStart(P:vec3f,R:vec3f,stop:f32)->f32{
|
|
935
|
+
let local=P-view.display.yzw;
|
|
936
|
+
let radius=stParams.cullRadius;
|
|
937
|
+
let along=dot(R,local);
|
|
938
|
+
let discriminant=along*along-(dot(local,local)-radius*radius);
|
|
939
|
+
if(discriminant<0.0){return 0.0;}
|
|
940
|
+
let root=sqrt(discriminant);
|
|
941
|
+
let exit=root-along;
|
|
942
|
+
if(!(-along-root<0.0&&exit>0.0)){return 0.0;}
|
|
943
|
+
return max(32.0/31.0*exit-stop/31.0,0.0);
|
|
944
|
+
}`),gn=(e,t=oe,r=K,o=!1)=>v(`REFLECTION_SCENE_TRACE_HARDWARE_WGSL(${e},${q(t)}${r.visualize?",indirect":""}${o?",lit":""})`,[Ro,To,St,J,Vt,Ve,Ar,...o?[wt,Ha]:[],li(r,e),fi(L.group,L.first),ui(L.group,L.first,t),ol],`${rl}
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
fn reflectionHardwareHit(origin:vec3f,R:vec3f,hit:StHit,coord:vec2u,cone:f32)->RadianceAnswer{
|
|
949
|
+
let at=origin+R*hit.distance;
|
|
950
|
+
|
|
951
|
+
// and for the mark below. A hit it lights whole reads no imprint${o?", and is lit again only under the forced hit shading":""}.
|
|
952
|
+
var held=vec4f(0.0);
|
|
953
|
+
if(reflectionDone(REFLECTION_SCREEN_TRACES)){held=reflectionLitHolds(at,hit.normal,reflectionEdgeNoise(coord));}
|
|
954
|
+
if(held.w>=1.0${o?"&&!hitLightForced()":""}){return RadianceAnswer(reflectionSeenFrom(vec3f(0.0),held,at,hit.normal),true,hit.distance);}
|
|
955
|
+
let imprints=scPlacementMeshImprints(scHitPlacement(hit.object));
|
|
956
|
+
let radius=reflectionHitSpread(cone)*hit.distance*REFLECTION_CENTIMETRES;
|
|
957
|
+
let light=scEvaluateMeshImprints(imprints,at*REFLECTION_CENTIMETRES,hit.normal,radius,reflectionView.hardware.w,reflectionDone(REFLECTION_HI_RES_SURFACE),coord);
|
|
958
|
+
${o?` // The hit the cache cannot light (or every hit, under the forced hit shading), where the lit image does not answer it whole, is lit again by the hit shading pass.
|
|
959
|
+
if(hitLightOn()&&(hitLightForced()||(!light.valid&&held.w<1.0))){reflectionHits[reflectionRecordOf(coord)]|=${pt}u;}
|
|
960
|
+
`:""} // A hit no imprint lights takes the light such a surface is taken to give, never black.
|
|
961
|
+
var given=light.radiance;
|
|
962
|
+
if(!light.valid){given=reflectionUncardedLight(hit.normal);}
|
|
963
|
+
return RadianceAnswer(reflectionSeenFrom(given,held,at,hit.normal),true,hit.distance);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
struct ReflectionSceneRay{origin:vec3f,start:f32,far:f32,flags:u32,go:bool,}
|
|
967
|
+
fn reflectionSceneRayOf(P:vec3f,N:vec3f,R:vec3f,begin:f32,firstPerson:bool)->ReflectionSceneRay{
|
|
968
|
+
let bias=reflectionView.hardware.x;
|
|
969
|
+
var ray:ReflectionSceneRay;
|
|
970
|
+
ray.far=max(reflectionFar(),bias);
|
|
971
|
+
ray.go=max(begin,bias)<ray.far&&reflectionDone(REFLECTION_SCENE_TRACES);
|
|
972
|
+
|
|
973
|
+
ray.start=max(max(begin,bias)-reflectionView.hardware.z,bias);
|
|
974
|
+
ray.origin=P+N*(saturate(dot(N,R))*reflectionView.hardware.y);
|
|
975
|
+
ray.flags=${o?`select(${pn},ST_MEET_TRANSLUCENT,hitLightOn()&&hitLightRefractions()>0u)`:pn}|ST_CULL_BACK|ST_MEET_CULLED|select(ST_MEET_WORLD_SPACE,0u,firstPerson);
|
|
976
|
+
return ray;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
fn reflectionHitAt(coord:vec2u)->u32{return (coord.y*reflectionGridSize().x+coord.x)*${Re(o)}u;}
|
|
980
|
+
/** The trace of the ray of grid texel coord (the kernel traceSceneHit): the triangle it meets kept in the hits' buffer, its walk whole \u2014 every ray
|
|
981
|
+
* given to the triangles is theirs alone to answer (\`reflectionTrianglesWhole\`, \`trace/trace.ts\`). A ray that has nothing to trace keeps no hit. */
|
|
982
|
+
fn reflectionSceneHitStore(P:vec3f,N:vec3f,R:vec3f,begin:f32,coord:vec2u,firstPerson:bool){
|
|
983
|
+
let ray=reflectionSceneRayOf(P,N,R,begin,firstPerson);
|
|
984
|
+
var hit:StHit;
|
|
985
|
+
hit.normal=vec3f(0.0);
|
|
986
|
+
hit.object=0xffffffffu;
|
|
987
|
+
if(ray.go){hit=stTrace(StRay(ray.origin-view.display.yzw,R,ray.start,ray.far,ray.flags));}
|
|
988
|
+
let at=reflectionHitAt(coord);
|
|
989
|
+
let steps=min(select(0u,stSteps,ray.go),${mn}u>>REFLECTION_HIT_STEPS_SHIFT);
|
|
990
|
+
reflectionHits[at]=select(0u,REFLECTION_HIT_FOUND,hit.hit)|(steps<<REFLECTION_HIT_STEPS_SHIFT);
|
|
991
|
+
reflectionHits[at+1u]=bitcast<u32>(hit.distance);
|
|
992
|
+
reflectionHits[at+2u]=pack2x16snorm(octEncode(hit.normal));
|
|
993
|
+
reflectionHits[at+3u]=hit.object;${o?`
|
|
994
|
+
if(hit.hit){
|
|
995
|
+
reflectionHits[at+${Wo}u]=litMaterialKey(hit.placement,hit.record);
|
|
996
|
+
|
|
997
|
+
if(hitLightOn()&&hitLightRefractions()>0u&&litTranslucent(hit.placement,hit.record)){reflectionHits[at]|=${pt}u;}
|
|
998
|
+
}`:""}
|
|
999
|
+
}
|
|
1000
|
+
fn reflectionSceneTrace(P:vec3f,N:vec3f,lobe:ReflectionLobe,begin:f32,coord:vec2u,cone:f32,firstPerson:bool)->ReflectionSceneTrace{
|
|
1001
|
+
reflectionWork=0u;
|
|
1002
|
+
let ray=reflectionSceneRayOf(P,N,lobe.R,begin,firstPerson);
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
var answer=RadianceAnswer(vec3f(0.0),false,ray.far);
|
|
1006
|
+
var open=true;
|
|
1007
|
+
reflectionOrigin=P;
|
|
1008
|
+
if(ray.go){
|
|
1009
|
+
let at=reflectionRecordOf(coord);
|
|
1010
|
+
let flags=reflectionHits[at];
|
|
1011
|
+
reflectionWork=(flags&${mn}u)>>REFLECTION_HIT_STEPS_SHIFT;
|
|
1012
|
+
if((flags&REFLECTION_HIT_FOUND)!=0u){
|
|
1013
|
+
let hit=reflectionHitRecord(at);
|
|
1014
|
+
|
|
1015
|
+
answer=reflectionHardwareHit(ray.origin,lobe.R,hit,coord,cone);
|
|
1016
|
+
open=false;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
reflectionFate=select(REFLECTION_FATE_OPEN,REFLECTION_FATE_HIT,answer.hit);
|
|
1021
|
+
return ReflectionSceneTrace(answer,open);
|
|
1022
|
+
}`);var kr="0xffffffffu",Xe="1u",ke=m*m,il=10,al=x({name:"pendingSeen",group:0,binding:u.pendingMesh,entry:"vec2u",append:!1}),nl=x({name:"pendingMesh",group:0,binding:u.pendingMesh,entry:"vec2u",append:!0}),sl=e=>v(`REFLECTION_COMPACT_MESHES(${e})`,[ta(qe,oa.params),_r,al,x({name:"meshRaysOut",group:Ke,binding:0,entry:"u32",append:!0}),vr,Ka(e,`${ke}u`)],`var<workgroup> meshBase:u32;
|
|
1023
|
+
@compute @workgroup_size(${ke})
|
|
1024
|
+
fn compactReflectionMeshes(@builtin(global_invocation_id) id:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
1025
|
+
let at=flatIndex(id,groups,${ke}u);
|
|
1026
|
+
if(lane==0u){spCompactBegin();}
|
|
1027
|
+
workgroupBarrier();
|
|
1028
|
+
var wants=false;
|
|
1029
|
+
if(at<pendingSeen.count){
|
|
1030
|
+
let entry=pendingSeen.entries[at];
|
|
1031
|
+
let depth=bitcast<f32>(textureLoad(surfaceRays,vec2i(vec2u(entry.x&0xffffu,entry.x>>16u)),REFLECTION_RAY_DEPTH).r);
|
|
1032
|
+
wants=viewDepthCmOfDevice(msdf.depth,depth)<msdf.distances.x&&bitcast<f32>(entry.y)*100.0<=msdf.distances.y;
|
|
1033
|
+
}
|
|
1034
|
+
let slot=spCompactRank(wants,lane);
|
|
1035
|
+
workgroupBarrier();
|
|
1036
|
+
let count=spCompactTotal();
|
|
1037
|
+
if(lane==0u&&count>0u){meshBase=meshRaysOutAppend(count,${ke}u);}
|
|
1038
|
+
workgroupBarrier();
|
|
1039
|
+
if(wants){meshRaysOut.entries[meshBase+slot]=at;}
|
|
1040
|
+
}`),ll=`const MESH_IMPRINT_RADIUS:f32=${il}.0;
|
|
1041
|
+
/** The metres a ray along \`R\` from a surface of normal \`N\`, \`eye\` metres from the eye, goes before it stands \`REFLECTION_PULLBACK\` half voxels
|
|
1042
|
+
* of the global field over the surface's plane: the band in which the field, whose voxels are coarser than the gap under what stands on the
|
|
1043
|
+
* surface \u2014 a car's floor over a road \u2014, holds the two as one, so that a march begun in it slides through the gap. A half voxel of the finest
|
|
1044
|
+
* clipmap at least, of the clipmap that holds a point as far from the eye at most (\`ReflectionView.fieldVoxel\`, \`fieldSlope\`); none without
|
|
1045
|
+
* a field. */
|
|
1046
|
+
fn reflectionFieldBand(N:vec3f,R:vec3f,eye:f32)->f32{
|
|
1047
|
+
let voxel=max(reflectionView.fieldVoxel,reflectionView.fieldSlope*eye);
|
|
1048
|
+
return REFLECTION_PULLBACK*voxel/max(dot(R,N),REFLECTION_EPSILON);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
fn reflectionMeshReach(handover:f32,band:f32,most:f32)->f32{
|
|
1054
|
+
return max(handover,min(band,min(REFLECTION_MESH_BAND_MOST*msdf.distances.y*0.01,most)));
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
fn reflectionMeshBoxMet(cell:u32,head:vec3f,tail:vec3f,grow:f32)->bool{
|
|
1059
|
+
if(cell>=msdf.limits.y){return false;}
|
|
1060
|
+
let count=msdfGrid[cell*${Sr}u];
|
|
1061
|
+
let first=msdfGrid[cell*${Sr}u+1u];
|
|
1062
|
+
for(var k=0u;k<count&&first+k<msdf.limits.x;k++){
|
|
1063
|
+
let data=loadFieldObjectData(msdfGrid[${ea}+first+k]);
|
|
1064
|
+
let a=dfWorldToVolume(data,DfVec3(head,vec3f(0.0)));
|
|
1065
|
+
let b=dfWorldToVolume(data,DfVec3(tail,vec3f(0.0)));
|
|
1066
|
+
let box=data.extent+vec3f(grow/data.volumeScale);
|
|
1067
|
+
if(any(max(a,b)<-box)||any(min(a,b)>box)){continue;}
|
|
1068
|
+
if(all(a==b)){return true;}
|
|
1069
|
+
let span=segmentBoxSpan(a,b,-box,box);
|
|
1070
|
+
if(span.x<span.y){return true;}
|
|
1071
|
+
}
|
|
1072
|
+
return false;
|
|
1073
|
+
}
|
|
1074
|
+
`,cl=`@compute @workgroup_size(${ke})
|
|
1075
|
+
fn traceReflectionMeshes(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u){
|
|
1076
|
+
let rank=flatIndex(thread,groups,${ke}u);
|
|
1077
|
+
if(rank>=meshRaysIn.count){return;}
|
|
1078
|
+
let slot=meshRaysIn.entries[rank];
|
|
1079
|
+
let entry=pendingMesh.entries[slot];
|
|
1080
|
+
let g=vec2u(entry.x&0xffffu,entry.x>>16u);
|
|
1081
|
+
let coord=vec2i(reflectionPickedPixel(g));
|
|
1082
|
+
let own=reflectingPixelAt(REFLECTION_LAYER,coord,surfaceFlagsAt(coord));
|
|
1083
|
+
let stored=reflectionStoredRay(vec2i(g));
|
|
1084
|
+
let R=stored.ray.R;
|
|
1085
|
+
let bias=reflectionView.reach.x;
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
let told=bitcast<f32>(entry.y);
|
|
1090
|
+
let met=(entry.y&1u)!=0u;
|
|
1091
|
+
let back=select(0.0,2.0*reflectionView.thickness*viewEyeDistance(own.P+R*told),met&&slabPerspective(reflectionView.slab));
|
|
1092
|
+
let begin=max(told-bias-back,0.0);
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
let handover=min(msdf.distances.y*0.01,reflectionFar()-bias);
|
|
1096
|
+
|
|
1097
|
+
let eye=100.0*viewEyeDistance(own.P);
|
|
1098
|
+
let farthest=reflectionMeshReach(handover,reflectionFieldBand(own.N,R,eye*0.01),reflectionFar()-bias);
|
|
1099
|
+
let start=(own.P+R*bias)*100.0;
|
|
1100
|
+
let traced=MsdfRay(start,R,begin*100.0,farthest*100.0,false,0.0,false,vec2f(g));
|
|
1101
|
+
|
|
1102
|
+
// scatter cut its slices (\`msdfSliceSpan\`).
|
|
1103
|
+
let cell=msdfCellIndex(vec2u(coord),viewDepthCmOfDevice(msdf.depth,own.z));
|
|
1104
|
+
let hit=msdfTraceCell(traced,cell);
|
|
1105
|
+
var left=max(handover,begin);
|
|
1106
|
+
if(hit.distance<traced.maxTrace){
|
|
1107
|
+
left=hit.distance*0.01;
|
|
1108
|
+
let derived=msdfTraceDerived(traced,hit);
|
|
1109
|
+
var face=derived.normal;
|
|
1110
|
+
if(dot(face,R)>0.0){face=-face;}
|
|
1111
|
+
|
|
1112
|
+
let reach=select(msdf.distances.y,farthest*100.0,farthest>handover);
|
|
1113
|
+
var fade=saturate(4.0*eye/msdf.distances.x-3.0);
|
|
1114
|
+
fade=max(fade,saturate((hit.distance-reach*0.7)/(reach*0.3)));
|
|
1115
|
+
if(fade<interleavedGradientNoise(vec2f(g)+vec2f(0.5),0.0)){
|
|
1116
|
+
let surface=scMeshHit(start+R*hit.distance,face,derived.instance,reflectionHitSpread(stored.cone)*hit.distance,MESH_IMPRINT_RADIUS,reflectionDone(REFLECTION_HI_RES_SURFACE),g);
|
|
1117
|
+
// A surface no imprint lights takes the light such a surface is taken to give (\`reflectionUncardedLight\`), never black.
|
|
1118
|
+
var lit=surface.radiance;
|
|
1119
|
+
if(!surface.valid){lit=reflectionUncardedLight(face);}
|
|
1120
|
+
let radiance=reflectionClampRay(reflectionFogged(lit,own.P,R*(bias+left))+reflectionSkylightLeak(vec3f(0.0)));
|
|
1121
|
+
textureStore(traceOut,vec2i(g),freshPack(reflectionShownBy(radiance,REFLECTION_STAGE_MESHES),bias+left,reflectionMoverHolds(own.P+R*(bias+left),derived.reach*0.01)));
|
|
1122
|
+
pendingMesh.entries[slot]=vec2u(entry.x,${kr});
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
// A ray the screen met a surface with that the box of no mesh of the cell holds, grown by the screen's thickness there \u2014 a landscape, a
|
|
1127
|
+
// stand-in: what the meshes' fields do not hold \u2014 goes on as the screen told it: the scene stage meets that surface or keeps the screen's
|
|
1128
|
+
// light (\`reflectionMetAnswers\`). One that met a mesh's box and that mesh's field left skimmed past it: the miss stands.
|
|
1129
|
+
let at=(own.P+R*told)*100.0;
|
|
1130
|
+
if(met&&!reflectionMeshBoxMet(cell,at,at,back*100.0)){return;}
|
|
1131
|
+
// The distance's lowest bit stays what the screen stage said of it (\`reflectionScreenMet\`), while the distance is the one it said it of.
|
|
1132
|
+
pendingMesh.entries[slot]=vec2u(entry.x,select(bitcast<u32>(left)&~${Xe},entry.y,left==told));
|
|
1133
|
+
}`,hl=()=>v("REFLECTION_TRACE_MESHES",[ia(qe,0),nl,x({name:"meshRaysIn",group:Ke,binding:0,entry:"u32",append:!1}),vr,Z,_r,be,uo,J,Ut,Wt],ll+cl),wn=e=>[sl(e),hl()];var Ce=m*m,En=(e,t)=>e[0]*e[1]>1&&t[0]>=e[0]&&t[1]>=e[1],fl=v("REFLECTION_OWN_MARK_WGSL",[],`/** What the marking reads of the ray of grid texel g where it went whole to the scene's triangles this image (valid, \`reflectionRayWhole\`):
|
|
1134
|
+
* the linear depth of the pixel it left, the distance to what it met (the longest ray where it met nothing), whether it met a triangle (the hits'
|
|
1135
|
+
* record the trace kept, \`reflectionHitAt\`) and where it did, the point and the normal of that triangle \u2014 read only then, as two hits are judged
|
|
1136
|
+
* by them only where both met one (\`reflectionOneSurface\`). The ray read as the storage the trace binds it as. */
|
|
1137
|
+
struct ReflectionOwnHit{depth:f32,t:f32,at:vec3f,N:vec3f,found:bool,valid:bool,}
|
|
1138
|
+
fn reflectionOwnHitAt(g:vec2i)->ReflectionOwnHit{
|
|
1139
|
+
var hit=ReflectionOwnHit(0.0,0.0,vec3f(0.0),vec3f(0.0),false,false);
|
|
1140
|
+
if(any(g<vec2i(0))||any(g>=vec2i(reflectionGridSize()))){return hit;}
|
|
1141
|
+
let depth=bitcast<f32>(textureLoad(surfaceRays,g,REFLECTION_RAY_DEPTH).r);
|
|
1142
|
+
if(!reflectionRayWhole(depth)){return hit;}
|
|
1143
|
+
let record=reflectionHitAt(vec2u(g));
|
|
1144
|
+
let Q=worldAt(vec2f(reflectionPickedPixel(vec2u(g)))+vec2f(0.5),depth);
|
|
1145
|
+
hit.valid=true;
|
|
1146
|
+
hit.found=(reflectionHits[record]&REFLECTION_HIT_FOUND)!=0u;
|
|
1147
|
+
hit.depth=surfaceLinearDepth(Q);
|
|
1148
|
+
hit.t=reflectionFar();
|
|
1149
|
+
if(hit.found){
|
|
1150
|
+
let met=reflectionHitRecord(record);
|
|
1151
|
+
let ray=reflectionRayOf(textureLoad(surfaceRays,g,REFLECTION_RAY_DIRECTION).r,textureLoad(surfaceRays,g,REFLECTION_RAY_CONE).r);
|
|
1152
|
+
hit.t=met.distance;
|
|
1153
|
+
hit.at=Q+normalize(ray.xyz)*hit.t;
|
|
1154
|
+
hit.N=met.normal;
|
|
1155
|
+
}
|
|
1156
|
+
return hit;
|
|
1157
|
+
}
|
|
1158
|
+
/** Whether the hits \`a\` and \`b\` of two neighbouring blocks' rays show one surface: both met nothing, or both met triangles and each point
|
|
1159
|
+
* stands off the plane of the other by under \`REFLECTION_ONE_SURFACE\` of their distance apart. Points of one plane stand on each other's
|
|
1160
|
+
* however far apart \u2014 a wall met at a grazing angle, its hits metres apart \u2014; two hits on a surface whose normal turns by \u03B1 between them
|
|
1161
|
+
* stand off by sin(\u03B1 / 2) of their distance apart where they lie alike about the turn, by up to sin \u03B1 where one lies at a crease's edge
|
|
1162
|
+
* (\`REFLECTION_ONE_SURFACE\`: one surface under a turn of 14.5\xB0 to 29\xB0); a hit on a block and one on the wall behind it stand off by about
|
|
1163
|
+
* their distance apart. Two hits read the same from either side: both are judged by both planes. What lies on one plane is one surface for
|
|
1164
|
+
* the marking, whatever placement it belongs to or texture it wears. */
|
|
1165
|
+
fn reflectionOneSurface(a:ReflectionOwnHit,b:ReflectionOwnHit)->bool{
|
|
1166
|
+
if(a.found!=b.found){return false;}
|
|
1167
|
+
if(!a.found){return true;}
|
|
1168
|
+
let apart=b.at-a.at;
|
|
1169
|
+
return max(abs(dot(a.N,apart)),abs(dot(b.N,apart)))<=REFLECTION_ONE_SURFACE*length(apart);
|
|
1170
|
+
}
|
|
1171
|
+
/** Whether the other pixels of the block of grid texel \`g\`, whose ray went whole to the scene's triangles, cast their own rays this image: its
|
|
1172
|
+
* hit and the hit of one of the 8 blocks round it whose ray went whole too show two surfaces (\`reflectionOneSurface\`) \u2014 an outline of what
|
|
1173
|
+
* the lobe shows, which the resolve's blend of the four nearest blocks' rays steps by a block \u2014, where the lobe, of the block's picked
|
|
1174
|
+
* pixel's roughness, spreads under the block's side at the nearer of the two hits (\`reflectionLobeFootprint\`): the outline is as sharp as
|
|
1175
|
+
* its nearer side lets it, and a lobe that spreads wider blurs the block's step away. Both sides of an outline are marked, each by its own
|
|
1176
|
+
* thread, the test being the same from either side; nothing inside the reflection of one surface is. The roughness and the lobe's footprint
|
|
1177
|
+
* at the block's own hit are read once, at the first neighbour that shows another surface: inside a reflection none does. */
|
|
1178
|
+
fn reflectionOwnWanted(g:vec2i)->bool{
|
|
1179
|
+
let mine=reflectionOwnHitAt(g);
|
|
1180
|
+
let block=reflectionBlock();
|
|
1181
|
+
let side=f32(max(block.x,block.y));
|
|
1182
|
+
var known=false;
|
|
1183
|
+
var rough=0.0;
|
|
1184
|
+
var footprint=0.0;
|
|
1185
|
+
for(var k=0;k<9;k++){
|
|
1186
|
+
if(k==4){continue;}
|
|
1187
|
+
let theirs=reflectionOwnHitAt(g+vec2i(k%3-1,k/3-1));
|
|
1188
|
+
if(!theirs.valid||reflectionOneSurface(mine,theirs)){continue;}
|
|
1189
|
+
if(!known){
|
|
1190
|
+
let coord=vec2i(reflectionPickedPixel(vec2u(g)));
|
|
1191
|
+
rough=surfaceTopAt(coord,surfaceFlagsAt(coord)).w;
|
|
1192
|
+
footprint=reflectionLobeFootprint(rough,mine.depth,mine.t);
|
|
1193
|
+
known=true;
|
|
1194
|
+
}
|
|
1195
|
+
if(min(footprint,reflectionLobeFootprint(rough,theirs.depth,theirs.t))<side){return true;}
|
|
1196
|
+
}
|
|
1197
|
+
return false;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
@compute @workgroup_size(${Ce})
|
|
1203
|
+
fn markOwnRays(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u){
|
|
1204
|
+
let at=flatIndex(thread,groups,${Ce}u);
|
|
1205
|
+
if(at>=pendingIn.count){return;}
|
|
1206
|
+
let x=pendingIn.entries[at].x;
|
|
1207
|
+
let g=vec2u(x&0xffffu,x>>16u);
|
|
1208
|
+
if(!reflectionOwnWanted(vec2i(g))){return;}
|
|
1209
|
+
textureStore(surfaceRays,vec2i(g),REFLECTION_RAY_DISTANCE,vec4u(REFLECTION_RAY_OWN,0u,0u,0u));
|
|
1210
|
+
pendingOut.entries[pendingOutAppend(1u,${Ce}u)]=vec2u(x,0u);
|
|
1211
|
+
}`),dl=v("REFLECTION_OWN_ROUNDS_WGSL",[],`/** The round of the own rays a dispatch serves, from one to a block's pixels less one: a plain uniform, bound for each dispatch. */
|
|
1212
|
+
@group(${ce.group}) @binding(${ce.binding}) var<uniform> reflectionOwnRound:u32;
|
|
1213
|
+
/** The pixel of block \`g\` the round serves (\`reflectionOwnRound\`): the pixel the round's count of places on past the block's picked pixel's
|
|
1214
|
+
* (\`reflectionBlockPixel\`'s order, round about) names \u2014 the block's other pixels one a round, the picked pixel never, its ray the block's \u2014;
|
|
1215
|
+
* and whether it lies inside the viewport (\`go\`). The round's trace and answer read it, and the hit shading's passes of the round
|
|
1216
|
+
* (\`litOwnTexel\`, \`../../../lighting/reflections/hitShading/litWgsl.ts\`). */
|
|
1217
|
+
struct ReflectionOwnPixel{g:vec2u,p:vec2u,go:bool,}
|
|
1218
|
+
fn reflectionOwnPixelAt(g:vec2u)->ReflectionOwnPixel{
|
|
1219
|
+
var own=ReflectionOwnPixel(g,vec2u(0u),false);
|
|
1220
|
+
let block=reflectionBlock();
|
|
1221
|
+
let picked=reflectionPickedPixel(own.g)-own.g*block;
|
|
1222
|
+
own.p=reflectionBlockPixel(own.g,(picked.y*block.x+picked.x+reflectionOwnRound)%(block.x*block.y));
|
|
1223
|
+
own.go=all(own.p<reflectionViewport());
|
|
1224
|
+
return own;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
fn reflectionOwnPixelOf(thread:vec3u,groups:vec3u)->ReflectionOwnPixel{
|
|
1229
|
+
let at=flatIndex(thread,groups,${Ce}u);
|
|
1230
|
+
if(at>=pendingIn.count){return ReflectionOwnPixel(vec2u(0u),vec2u(0u),false);}
|
|
1231
|
+
let x=pendingIn.entries[at].x;
|
|
1232
|
+
return reflectionOwnPixelAt(vec2u(x&0xffffu,x>>16u));
|
|
1233
|
+
}
|
|
1234
|
+
/** The two numbers the own ray of the pixel \`p\` is drawn from this image: a hash of the pixel and the image's turn \u2014 the grid's blue noise is
|
|
1235
|
+
* laid on the grid's texels and is not bound to the trace through the triangles. */
|
|
1236
|
+
fn reflectionOwnSample(p:vec2u)->vec2f{
|
|
1237
|
+
return vec2f(rand3dPcg16(vec3i(vec2i(p),i32(reflectionView.temporal.x))).xy)/65536.0;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
fn traceOwnHitAt(own:ReflectionOwnPixel){
|
|
1245
|
+
let slot=vec2i(reflectionOwnSlot(own.p));
|
|
1246
|
+
let coord=vec2i(own.p);
|
|
1247
|
+
let flags=surfaceFlagsAt(coord);
|
|
1248
|
+
var casts=surfaceReflects(flags)&&reflectionPixelTraces(coord,flags);
|
|
1249
|
+
var pixel=ReflectingPixel();
|
|
1250
|
+
if(casts){
|
|
1251
|
+
pixel=reflectingPixelAt(0u,coord,flags);
|
|
1252
|
+
casts=reflectionTrianglesWhole(pixel,own.g);
|
|
1253
|
+
}
|
|
1254
|
+
if(!casts){
|
|
1255
|
+
textureStore(surfaceRays,slot,REFLECTION_RAY_DEPTH,vec4u(bitcast<u32>(REFLECTION_NO_RAY_DEPTH),0u,0u,0u));
|
|
1256
|
+
return;
|
|
1257
|
+
}
|
|
1258
|
+
let R=reflectionStoreRay(slot,pixel,reflectionOwnSample(own.p),false);
|
|
1259
|
+
reflectionSceneHitStore(pixel.P,pixel.topN,R,0.0,own.g,isFirstPerson(pixel.flags));
|
|
1260
|
+
}
|
|
1261
|
+
/** The answer to the own ray of the pixel of \`own\`, written in its own texel as a grid texel's is: what the triangle its block's record keeps
|
|
1262
|
+
* shows (\`reflectionOwnRay\`, \`reflectionRecordOf\`), lit as a ray sent whole to them is (\`reflectionSceneStage\`, \`../sceneTraceHardware.ts\`:
|
|
1263
|
+
* the lit image's light where it shows the point, else the imprints', the record marked where the hit shading lights the hit again \u2014 its round's
|
|
1264
|
+
* passes then write the texel over, \`litOwnTexel\`), its draws seeded by its pixel \u2014 the pixels of a block share a record, never a
|
|
1265
|
+
* draw \u2014, a mover's where that triangle stands in the box of a placement that moved (\`reflectionTrianglesFresh\`, \`trace.ts\`); none (no valid
|
|
1266
|
+
* texel) where it cast none. */
|
|
1267
|
+
fn traceOwnAnswerAt(own:ReflectionOwnPixel){
|
|
1268
|
+
let slot=vec2i(reflectionOwnSlot(own.p));
|
|
1269
|
+
if(!reflectionRayTraces(bitcast<f32>(textureLoad(surfaceRays,slot,REFLECTION_RAY_DEPTH).r))){
|
|
1270
|
+
textureStore(traceOut,slot,vec4u(0u));
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
let here=reflectingPointAt(0u,vec2i(own.p));
|
|
1274
|
+
let stored=reflectionStoredRay(slot);
|
|
1275
|
+
reflectionOwnRay=true;
|
|
1276
|
+
let ended=reflectionSceneStage(here.P,here.topN,stored.ray,0.0,own.p,stored.cone,stored.firstPerson);
|
|
1277
|
+
textureStore(traceOut,slot,reflectionTrianglesFresh(here,stored,ended,own.p));
|
|
1278
|
+
}
|
|
1279
|
+
@compute @workgroup_size(${Ce})
|
|
1280
|
+
fn traceOwnHit(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u){
|
|
1281
|
+
let own=reflectionOwnPixelOf(thread,groups);
|
|
1282
|
+
if(own.go){traceOwnHitAt(own);}
|
|
1283
|
+
}
|
|
1284
|
+
@compute @workgroup_size(${Ce})
|
|
1285
|
+
fn traceOwnAnswer(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u){
|
|
1286
|
+
let own=reflectionOwnPixelOf(thread,groups);
|
|
1287
|
+
if(own.go){traceOwnAnswerAt(own);}
|
|
1288
|
+
}`),vn=v("REFLECTION_OWN_RAYS_WGSL",[fl,dl],"");var ul=`/** The screen stage's tally of a ray (\`reflectionCensus\`): a hit of the screen, which answers it whole, or a miss left to the
|
|
1289
|
+
* scene stage. */
|
|
1290
|
+
fn countScreen(hit:bool){
|
|
1291
|
+
tallyAdd(select(REFLECTION_CENSUS_LEFT,REFLECTION_CENSUS_SCREEN,hit),1u);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
fn countScreenEnded(begun:ReflectionScreenTexel,marched:ScreenHit,hit:bool,g:vec2u){
|
|
1297
|
+
var why=REFLECTION_ENDED_ACCEPTED;
|
|
1298
|
+
if(!begun.aimed.live){
|
|
1299
|
+
why=REFLECTION_ENDED_SCREENS_OFF;
|
|
1300
|
+
if(reflectionView.traced.x==0u){why=REFLECTION_ENDED_NO_TRACE;}
|
|
1301
|
+
else if(!reflectionOriginOnScreen(begun.own.P,begun.own.topN,begun.aimed.bias)){why=REFLECTION_ENDED_NO_ORIGIN;}
|
|
1302
|
+
}else if(!hit){
|
|
1303
|
+
if(marched.t<0.0){
|
|
1304
|
+
|
|
1305
|
+
why=REFLECTION_ENDED_BEHIND;
|
|
1306
|
+
if(marched.steps>=reflectionView.scene.x){why=REFLECTION_ENDED_EXHAUSTED;}
|
|
1307
|
+
if(marched.steps==0u||marched.above>=begun.aimed.ray.end){why=REFLECTION_ENDED_LEFT_SCREEN;}
|
|
1308
|
+
}else if(marched.plane.x<=0.0){why=REFLECTION_ENDED_REJ_PLANE;}
|
|
1309
|
+
else{
|
|
1310
|
+
let H=begun.aimed.ray.o+begun.aimed.ray.d*marched.t;
|
|
1311
|
+
let depth=reflectionPlaneDepth(H.xy,marched.pixel,marched.plane);
|
|
1312
|
+
let past=reflectionPast(worldAt(H.xy,depth),H.xy,depth);
|
|
1313
|
+
let noise=reflectionEdgeNoise(g);
|
|
1314
|
+
why=REFLECTION_ENDED_REJ_HISTORY;
|
|
1315
|
+
if(reflectionScreenMet){why=REFLECTION_ENDED_REJ_FIELD;}
|
|
1316
|
+
else if(!past.valid){why=REFLECTION_ENDED_REJ_PAST;}
|
|
1317
|
+
else if(reflectionHitVignette(H.xy,past.pixel)<noise){why=REFLECTION_ENDED_REJ_VIGNETTE;}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
tallyAdd(REFLECTION_CENSUS_ENDED+why,1u);
|
|
1321
|
+
// Why the march's misses ended as they did: where behind the surface (\`screenMarchStop\`, kept by the march when it ends behind one; the rays the walk gave up
|
|
1322
|
+
|
|
1323
|
+
if(why==REFLECTION_ENDED_BEHIND&&screenMarchStop.x>=1.0){
|
|
1324
|
+
let gap=screenMarchStop.x;
|
|
1325
|
+
tallyAdd(REFLECTION_CENSUS_BEHIND_GAP+select(select(select(0u,1u,gap>=2.0),2u,gap>=8.0),3u,gap>=32.0),1u);
|
|
1326
|
+
tallyAdd(REFLECTION_CENSUS_BEHIND_MIP+min(u32(screenMarchStop.y),3u),1u);
|
|
1327
|
+
tallyAdd(REFLECTION_CENSUS_BEHIND_STEP+select(select(0u,1u,marched.steps>=4u),2u,marched.steps>=11u),1u);
|
|
1328
|
+
}
|
|
1329
|
+
if(why==REFLECTION_ENDED_LEFT_SCREEN){tallyAdd(REFLECTION_CENSUS_LEFT_SCREEN+select(1u,0u,marched.steps==0u),1u);}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
fn countScene(){
|
|
1334
|
+
tallyAdd(REFLECTION_CENSUS_FATES+reflectionFate,1u);
|
|
1335
|
+
if(reflectionFate!=REFLECTION_FATE_NO_FIELD&&reflectionFate!=REFLECTION_FATE_BOUND){
|
|
1336
|
+
tallyAdd(REFLECTION_CENSUS_WORK+censusWorkBucket(reflectionWork),1u);
|
|
1337
|
+
tallyAdd(REFLECTION_CENSUS_WORK_SUM,reflectionWork);
|
|
1338
|
+
tallyMax(REFLECTION_CENSUS_WORK_MAX,reflectionWork);
|
|
1339
|
+
}
|
|
1340
|
+
}`,yn=m*m/32,Tn=(e,t,r,o)=>` let z=reflectionZOrder(local.xy);
|
|
1341
|
+
if(${t}){atomicOr(&listedBits[bitWord(z)],bitMask(z));}
|
|
1342
|
+
${o}
|
|
1343
|
+
var slot=countOneBits(atomicLoad(&listedBits[bitWord(z)])&lowBits(z&31u));
|
|
1344
|
+
for(var w=0u;w<bitWord(z);w++){slot+=countOneBits(atomicLoad(&listedBits[w]));}
|
|
1345
|
+
if(lane==0u){
|
|
1346
|
+
var n=0u;
|
|
1347
|
+
for(var w=0u;w<${yn}u;w++){n+=countOneBits(atomicLoad(&listedBits[w]));}
|
|
1348
|
+
if(n>0u){listedBase=${e}Append(n,${m*m}u);}
|
|
1349
|
+
}
|
|
1350
|
+
workgroupBarrier();
|
|
1351
|
+
if(${t}){${e}.entries[listedBase+slot]=${r};}`,ml=`/** The lanes of a tracing tile's workgroup that list an entry (\`tileListed\`), a bit each along the Z-order curve of the tile's texels, and where
|
|
1352
|
+
* the first of them lands in the list. */
|
|
1353
|
+
var<workgroup> listedBits:array<atomic<u32>,${yn}>;
|
|
1354
|
+
var<workgroup> listedBase:u32;
|
|
1355
|
+
|
|
1356
|
+
fn reflectionZOrder(c:vec2u)->u32{
|
|
1357
|
+
var z=0u;
|
|
1358
|
+
for(var b=0u;b<${Math.log2(m)}u;b++){z|=(((c.x>>b)&1u)<<(2u*b))|(((c.y>>b)&1u)<<(2u*b+1u));}
|
|
1359
|
+
return z;
|
|
1360
|
+
}`,pl=e=>`@group(0) @binding(${u.lights}) var<storage,read> directLights:DirectLights;
|
|
1361
|
+
@group(0) @binding(${u.traceOut}) var traceOut:texture_storage_2d<${Et},write>;
|
|
1362
|
+
|
|
1363
|
+
fn reflectionSampleAt(g:vec2u)->vec2f{return blueNoiseVec2(g,reflectionView.temporal.x);}
|
|
1364
|
+
|
|
1365
|
+
fn reflectionTrianglesRun()->bool{return REFLECTION_LAYER==0u&&reflectionDone(REFLECTION_SCENE_TRIANGLES);}
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
fn reflectionTrianglesWhole(own:ReflectingPixel,g:vec2u)->bool{
|
|
1372
|
+
return reflectionTrianglesRun()&&reflectionShownSharp(own.P,own.top,g);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
fn reflectionStoreRay(texel:vec2i,own:ReflectingPixel,u:vec2f,whole:bool)->vec3f{
|
|
1380
|
+
let ray=reflectionCastRay(own,u);
|
|
1381
|
+
let cone=reflectionCastCone(own,ray);
|
|
1382
|
+
let words=reflectionRayWords(ray.R,select(cone,-cone,isFirstPerson(own.flags)));
|
|
1383
|
+
textureStore(surfaceRays,texel,REFLECTION_RAY_DIRECTION,vec4u(words.x,0u,0u,0u));
|
|
1384
|
+
textureStore(surfaceRays,texel,REFLECTION_RAY_CONE,vec4u(words.y,0u,0u,0u));
|
|
1385
|
+
textureStore(surfaceRays,texel,REFLECTION_RAY_DEPTH,vec4u((bitcast<u32>(own.z)&~REFLECTION_RAY_WHOLE)|select(0u,REFLECTION_RAY_WHOLE,whole),0u,0u,0u));
|
|
1386
|
+
textureStore(surfaceRays,texel,REFLECTION_RAY_DISTANCE,vec4u(0u));
|
|
1387
|
+
return normalize(reflectionRayOf(words.x,words.y).xyz);
|
|
1388
|
+
}
|
|
1389
|
+
/** The ray the pixel \`own\` casts, drawn from \`u\`: the lobe it traces sampled (\`reflectionTopRay\`, through its top layer's
|
|
1390
|
+
* roughness, about the normal of that top layer), a mirror's \u2014 a roughness under a thousandth \u2014 its reflection about it, no draw. */
|
|
1391
|
+
fn reflectionCastRay(own:ReflectingPixel,u:vec2f)->ReflectionLobeRay{
|
|
1392
|
+
var ray=reflectionTopRay(own.topN,own.V,own.top,u);
|
|
1393
|
+
if(own.top<0.001){ray.R=reflect(-own.V,own.topN);}
|
|
1394
|
+
return ray;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
fn reflectionCastCone(own:ReflectingPixel,ray:ReflectionLobeRay)->f32{
|
|
1399
|
+
if(own.top<0.001){return REFLECTION_MIN_CONE;}
|
|
1400
|
+
return reflectionRayCone(own.topN,own.V,ray.axis.xyz,vec2f(ray.along,ray.alpha),ray.R);
|
|
1401
|
+
}
|
|
1402
|
+
${e?ul:""}`,gl=()=>`/** The ray generation of grid texel \`g\` of the surface \`layer\`: the pixel of its block this image picks (\`reflectionPickedPixel\`) casts a ray where its
|
|
1403
|
+
* lobe traces (\`reflectionPixelTraces\`), kept in the texel (\`reflectionStoreRay\`), sent whole to the scene's triangles where they show its lobe
|
|
1404
|
+
* sharp this image (\`reflectionTrianglesWhole\`, which it returns); otherwise the texel keeps the pixel's depth negated, no ray. */
|
|
1405
|
+
fn generateTexel(g:vec2u,layer:u32)->bool{
|
|
1406
|
+
let texel=vec2i(g);
|
|
1407
|
+
let coord=vec2i(reflectionPickedPixel(g));
|
|
1408
|
+
let flags=surfaceFlagsAt(coord);
|
|
1409
|
+
if(surfaceReflects(flags)&&reflectionPixelTraces(coord,flags)){
|
|
1410
|
+
let own=reflectingPixelAt(layer,coord,flags);
|
|
1411
|
+
let whole=reflectionTrianglesWhole(own,g);
|
|
1412
|
+
reflectionStoreRay(texel,own,reflectionSampleAt(g),whole);
|
|
1413
|
+
return whole;
|
|
1414
|
+
}
|
|
1415
|
+
textureStore(surfaceRays,texel,REFLECTION_RAY_DEPTH,vec4u(bitcast<u32>(-surfaceDepthAt(layer,coord)),0u,0u,0u));
|
|
1416
|
+
return false;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
@compute @workgroup_size(${m},${m})
|
|
1421
|
+
fn generateRays(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
1422
|
+
let t=reflectionTileOf(tile,groups);
|
|
1423
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
1424
|
+
let id=reflectionTileOrigin(t)+local.xy;
|
|
1425
|
+
var whole=false;
|
|
1426
|
+
if(all(id<reflectionGridSize())){whole=generateTexel(id,REFLECTION_LAYER);}
|
|
1427
|
+
|
|
1428
|
+
if(!reflectionTrianglesRun()){return;}
|
|
1429
|
+
${Tn("triangleRaysOut","whole","vec2u(id.x|(id.y<<16u),0u)","workgroupBarrier();")}
|
|
1430
|
+
}`,wl=`/** A ray the screen stage missed: its pending entry \u2014 its texel and the distance its miss reached \u2014 and whether there is one. */
|
|
1431
|
+
struct ReflectionMissed{entry:vec2u,missed:bool,}
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
struct ReflectionScreenTexel{valid:bool,own:ReflectingPixel,stored:ReflectionStoredRay,aimed:ReflectionScreenCast,}
|
|
1435
|
+
fn reflectionScreenTexelNone()->ReflectionScreenTexel{
|
|
1436
|
+
return ReflectionScreenTexel(false,ReflectingPixel(),ReflectionStoredRay(),reflectionScreenNone());
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
fn traceScreenBegin(g:vec2u,layer:u32)->ReflectionScreenTexel{
|
|
1443
|
+
let texel=vec2i(g);
|
|
1444
|
+
var begun=reflectionScreenTexelNone();
|
|
1445
|
+
|
|
1446
|
+
let depth=bitcast<f32>(textureLoad(surfaceRays,texel,REFLECTION_RAY_DEPTH).r);
|
|
1447
|
+
if(!reflectionRayTraces(depth)||reflectionRayWhole(depth)){return begun;}
|
|
1448
|
+
let coord=vec2i(reflectionPickedPixel(g));
|
|
1449
|
+
begun.valid=true;
|
|
1450
|
+
begun.own=reflectingPixelAt(layer,coord,surfaceFlagsAt(coord));
|
|
1451
|
+
begun.stored=reflectionStoredRay(texel);
|
|
1452
|
+
begun.aimed=reflectionScreenBegin(begun.own.P,begun.own.topN,begun.stored.ray);
|
|
1453
|
+
return begun;
|
|
1454
|
+
}`,El=e=>`/** The end of the screen stage of grid texel \`g\`, \`marched\` the march of its cast: its fresh texel written where the screen hit; otherwise the
|
|
1455
|
+
* ray missed, returned as its pending entry. */
|
|
1456
|
+
fn traceScreenEnd(begun:ReflectionScreenTexel,marched:ScreenHit,g:vec2u)->ReflectionMissed{
|
|
1457
|
+
let b=reflectionScreenEnd(begun.own.P,begun.own.topN,begun.stored.ray,begun.stored.cone,begun.aimed,marched,g);
|
|
1458
|
+
${e?"countScreen(b.hit);countScreenEnded(begun,marched,b.hit,g);":""}
|
|
1459
|
+
if(b.hit){
|
|
1460
|
+
textureStore(traceOut,vec2i(g),freshPack(reflectionShownBy(b.radiance,REFLECTION_STAGE_SCREEN),b.distance,reflectionAnswerMoves(b.hit)));
|
|
1461
|
+
return ReflectionMissed(vec2u(0u),false);
|
|
1462
|
+
}
|
|
1463
|
+
// The distance's lowest bit says the screen met a surface there (\`reflectionScreenMet\`): whoever reads the distance alone loses nothing of it.
|
|
1464
|
+
return ReflectionMissed(vec2u(g.x|(g.y<<16u),(bitcast<u32>(b.distance)&~${Xe})|select(0u,${Xe},reflectionScreenMet)),true);
|
|
1465
|
+
}`,vl=(e,t)=>`/** One thread a grid texel of a tracing tile (\`tiles.ts\`); the rays its group missed listed at once (\`tileListed\`), one
|
|
1466
|
+
* atomic a group on the list, the scene stage's dispatch raised to hold them. */
|
|
1467
|
+
@compute @workgroup_size(${m},${m})
|
|
1468
|
+
fn traceScreen(@builtin(workgroup_id) tile:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
1469
|
+
let t=reflectionTileOf(tile,groups);
|
|
1470
|
+
if(t==REFLECTION_NO_TILE){return;}
|
|
1471
|
+
let id=reflectionTileOrigin(t)+local.xy;
|
|
1472
|
+
var begun=reflectionScreenTexelNone();
|
|
1473
|
+
if(all(id<reflectionGridSize())){begun=traceScreenBegin(id,REFLECTION_LAYER);}
|
|
1474
|
+
${t==="polyfill"?` screenMarchLane=lane;
|
|
1475
|
+
`:""} // The march of the screen, every thread of the group taking part in it, in uniform control flow, those with no ray with none to march.
|
|
1476
|
+
let marched=reflectionSeenMarch(begun.aimed.ray,begun.aimed.live);
|
|
1477
|
+
var missed=ReflectionMissed(vec2u(0u),false);
|
|
1478
|
+
if(begun.valid){missed=traceScreenEnd(begun,marched,id);}
|
|
1479
|
+
|
|
1480
|
+
${Tn("pendingOut","missed.missed","missed.entry",e?"flushTally(lane);":"workgroupBarrier();")}
|
|
1481
|
+
}`,yl=(e,t)=>[wl,El(e),vl(e,t)].join(`
|
|
1482
|
+
`),Tl="0.001",Rl=e=>`/** The trace of the ray of the list word entry through the scene's triangles (reflectionSceneHitStore): the triangle it meets kept at its texel for
|
|
1483
|
+
* the kernel traceScene to answer from. */
|
|
1484
|
+
fn traceSceneHitRay(entry:vec2u){
|
|
1485
|
+
let g=vec2u(entry.x&0xffffu,entry.x>>16u);
|
|
1486
|
+
let texel=vec2i(g);
|
|
1487
|
+
let coord=vec2i(reflectionPickedPixel(g));
|
|
1488
|
+
let own=reflectingPointAt(REFLECTION_LAYER,coord);
|
|
1489
|
+
let stored=reflectionStoredRay(texel);
|
|
1490
|
+
reflectionSceneHitStore(own.P,own.topN,reflectionRayLobe(stored.ray).R,bitcast<f32>(entry.y),g,stored.firstPerson);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
@compute @workgroup_size(${m*m})
|
|
1494
|
+
fn traceSceneHit(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u){
|
|
1495
|
+
let at=flatIndex(thread,groups,${m*m}u);
|
|
1496
|
+
if(at<pendingIn.count){traceSceneHitRay(pendingIn.entries[at]);}
|
|
1497
|
+
}
|
|
1498
|
+
/** The fresh texel of the triangles' answer b to the ray stored, cast from the point own: its light made finite and shown by the stage that answered
|
|
1499
|
+
* it (reflectionShownBy), a mover's where the triangle met stands on a placement that moved, as the meshes' fields stage tells its hits
|
|
1500
|
+
* (reflectionMoverHolds) \u2014 without it a moving block's reflection stayed in the histories behind it. A ray sent whole (traceScene) and a pixel's
|
|
1501
|
+
* own (traceOwnAnswerAt) alike, at the coordinate whose record of the hits' buffer keeps the triangle (reflectionRecordOf): where the hit
|
|
1502
|
+
* shading lights hits again, a mover's is told in that record besides (REFLECTION_HIT_MOVER) \u2014 the lit answer writes over this texel, and
|
|
1503
|
+
* reads it there. */
|
|
1504
|
+
fn reflectionTrianglesFresh(own:ReflectingPoint,stored:ReflectionStoredRay,b:ReflectionEnd,at:vec2u)->vec4u{
|
|
1505
|
+
let moves=reflectionAnswerMoves(b.hit)||(b.hit&&reflectionMoverHolds(own.P+stored.ray.R*b.distance,${Tl}));${e?`
|
|
1506
|
+
if(moves){reflectionHits[reflectionRecordOf(at)]|=${gt}u;}`:""}
|
|
1507
|
+
return freshPack(reflectionShownBy(makeFinite3(b.radiance),reflectionAnswered),b.distance,moves);
|
|
1508
|
+
}`,bl=(e,t)=>`/** The ray the screen stage missed, missed: the ray the ray generation stored for its texel, from the pixel's point and the normal of its top layer (the coat's where it
|
|
1509
|
+
* carries one, which the normal bias of the ray through the scene's triangles follows), marched through the scene from where the
|
|
1510
|
+
* screen stopped knowing it, and its texel's fresh radiance written whole. Its cone angle, which dithers the march's step, is the
|
|
1511
|
+
* inverse of its pdf. A pixel of a first-person object (the stored cone's sign) casts a ray that does not meet the stand-ins of
|
|
1512
|
+
* first-person objects (ST_MEET_WORLD_SPACE). The field's program leaves a ray the meshes' fields stage answered (REFLECTION_MESH_ANSWERED);
|
|
1513
|
+
* the triangles' program answers the rays the ray generation sent them whole (triangleRaysOut), from their start, their walk whole. */
|
|
1514
|
+
fn traceSceneRay(missed:vec2u){
|
|
1515
|
+
let g=vec2u(missed.x&0xffffu,missed.x>>16u);
|
|
1516
|
+
${t?"":`if(missed.y==${kr}){return;}`}
|
|
1517
|
+
${t?"":`reflectionScreenMet=(missed.y&${Xe})!=0u;`}
|
|
1518
|
+
let texel=vec2i(g);
|
|
1519
|
+
let coord=vec2i(reflectionPickedPixel(g));
|
|
1520
|
+
let own=reflectingPointAt(REFLECTION_LAYER,coord);
|
|
1521
|
+
|
|
1522
|
+
let stored=reflectionStoredRay(texel);
|
|
1523
|
+
|
|
1524
|
+
let ended=reflectionSceneStage(own.P,own.topN,stored.ray,bitcast<f32>(missed.y),g,stored.cone,stored.firstPerson);
|
|
1525
|
+
// The screen's share of a ray it met near its border, blended into the stage's answer (\`reflectionMetBlend\`).
|
|
1526
|
+
let b=reflectionMetBlend(ended,reflectionMetShare,reflectionMetLight,reflectionMetAt);
|
|
1527
|
+
|
|
1528
|
+
// The stage that answered it, its colour in its light's place where the view of the stages is drawn (\`reflectionShownBy\`).${t?`
|
|
1529
|
+
textureStore(traceOut,texel,reflectionTrianglesFresh(own,stored,b,g));`:`
|
|
1530
|
+
let moves=reflectionAnswerMoves(b.hit);
|
|
1531
|
+
textureStore(traceOut,texel,freshPack(reflectionShownBy(b.radiance,reflectionAnswered),b.distance,moves));`}
|
|
1532
|
+
|
|
1533
|
+
if(reflectionCached&&!b.hit){textureStore(surfaceRays,texel,REFLECTION_RAY_DISTANCE,vec4u(bitcast<u32>(-reflectionFar())|1u,0u,0u,0u));}
|
|
1534
|
+
${e?"countScene();":""}
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
@compute @workgroup_size(${m*m})
|
|
1539
|
+
fn traceScene(@builtin(global_invocation_id) thread:vec3u,@builtin(num_workgroups) groups:vec3u${e?",@builtin(local_invocation_index) lane:u32":""}){
|
|
1540
|
+
let at=flatIndex(thread,groups,${m*m}u);
|
|
1541
|
+
if(at<pendingIn.count){traceSceneRay(pendingIn.entries[at]);}
|
|
1542
|
+
${e?"flushTally(lane);":""}
|
|
1543
|
+
}`,Fe=(e,t=!1,r="none",o=se,i,s=oe,a="none",l=!1)=>W([pl(e),...t?[Rl(a!=="none")]:[ml,gl(),yl(e,r)],bl(e,t)].join(`
|
|
1544
|
+
`),[...i?wn(i):[],xt(),...t?[Q,po]:[],...t&&a==="finish"?[Ba]:[],...t&&a==="direct"?[Wa]:[],Oo,wo,Eo,vo,yt,_t,Tt,k,te(b),_l(e,t,r,o,s,a,l),da,Ht,Ri,j,R,Wt,Ti,jo(0,u.blue,!0),qt,Zt,hn,...t&&a!=="none"?[cn]:[],Qt,fn,...e?[Qi(u.census)]:[],...xl(),...t?[vn]:[]]),_l=(e,t,r,o,i,s,a)=>fa(b,t?gn(o,i,s==="finish"?Nt:K,s!=="none"):un(o,a),t,r,e),xl=()=>[x({name:"pendingOut",group:0,binding:u.pendingOut,entry:"vec2u",append:!0}),x({name:"triangleRaysOut",group:0,binding:u.triangleRaysOut,entry:"vec2u",append:!0}),x({name:"pendingIn",group:0,binding:u.pendingIn,entry:"vec2u",append:!1})];function Sl(e,t,r){let o="Trillion3D reflection meshes",i=e.createShaderModule({label:o,code:Fe(!1,!1,"none",r,Wi(e)?"native":"polyfill",void 0,void 0,dt(e.features))}),s=e.createBindGroupLayout({label:o,entries:Ya()}),a=e.createBindGroupLayout({label:`${o} grid`,entries:Ua()}),l=c=>{let d=c?"compactReflectionMeshes":"traceReflectionMeshes",p=e.createBindGroupLayout({label:`${o} ${c?"written":"read"} list`,entries:qa(c)}),w=U(e,`${o} ${c?"compaction":"trace"}`,e.createPipelineLayout({bindGroupLayouts:[c?t.meshCompact:t.meshTrace,N(e),c?a:s,p]}),i,[d],{REFLECTION_LAYER:0});return{list:p,swapped:g=>w.swapped(g),pipeline:()=>w.pipelineOf(d)}},n=l(!0),h=l(!1),f=[n,h];return{group:s,paramsGroup:a,compact:n,trace:h,swapped:c=>Ee(f,c)}}var Jt=new WeakMap;function bn(e,t,r){Jo(e,"compute",aa)&&(Jt.has(t)||Jt.set(t,Sl(e,t,r)),ra(e))}function _n(e,t,r,o,i,s,a,l){let n=na(e,t);if(!l||!ka(n,s.sceneTraces))return;let h=Jt.get(i.layouts);if(!h)return;let f=Pa(e);return f&&o.borrowMeshes(f.meshes.grid),sa(e,t,r,o.meshes,h,n,a,l)}var Rn=new WeakMap;function xn(e,t,r){let o=Jt.get(e);if(!o)return;let i=Rn.get(r);return i||(i=[o.compact,o.trace].map(({list:s})=>t.createBindGroup({layout:s,entries:[{binding:0,resource:{buffer:r}}]})),Rn.set(r,i)),i}var Ln="markClosureTiles",On="listClosureTiles",Nn="classifyClosureTiles",In=64,Ll=x({name:"markedOut",group:0,binding:u.marked,entry:"u32",append:!0}),Ol=()=>`@group(0) @binding(${u.lights}) var<storage,read> directLights:DirectLights;
|
|
1545
|
+
@group(0) @binding(${u.marks}) var<storage,read_write> closureMarks:array<atomic<u32>>;
|
|
1546
|
+
|
|
1547
|
+
fn closureTilesOfGrid()->vec2u{return (reflectionGridSize()+vec2u(${m-1}u))/${m}u;}
|
|
1548
|
+
@compute @workgroup_size(1)
|
|
1549
|
+
fn ${Ln}(@builtin(workgroup_id) group:vec3u){
|
|
1550
|
+
let overflow=overflowTileAt(group);
|
|
1551
|
+
if(overflow.z==0u){return;}
|
|
1552
|
+
let pixel=overflow.xy*${pa}u;
|
|
1553
|
+
if(any(pixel>=reflectionViewport())){return;}
|
|
1554
|
+
let tile=pixel/(vec2u(${m}u)*reflectionBlock());
|
|
1555
|
+
let tiles=closureTilesOfGrid();
|
|
1556
|
+
if(all(tile<tiles)){atomicStore(&closureMarks[tile.y*tiles.x+tile.x],1u);}
|
|
1557
|
+
}
|
|
1558
|
+
@compute @workgroup_size(${In})
|
|
1559
|
+
fn ${On}(@builtin(global_invocation_id) id:vec3u){
|
|
1560
|
+
let tiles=closureTilesOfGrid();
|
|
1561
|
+
if(id.x>=tiles.x*tiles.y){return;}
|
|
1562
|
+
if(atomicExchange(&closureMarks[id.x],0u)!=0u){
|
|
1563
|
+
markedOut.entries[markedOutAppend(1u,1u)]=(id.x%tiles.x)|((id.x/tiles.x)<<16u);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
var<workgroup> closureListed:u32;
|
|
1568
|
+
@compute @workgroup_size(${m},${m})
|
|
1569
|
+
fn ${Nn}(@builtin(workgroup_id) group:vec3u,@builtin(num_workgroups) groups:vec3u,@builtin(local_invocation_id) local:vec3u,@builtin(local_invocation_index) lane:u32){
|
|
1570
|
+
if(lane==0u){closureListed=reflectionTileOf(group,groups);}
|
|
1571
|
+
let listed=workgroupUniformLoad(&closureListed);
|
|
1572
|
+
if(listed==REFLECTION_NO_TILE){return;}
|
|
1573
|
+
let tile=vec2u(listed&0xffffu,listed>>16u);
|
|
1574
|
+
${Ir}`,Nl=()=>W(Ol(),[xt(),yt,_t,Tt,k,te(b),Qt,Ea(u.overflow),Ll]),Ze="Trillion3D reflection closure tiles",Il=X((e,t)=>{let r=wi(e),o=e.createShaderModule({label:Ze,code:Nl()}),i=(s,a)=>so(e,{layout:e.createPipelineLayout({label:Ze,bindGroupLayouts:[s,t]}),compute:{module:o,entryPoint:a}});return{layouts:r,mark:i(r.mark,Ln),list:i(r.list,On),classify:i(r.classify,Nn),compiled:void 0}});function An(e,t){let r=Il(e,t);if(r.compiled)return r.compiled;let o=r.mark.get(),i=r.list.get(),s=r.classify.get();if(!(!o||!i||!s))return r.compiled={mark:o,list:i,classify:s,layouts:r.layouts}}var Sn=new WeakMap;function kn(e,t,r,o,i,s){let a=Sn.get(r),{grids:l}=r;if(a&&a.list===s.list&&a.normals===o&&a.lobes===i&&a.grids===l)return a.groups;let n=f=>({buffer:f}),h={mark:e.createBindGroup({label:Ze,layout:t.mark,entries:[{binding:u.overflow,resource:{buffer:s.list,...ga(s.tiles,r.closure)}},{binding:u.marks,resource:n(r.marks)}]}),list:e.createBindGroup({label:Ze,layout:t.list,entries:[{binding:u.marks,resource:n(r.marks)},{binding:u.marked,resource:n(r.marked)}]}),classify:e.createBindGroup({label:Ze,layout:t.classify,entries:[{binding:u.flags,resource:r.flagsView},{binding:u.normals,resource:o},{binding:u.lobes,resource:i},{binding:u.tiles,resource:n(r.marked)},{binding:u.tracingOut,resource:n(l.tracing)},{binding:u.clearTracingOut,resource:n(l.clearTracing)},{binding:u.resolveOut,resource:n(l.resolve)},{binding:u.clearOut,resource:n(l.clear)}]})};return Sn.set(r,{list:s.list,normals:o,lobes:i,grids:l,groups:h}),h}var Cn=e=>_(_(e[0],m)*_(e[1],m),In);var Al=ie((e,t,r)=>{let[o,i]=t.split(" ");return e.createShaderModule({label:`Trillion3D reflection scene trace ${i} ${q(r)}`,code:Fe(!1,!0,"none",o,void 0,r,i)})}),er=(e,t,r,o)=>Al(e,`${t} ${o}`,r),Fn="traceScene",Pn="traceSceneHit",Gn="markOwnRays",Mn="traceOwnHit",Hn="traceOwnAnswer",Wn=(e,t)=>({hit:[Ct(e),N(e),$e(e)],answer:[It(e,t),N(e),At(e)]}),kl=(e,t)=>({direct:[Ft(e),ri(e),$e(e)],finish:[Pt(e,t),N(e),Gt(e)]}),de=(e,t,r,o,i,s=`Trillion3D reflection scene trace ${q(t)}`)=>U(e,s,e.createPipelineLayout({bindGroupLayouts:o}),r,i,{REFLECTION_LAYER:0}),Cl=ie((e,t,r)=>{let[o,i]=Vn(t),s=Wn(e,o),a=er(e,o,r,i?"direct":"none"),l=de(e,r,a,s.hit,[Pn]),n=de(e,r,a,s.answer,[Fn]),h=[l,n];return{light:o,lit:i,get ready(){return l.ready&&n.ready},get pending(){return l.pending||n.pending},swapped:f=>Ee(h,f),hit:()=>l.pipelineOf(Pn),pipeline:()=>n.pipelineOf(Fn)}}),Fl="litDirectOwn",Pl="litFinishOwn";function Cr(e,t,r,o){let{entries:i,extra:s,labels:a}=o,l=o.reset?Lr(e,"litReset"):void 0,n=Lr(e,"litCompact"),h=Xa(e),f=kl(e,t),c=de(e,r,er(e,t,r,"direct"),[...f.direct,...s],[i.direct],a?.direct),d=de(e,r,er(e,t,r,"finish"),[...f.finish,...s],[i.finish],a?.finish),p=Za({reset:l,compact:n,list:h,direct:c,finish:d},{reset:o.reset?"litReset":void 0,compact:"litCompact",direct:i.direct,finish:i.finish});return{stages:[...l?[l]:[],n,...h.all,c,d],kernels:p}}var Gl=ie((e,t,r)=>{let[o,i]=Vn(t),s=Wn(e,o),a=kt(e),l=er(e,o,r,i?"direct":"none"),n=de(e,r,l,s.hit,[Gn]),h=de(e,r,l,[...s.hit,a],[Mn]),f=de(e,r,l,[...s.answer,a],[Hn]),c=i?Cr(e,o,r,{entries:{direct:Fl,finish:Pl},extra:[a],reset:!0}):void 0,d=[n,h,f,...c?.stages??[]];return{get ready(){return d.every(p=>p.ready)},get pending(){return d.some(p=>p.pending)},mark:()=>n.pipelineOf(Gn),hit:()=>h.pipelineOf(Mn),answer:()=>f.pipelineOf(Hn),lit:c?.kernels}});var Bn=le(Gl),Dn=new Map;function Fr(e,t){let r=Dn.get(e);return r||Dn.set(e,r=[`${e} false`,`${e} true`]),r[t?1:0]}var Vn=e=>{let[t,r]=e.split(" ");return[t,r==="true"]};var $n=le(Cl);var Ml=ie((e,t,r)=>{let o=`Trillion3D reflection hit shading ${q(r)}`,{stages:i,kernels:s}=Cr(e,t,r,{entries:{direct:"litDirect",finish:"litFinish"},extra:[],reset:!1,labels:{direct:`${o} direct`,finish:`${o} finish`}});return{light:t,get ready(){for(let a=0;a<i.length;a++)if(!i[a].ready)return!1;return!0},get pending(){for(let a=0;a<i.length;a++)if(i[a].pending)return!0;return!1},swapped:a=>Ee(i,a),opaque:s}});var zn=le(Ml);var Yn=new WeakMap,Pr=new WeakMap;function jn(e,t,r){if(!Fi(t))return!1;if($o(e,r,t.vertices))return Pr.delete(e),!0;let o=Pr.get(e);if(o?.width!==r[0]||o.height!==r[1]||o.bounces!==t.bounces||o.refractions!==t.refractions){Pr.set(e,{width:r[0],height:r[1],bounces:t.bounces,refractions:t.refractions});let i=Math.min(e.limits.maxStorageBufferBindingSize,e.limits.maxBufferSize);console.warn(`reflection hit shading refused: a grid of ${r[0]} x ${r[1]} texels with ${t.bounces} reflection bounce${t.bounces===1?"":"s"} over ${t.refractions+1} refraction stretch${t.refractions===0?"":"es"} a path needs more than the ${i>>20} MB a storage binding of this device holds (min of maxStorageBufferBindingSize and maxBufferSize); lower reflectionMaxBounces or reflectionMaxRefractionBounces, use a coarser reflection level or a smaller image`)}return!1}function Xn(e,t,r,o,i,s,a,l){if(!i||!r)return;let n=r.sceneTrace.maskHold.use("hit shading",o,zn(e.device,o),zt,Ye,Ue)?.kernel;if(!n?.ready)return;let h=s.prepare(a,t.lightGrid,l),f=Yn.get(e);if(!f){let c={kernels:n,bucket:t.bucket,vertices:t.vertices,group:i,grid:s,lightGrid:h};return Yn.set(e,c),c}return f.kernels=n,f.bucket=t.bucket,f.vertices=t.vertices,f.group=i,f.grid=s,f.lightGrid=h,f}var Un=new WeakMap,qn=new WeakMap,Kn=new Uint32Array(4),P=(e,t)=>({binding:e,resource:t});function Hl(e,t,r,o,i,s,a,l){let{hit:n}=o,{views:h,sceneTrace:f}=i,c=0;e[c++]=t.kernels.light,e[c++]=s.triangleRays,e[c++]=s.pending,e[c++]=l,e[c++]=s.rays,e[c++]=s.fresh,e[c++]=a.flags,e[c++]=a.normals,e[c++]=a.lobes,e[c++]=o.lights,e[c++]=o.vectors,e[c++]=r.depthView,e[c++]=o.lightPattern,e[c++]=o.lightProfile.view,e[c++]=o.lightProfile.sampler,e[c++]=t.lightGrid,e[c++]=o.fog.cubemap,e[c++]=o.fog.sampler,e[c++]=n.tables,e[c++]=n.depth,e[c++]=n.indirect,e[c++]=n.feedback,e[c++]=n.instances,e[c++]=h.nodes,e[c++]=h.frames,e[c++]=h.worlds,e[c++]=h.tree,e[c++]=f.params,e.length!==c&&(e.length=c)}var Zn=(e,t,r,o,i)=>e.createBindGroup({layout:ja(e),entries:[P(Ie.params,I(t.params)),P(Ie.pending,I(i)),P(Ie.hits,I(r)),P(Ie.list,I(t.list)),P(Ie.materials,o)]});function Dl(e,t,r,o,{grids:i,lit:s},a,l){let{device:n}=t,{views:h,sceneTrace:f}=o,{flags:c,normals:d,lobes:p}=a,w={flags:c,normals:d,lobes:p,rays:i.rays,lights:I(r.lights)},g=[P(u.litList,I(s.list)),P(u.litSorted,I(s.sorted)),P(u.litRadiance,I(s.radiance))],T=(E,G)=>n.createBindGroup({layout:E,entries:G});return{direct:T(Ft(n),[...A(u,{...w,hits:I(l)}),...xe(h),...g,P(u.litFunction,r.lightPattern),P(u.litGrid,e.lightGrid),...mi(Da.lightProfile,r.lightProfile)]),finish:T(Pt(n,e.kernels.light),[...A(u,{...w,vectors:r.vectors,depthHistory:t.depthView,traceOut:i.fresh}),...re(Nt,r.hit),...B(V,!0,r.fog),P(u.hits,I(l)),...g]),finishScene:T(Gt(n),[P(L.first,I(f.params))])}}function Qn(e,t,r,o,i,s,a){let{device:l}=t,n=typeof i=="object"?i:void 0,h=n?n.grids:t.grids,f=n?n.pixels:r,c=h.lit(a,e.vertices),d=Un.get(c);d||Un.set(c,d={grids:h,lit:c,identity:he()});let p=h.hits(Re(!0),a);if(Hl(d.identity.next,e,t,r,o,h,f,p),d.identity.moved()||!d.groups){let w=d.materials=c.materials.createView();d.hits=p,d.groups={compact:Zn(l,c,p,w,h.triangleRays),...Qa(l,c,w),...Dl(e,t,r,o,d,f,p),scene:s},d.own=void 0}return d.groups.scene=s,d.width!==a[0]&&(Kn[0]=a[0],l.queue.writeBuffer(c.params,0,Kn),d.width=a[0]),d}function Jn(e,t,r,o,i=[]){e.clearBuffer(t.grids.lit(r,o).list,0,4);for(let{grids:s}of i)e.clearBuffer(s.lit(r,o).list,0,4)}function es(e,t,r,o,i,s,a){let l=qn.get(r.grids);l||(l=Ja(L.group),qn.set(r.grids,l));let n=l(i,r.lit,s,t.bucket),h=n.view??={index:b,direct:t.group,finish:o};h.direct=t.group,h.finish=o,n.grid=t.grid,en(e,n,a)}function Gr(e,t,r,o,i,s,a,l,n){let h=Qn(t,r,o,i,s,a.maskedScene,l);es(e,t,h,n,t.kernels.opaque,h.groups,h.grids.triangleRays)}function ts(e,t,r,o,i,s,a){let l=Qn(e,t,r,o,i,s.maskedScene,a),{lit:n,hits:h,materials:f,grids:c}=l;return l.own??={...l.groups,compact:Zn(t.device,n,h,f,c.pending)},l.own.scene=s.maskedScene,l}function rs(e,t,r,o,i){es(e,t,r,o,i,r.own,r.grids.pending)}var Wl=[],Bl=oo((e,t)=>{let r=fo(e,`Trillion3D reflection own rays round ${t}`,16);return e.queue.writeBuffer(r,0,new Uint32Array([t])),r}),ns=X((e,t)=>e.createBindGroup({layout:kt(e),entries:[{binding:ce.binding,resource:{buffer:Bl(e,t)}}]})),ss=(e,t,r)=>({flags:t.flags,normals:t.normals,lobes:t.lobes,rays:r.rays,lights:{buffer:e.inputs.lights}});function os(e,t,r,o){let{device:i,inputs:s,reflection:a}=e;return i.createBindGroup({layout:e.layout,entries:[...A(u,{...ss(e,t,r),vectors:s.vectors,depthHistory:a.depthView,traceOut:r.fresh,pendingIn:{buffer:o},movers:{buffer:s.movers}}),...re(K,s.hit),...B(V,!0,s.fog),{binding:u.hits,resource:{buffer:r.hits(e.words,e.grid)}}]})}function is(e,t,r,[o,i]){return e.device.createBindGroup({layout:Ct(e.device),entries:[...A(u,{...ss(e,t,r),pendingIn:{buffer:o},hits:{buffer:r.hits(e.words,e.grid)},pendingOut:{buffer:i}}),...xe(e.views)]})}var as=(e,t,r)=>({surface:os(e,t,r,r.triangleRays),hits:is(e,t,r,[r.triangleRays,r.pending]),own:{hits:is(e,t,r,[r.pending,r.triangleRays]),answer:os(e,t,r,r.pending)}});function Vl(e){let{reflection:t,inputs:r,views:o,words:i,grid:s}=e,{next:a}=t.trace.hardware.identity,{hit:l}=r,n=0;a[n++]=e.layout,a[n++]=t.grids,a[n++]=r.flags,a[n++]=r.normals,a[n++]=r.lobes,a[n++]=r.lights,a[n++]=r.fog.cubemap,a[n++]=r.fog.sampler,a[n++]=r.vectors,a[n++]=t.depthView,a[n++]=r.movers,a[n++]=l.tables,a[n++]=l.depth,a[n++]=l.final,a[n++]=l.feedback,a[n++]=l.instances,a[n++]=t.grids.hits(i,s);let h=t.closureSides?.sides??Wl;for(let f=0;f<h.length;f++){let c=h[f];a[n++]=c.flagsView,a[n++]=c.grids.hits(i,s),a[n++]=r.closureNormals?.[c.closure-1]}a[n++]=o.nodes,a[n++]=o.frames,a[n++]=o.worlds,a[n++]=o.tree,a.length!==n&&(a.length=n)}function $l(e){let{reflection:t,inputs:r}=e,o=(t.closureSides?.sides??[]).map(l=>{let n=r.closureNormals?.[l.closure-1];if(n)return as(e,{flags:l.flagsView,normals:n,lobes:l.lobesView},l.grids)}),{surface:i,hits:s,own:a}=as(e,r,t.grids);return{closures:o,opaque:i,hits:s,own:a}}function ls(e,t,r,o,i,s){let{device:a,trace:l}=e,n={device:a,layout:It(a,o),reflection:e,inputs:t,views:r.views,words:Re(i),grid:s};Vl(n);let h=l.hardware.sceneGroup(At(a),r.sceneTrace,L.first),f=l.hardware.maskedSceneGroup($e(a),r.sceneTrace,L.first),c=l.hardware.groups;return!l.hardware.identity.moved()&&c?(c.scene=h,c.maskedScene=f,c):l.hardware.groups={...$l(n),scene:h,maskedScene:f}}var O=e=>({buffer:e});function zl(e,t,r,o,i,s){let a=o.emptyMarks(i);return e.createBindGroup({layout:t,entries:A(u,{flags:r.flags,normals:r.normals,lobes:r.lobes,tracingOut:O(o.tracing),clearTracingOut:O(o.clearTracing),resolveOut:O(o.resolve),clearOut:O(o.clear),emptyResolved:a.resolved,emptyHistory:a.history[s]})})}var tr=e=>[e(0),e(1)],ue=e=>[e,e];function Yl(e,t){let{device:r,layouts:o,scene:i,surface:s,grids:a,field:l,past:n,group:h}=e,{rays:f}=a;return{classify:tr(c=>zl(r,o.classify,s,a,e.resolved,c)),generate:ue(h(o.generate,{rays:f,...l,tiles:O(a.tracing),blue:i.blue,triangleRaysOut:O(a.triangleRays)})),screen:ue(h(o.screen,{rays:f,...l,...n,tiles:O(a.tracing),traceOut:a.fresh,pendingOut:O(a.pending),...i.census&&{census:i.census}})),clearTracing:ue(h(o.clearTracing,{rays:f,tiles:O(a.clearTracing)})),scene:ue(h(o.scene,{lights:i.lights,...i.census&&{census:i.census},...n,rays:f,traceOut:a.fresh,pendingIn:O(a.pending)},t.all)),meshCompact:ue(h(o.meshCompact,{rays:f,pendingMesh:O(a.pending)})),meshTrace:ue(h(o.meshTrace,{lights:i.lights,rays:f,traceOut:a.fresh,pendingMesh:O(a.pending),movers:i.movers},t.meshes))}}function Ul(e,{vectors:t,layerMotion:r},o){let{layouts:i,scene:s,grids:a,resolved:l,field:n,group:h}=e,{history:f}=a,c=O(a.resolve);return{clear:tr(d=>h(o.clear,{...n,...o.out,tiles:O(a.clear),resolvedOut:l,historyOut:f[d]})),resolve:ue(h(i.resolve,{...n,tiles:c,freshIn:a.fresh,resolvedOut:l,movers:s.movers})),temporal:tr(d=>h(i.temporal,{tiles:c,freshIn:a.fresh,temporalIn:l,vectors:t,layerMotion:r,movers:s.movers,historyIn:f[1-d],historyOut:f[d]})),bilateral:tr(d=>h(o.bilateral,{...n,...o.out,tiles:c,temporalIn:l,bilateralIn:f[d]}))}}function Mr(e,t,r,o,i){let{device:s,layouts:a,scene:l,sceneEntries:n,vectors:h,depth:f}=e,{flags:c,normals:d,lobes:p}=t,{rays:w}=r,g={device:s,layouts:a,scene:l,surface:t,grids:r,resolved:o,past:{vectors:h,depthHistory:f},field:{lights:l.lights},group:(T,E,G=[])=>s.createBindGroup({layout:T,entries:[...A(u,{flags:c,normals:d,lobes:p,...E.rays?{}:{raysRead:w},...E}),...G]})};return{...Yl(g,n),...Ul(g,e,i)}}function ql(e,t,r){let{targetView:o,resolvedView:i,depthView:s,grids:a,trace:l,front:n,census:h}=e,{next:f}=l.identity,c=0;f[c++]=t,f[c++]=o,f[c++]=i,f[c++]=s,f[c++]=a,f[c++]=n.grids,f[c++]=n.views.flags,f[c++]=h.buffer,f[c++]=n.views.normals,f[c++]=n.views.lobes,f[c++]=n.views.traced,f[c++]=r.flags,f[c++]=n.views.resolved,f[c++]=r.normals,f[c++]=r.lobes,f[c++]=r.lights,f[c++]=r.fog.cubemap,f[c++]=r.fog.sampler,f[c++]=r.field,f[c++]=r.field.readGeneration,f[c++]=r.vectors,f[c++]=r.blue,f[c++]=r.layerMotion,f[c++]=r.movers;let{hit:d}=r;f[c++]=d.tables,f[c++]=d.depth,f[c++]=d.final,f[c++]=d.feedback,f[c++]=d.grid,f[c++]=d.instances;let p=e.closureSides?.sides;if(p)for(let g=0;g<p.length;g++){let T=p[g];f[c++]=T.flagsView,f[c++]=T.resolvedView,f[c++]=T.targetView,f[c++]=T.grids}let w=r.closureNormals;if(w)for(let g=0;g<w.length;g++)f[c++]=w[g];f.length!==c&&(f.length=c)}function cs(e,t,r,o){let{device:i,targetView:s,resolvedView:a,depthView:l,grids:n,trace:h,front:f,census:c}=e;if(ql(e,t,o),!h.identity.moved()&&h.groups)return h.groups;let d={lights:{buffer:o.lights},movers:{buffer:o.movers},blue:o.blue,...c.buffer&&{census:{buffer:c.buffer}}},p=B(V,!0,o.fog),w={device:i,layouts:r,scene:d,sceneEntries:{all:[...si(K,o.field,o.hit),...p],meshes:[...re(K,o.hit),...p]},vectors:o.vectors,layerMotion:o.layerMotion,depth:l};return h.groups={keepDepth:i.createBindGroup({layout:r.keepDepth,entries:[{binding:u.depthKeep,resource:l}]}),opaque:Mr(w,o,n,a,{bilateral:r.bilateral,clear:r.clear,out:{target:s}}),front:Mr(w,f.views,f.grids,f.views.resolved??a,{bilateral:r.bilateralFront,clear:r.clearFront,out:{frontTarget:f.views.traced}}),closures:(e.closureSides?.sides??[]).map(g=>{let T=o.closureNormals?.[g.closure-1];if(T)return Mr(w,{flags:g.flagsView,normals:T,lobes:g.lobesView},g.grids,g.resolvedView,{bilateral:r.bilateral,clear:r.clear,out:{target:g.targetView}})})}}var Wr={generate:["generateRays","generateRays"],screen:["traceScreen","traceScreen"],clearTracing:["clearTracing","clearTracing"],scene:["traceScene","traceScene"],clear:["clearOpaque","clearFront"],resolve:["resolveSurface","resolveSurface"],temporal:["temporalSurface","temporalSurface"],bilateral:["bilateralOpaque","bilateralFront"],classify:["classifyTiles","classifyTiles"]},hs=Object.keys(Wr);async function ms(e,t,r,o){let i=h=>({generate:o.generate,screen:o.screen,clearTracing:o.clearTracing,scene:o.scene,clear:h===0?o.clear:o.clearFront,resolve:o.resolve,temporal:o.temporal,bilateral:h===0?o.bilateral:o.bilateralFront,classify:o.classify}),s=async h=>{let f=i(h),c=await Promise.all(hs.map(d=>Er(e,[f[d],r],t.trace,[Wr[d][h]],{REFLECTION_LAYER:h}).then(p=>p[Wr[d][h]])));return Object.fromEntries(hs.map((d,p)=>[d,c[p]]))},[a,l,n]=await Promise.all([s(0),s(1),Er(e,[o.keepDepth,r],t.trace,["keepDepth"])]);return{layouts:o,group:r,opaque:a,front:l,keepDepth:n.keepDepth}}var Kl=[{label:mt,kernels:["clearTracing","generate","screen"]},{label:We,kernels:["scene"]},{label:Be,kernels:[]},{label:ko,kernels:["clear"]},{label:yr,kernels:[]},{label:Co,kernels:["resolve"]},{label:Fo,kernels:["temporal"]},{label:Po,kernels:["bilateral"]},{label:Tr,kernels:[]}],ps={generate:"tracing",screen:"tracing",clearTracing:"clearTracing",scene:"pending",clear:"clear",resolve:"resolve",temporal:"resolve",bilateral:"resolve"},jl=["opaque"],Xl=["opaque","front"],gs=(e,t,r,o)=>{let i=e==="opaque"?t:r;return o[e==="opaque"?0:1]||i[0]!==1||i[1]!==1},Hr=[0,0];function Zl(e,t,r){for(let o of r){let{lists:i}=o==="opaque"?t.grids:t.front.grids;for(let s of i)Te(t.device,e,s)}}var Ql=[];function Jl(e,t,r,o,i){let s=Ql,a=0,l=t.closureSides?.sides;if(o&&l&&i)for(let n=0;n<l.length;n++){let h=l[n];if(r[n]&&va(t.device,e,o.surfaces,o.tiles,h.closure,h.flags,h.flagsView,h.lobesView)){for(let f of h.grids.lists)Te(t.device,e,f);Te(t.device,e,h.marked),s[a++]=n}}return s.length!==a&&(s.length=a),s}var fs=new WeakMap,rr=M([]);function Br(e,t){let r=t.closureNormals[e.closure-1],o=e.grids,i=fs.get(e);return(!i||i.normals!==r||i.side.pixels.lobes!==e.lobesView||i.side.grids!==o)&&(i={normals:r,side:{grids:o,pixels:{flags:e.flagsView,normals:r,lobes:e.lobesView}}},fs.set(e,i)),i.side}function ws(e,t,r,o,i,s){i.meshRays&&(ds(e,o.compact,t.meshCompact[r],s?.[0],i.pending),ds(e,o.trace,t.meshTrace[r],s?.[1],i.meshRays))}function ds(e,t,r,o,i){e.setPipeline(t.pipeline),e.setBindGroup(0,r),e.setBindGroup(qe,t.group),e.setBindGroup(Ke,o??t.list),e.dispatchWorkgroupsIndirect(i,0)}function us(e,t,r,o,i,s){let{reflection:a,inputs:l,lit:n}=t,h=s==="opaque"?a.grids:s.grids;e.setBindGroup(L.group,o.groups.maskedScene),e.setPipeline(r.mark()),e.setBindGroup(0,i.hits),e.dispatchWorkgroupsIndirect(h.triangleRays,0);let f=[r.hit(),r.answer()],c=r.lit,d=n&&c&&l.rays?ts(n,a,l,l.rays,s,o.groups,t.grid):void 0;for(let p=1;p<t.block[0]*t.block[1];p++)e.setBindGroup(ce.group,ns(a.device,p)),Vr(e,o,i.own.hits,i.own.answer,h.pending,f),n&&c&&d&&rs(e,n,d,t.depthGroup,c)}function ec(e,t,r){let{own:o,traced:i,reflection:s}=t;if(!o||!i)return;tc(e,t);let a=e.beginComputePass({label:r});a.setBindGroup(b,t.depthGroup),us(a,t,o,i,i.groups,"opaque");for(let l of t.past){let n=i.groups.closures[l];n&&us(a,t,o,i,n,Br(s.closureSides.sides[l],t.inputs))}a.end()}function tc(e,t){let{reflection:r}=t;Te(r.device,e,r.grids.pending);for(let o of t.past)Te(r.device,e,r.closureSides.sides[o].grids.pending)}function Vr(e,t,r,o,i,s=[t.stage.hit(),t.stage.pipeline()]){e.setPipeline(s[0]),e.setBindGroup(0,r),e.setBindGroup(L.group,t.groups.maskedScene),e.dispatchWorkgroupsIndirect(i,0),e.setPipeline(s[1]),e.setBindGroup(0,o),e.setBindGroup(L.group,t.groups.scene),e.dispatchWorkgroupsIndirect(i,0)}var rc=M({}),Dr=M({});function oc(e,t,r,o,i){return Dr.stage=o,Dr.groups=ls(e,t,r,o.light,o.lit,i),Dr}function ic(e,t){let{lit:r,reflection:o,inputs:i}=t;if(!r||!t.traced)return;let{past:s}=t;for(let a=0;a<s.length;a++)rr[a]=Br(o.closureSides.sides[s[a]],i);rr.length!==s.length&&(rr.length=s.length),Jn(e,o,t.grid,r.vertices,rr)}function ac(e,t,r,o,i){let{reflection:s,stages:a,groups:l,parity:n,meshes:h,traced:f}=t,c=o==="opaque";for(let d of r)d==="clearTracing"&&!gs(o,t.block,t.frontBlock,t.reconstruct)||(d==="screen"&&c&&t.cache?.limits(e,i.tracing),d==="scene"&&c&&h&&ws(e,l.opaque,n,h,s.grids),e.setPipeline(a[o][d]),e.setBindGroup(0,l[o][d][n]),e.dispatchWorkgroupsIndirect(i[ps[d]],0),d==="scene"&&c&&f&&Vr(e,f,f.groups.hits,f.groups.opaque,i.triangleRays))}function nc(e,t,r,o,i){let{reflection:s,inputs:a,lit:l,traced:n}=t,h=i==="opaque",f=h?s.grids:s.front.grids;r===mt&&(e.setPipeline(t.stages[i].classify),e.setBindGroup(0,t.groups[i].classify[t.parity]),dn(t.size,h?t.block:t.frontBlock,Hr),e.dispatchWorkgroups(Hr[0],Hr[1])),r===Be&&h&&l&&n&&a.rays&&Gr(e,l,s,a,a.rays,"opaque",n.groups,t.grid,t.depthGroup),ac(e,t,o,i,f),r===We&&h&&t.cache?.reads(e,f.tracing)}function sc(e,t,r){let o=t.classifier,i=t.closures.tiles,s=kn(t.reflection.device,o.layouts,r,t.inputs.closureNormals[r.closure-1],r.lobesView,i);e.setPipeline(o.mark),e.setBindGroup(0,s.mark),e.dispatchWorkgroupsIndirect(i.args,wa(r.closure)),e.setPipeline(o.list),e.setBindGroup(0,s.list),e.dispatchWorkgroups(Cn(t.grid)),e.setPipeline(o.classify),e.setBindGroup(0,s.classify),e.dispatchWorkgroupsIndirect(r.marked,0)}function lc(e,t,r,o,i){let{reflection:s,stages:a,parity:l,meshes:n,traced:h}=t,f=t.groups.closures[i],{grids:c}=o,d=h?.groups.closures[i];for(let p of r)if(!(p==="clearTracing"&&!gs("opaque",t.block,t.frontBlock,t.reconstruct))){if(p==="screen"&&t.cache?.limits(e,c.tracing),p==="scene"&&n){let w=xn(a.layouts,s.device,c.meshRays);w&&ws(e,f,l,n,c,w)}e.setPipeline(a.opaque[p]),e.setBindGroup(0,f[p][l]),e.dispatchWorkgroupsIndirect(c[ps[p]],0),p==="scene"&&h&&d&&Vr(e,h,d.hits,d.surface,c.triangleRays)}}function cc(e,t,r,o,i){let{reflection:s,inputs:a,lit:l,traced:n}=t,h=s.closureSides.sides[i];r===mt&&sc(e,t,h),r===Be&&l&&n&&a.rays&&Gr(e,l,s,a,a.rays,Br(h,a),n.groups,t.grid,t.depthGroup),lc(e,t,o,h,i),r===We&&t.cache?.reads(e,h.grids.tracing)}function hc(e,t,r,o){if(r===Be&&!(t.lit&&t.traced&&t.inputs.rays))return;if(r===yr){ec(e,t,r);return}let i=e.beginComputePass({label:r});i.setBindGroup(b,t.depthGroup),r===We&&t.inputs.moverRun&&ba(i,t.inputs.moverRun);for(let s of t.sides)nc(i,t,r,o,s);for(let s of t.past)cc(i,t,r,o,s);r===Tr&&(i.setPipeline(t.stages.keepDepth),i.setBindGroup(0,t.groups.keepDepth),i.dispatchWorkgroups(_(t.size[0],m),_(t.size[1],m))),i.end()}function fc(e,t){let r=t.closures?t.reflection.closureSides?.sides:void 0;for(let o=0;r&&o<r.length;o++){let i=r[o];t.past.includes(o)?i.written=!0:i.written||i.copyFirst(e)}}function Es(e,t,r,o,i,s,a,l,n,h,f,c,d,p,w,g,T){let E=rc;E.reflection=t,E.stages=r,E.inputs=o,E.depthGroup=i,E.size=s,E.block=a,E.frontBlock=l,E.grid=n,E.reconstruct=h,E.meshes=p,E.cache=w,E.lit=g,E.closures=T,E.groups=cs(t,r,r.layouts,o),E.traced=c&&o.rays?oc(t,o,o.rays,c,n):void 0,E.own=d,t.trace.parity^=1,E.parity=t.trace.parity,E.sides=f?Xl:jl,Zl(e,t,E.sides),E.classifier=T&&t.closureSides?.sides.length?An(t.device,r.group):void 0,E.past=Jl(e,t,E.groups.closures,T,E.classifier),ic(e,E);for(let{label:G,kernels:mr}of Kl)hc(e,E,G,mr);fc(e,E)}var vs=e=>X(async(t,r)=>{let o,i=await ao(t,async()=>{let a=Bi(t,ca)?"native":"polyfill",l="Trillion3D reflection trace (subgroups of 32 "+a+")",n=t.createShaderModule({label:l,code:Fe(e,!1,a,r,void 0,void 0,void 0,dt(t.features))}),h=N(t),f=Ei(t,e,r),c=await Ai(n);if(c.length){o=`${l}: ${c.map(p=>p.message).join(`
|
|
1575
|
+
`)}`;return}return{...await ms(t,{trace:n},h,f),light:r}});if(!i.value)throw new Error(`WEBGPU_REFLECTIONS_UNAVAILABLE: ${o??i.refused??"the device made no kernel"}`);return bn(t,i.value.layouts,r),Ta(t),i.value}),dc=vs(!0),uc=vs(!1),mc=(e,t=!1,r=se)=>(t?dc:uc)(e,r),zr=(e,t,r=Ne(e,t))=>mc(t,e.setup.reflectionStatistics,r);async function pc(e,t){e.vis.reflectionPipelines=await zr(e,t)}var ys="Trillion3D reflection trace kernels",$r=new WeakSet,ir=new WeakMap,gc=(e,t)=>ir.get(e)===t,or=new WeakMap,Ts="reflection-kernels-refused";function Rs(e,t){let{vis:r}=e;if(r.reflectionPipelines||$r.has(r)||!Zi(e))return;let o=Ne(e,t);if(gc(r,o))return;$r.add(r);let i=gr(t);wr(t,zr(e,t,o),"whileLoading",ys,s=>{ir.delete(r),r.reflectionPipelines??=s,i&&e.run.gate.resourcesChanged(pr.programLanded)},wc(e,o))}function wc(e,t){let{vis:r}=e,o=or.get(r)??0;return i=>{$r.delete(r),(or.get(r)??0)===o&&(ir.set(r,t),e.diag.diagnosticFailure(Ts,i))}}var Qe=new WeakMap;function bs(e){ir.delete(e),Qe.delete(e),or.set(e,(or.get(e)??0)+1)}function Ec(e,t){let{vis:r}=e,o=Ne(e,t);if(!r.reflectionPipelines)return;if(r.reflectionPipelines.light===o)return void Qe.delete(r);if(Qe.get(r)===o)return;Qe.set(r,o);let i=gr(t);wr(t,zr(e,t,o),"whileLoading",ys,s=>{Qe.get(r)===o&&(r.reflectionPipelines=s,i&&e.run.gate.resourcesChanged(pr.programLanded))},s=>e.diag.diagnosticFailure(Ts,s))}var vc={opaque:0,translucent:1},yc=`fn rttSampleRefraction(dir:vec3f,normal:vec3f,eta:f32,pick:f32,outDir:ptr<function,vec3f>,fresnel:ptr<function,f32>)->bool{
|
|
1576
|
+
let c=abs(dot(dir,normal));
|
|
1577
|
+
let g2=eta*eta-1.0+c*c;
|
|
1578
|
+
if(g2>=0.0){
|
|
1579
|
+
let g=sqrt(g2);
|
|
1580
|
+
let a=(g-c)/(g+c);
|
|
1581
|
+
let b=(c*(g+c)-1.0)/(c*(g-c)+1.0);
|
|
1582
|
+
let fr=0.5*a*a*(1.0+b*b);
|
|
1583
|
+
if(pick>=fr){
|
|
1584
|
+
*fresnel=1.0-fr;
|
|
1585
|
+
*outDir=normalize(dir+normal*(c-g));
|
|
1586
|
+
return true;
|
|
1587
|
+
}
|
|
1588
|
+
*fresnel=fr;
|
|
1589
|
+
}else{
|
|
1590
|
+
*fresnel=1.0;
|
|
1591
|
+
}
|
|
1592
|
+
*outDir=dir+(2.0*c)*normal;
|
|
1593
|
+
return false;
|
|
1594
|
+
}`,_s=v("TRACED_PATH_WGSL",[mo,ut,go,v("RTT_REFRACTION_WGSL",[],yc)],`const RTT_OFFSET:f32=${Do};
|
|
1595
|
+
const RTT_BLEND_OPAQUE:u32=${vc.opaque}u;
|
|
1596
|
+
|
|
1597
|
+
struct RttMaterial{specular:vec3f,roughness:f32,diffuse:vec3f,ior:f32,through:vec3f,opacity:f32,emissive:vec3f,blend:u32,holdout:bool,}
|
|
1598
|
+
struct RttSurface{normal:vec3f,geoNormal:vec3f,material:RttMaterial,}
|
|
1599
|
+
|
|
1600
|
+
struct RttResult{radiance:vec3f,throughput:vec3f,background:vec2f,distance:f32,hit:bool,}
|
|
1601
|
+
struct RttRay{origin:vec3f,dir:vec3f,tMin:f32,tMax:f32,}
|
|
1602
|
+
fn rttAny(v:vec3f,limit:f32)->bool{return any(v>vec3f(limit));}
|
|
1603
|
+
fn rttSegment(through:vec3f,coverage:f32)->vec3f{return vec3f(1.0-coverage)+through*coverage;}
|
|
1604
|
+
fn rttTracePath(first:RttRay)->RttResult{
|
|
1605
|
+
var result:RttResult;
|
|
1606
|
+
result.radiance=vec3f(0.0);
|
|
1607
|
+
result.hit=false;
|
|
1608
|
+
result.distance=0.0;
|
|
1609
|
+
var primaryThroughput=vec3f(1.0);
|
|
1610
|
+
var background=0.0;
|
|
1611
|
+
var locked=false;
|
|
1612
|
+
var primaryBent=false;
|
|
1613
|
+
var secondaryBent=false;
|
|
1614
|
+
var primaryOrigin=first.origin;
|
|
1615
|
+
var primaryDir=first.dir;
|
|
1616
|
+
var primaryFar=first.tMax;
|
|
1617
|
+
var brightest=-1.0;
|
|
1618
|
+
let eye=first.origin;
|
|
1619
|
+
for(var p=0;p<RTT_MAX_PRIMARY;p++){
|
|
1620
|
+
var secondary=primaryThroughput;
|
|
1621
|
+
var pathRoughness=0.0;
|
|
1622
|
+
var pathLuminance=0.0;
|
|
1623
|
+
var pathT=length(primaryOrigin-eye);
|
|
1624
|
+
var ray=RttRay(primaryOrigin,primaryDir,select(0.0005,0.0,primaryBent),select(primaryFar,RTT_NEAR_MAX,primaryBent));
|
|
1625
|
+
secondaryBent=false;
|
|
1626
|
+
for(var s=0;s<RTT_MAX_SECONDARY+1;s++){
|
|
1627
|
+
let bent=select(secondaryBent,primaryBent,s==0);
|
|
1628
|
+
let hit=rttScene(ray.origin,ray.dir,ray.tMin,ray.tMax,s==0&&!bent,!bent);
|
|
1629
|
+
if(hit.hit&&(hit.frontFace||hit.twoSided)){
|
|
1630
|
+
result.hit=true;
|
|
1631
|
+
pathT+=hit.distance;
|
|
1632
|
+
let at=ray.origin+ray.dir*hit.distance;
|
|
1633
|
+
let surf=rttSurface(hit,ray.dir);
|
|
1634
|
+
var m=surf.material;
|
|
1635
|
+
if(!RTT_REFRACTION){m.ior=1.0;}
|
|
1636
|
+
let translucent=m.blend!=RTT_BLEND_OPAQUE;
|
|
1637
|
+
var coverage=select(m.opacity,1.0,m.blend==RTT_BLEND_OPAQUE);
|
|
1638
|
+
let refractive=m.ior>1.0;
|
|
1639
|
+
pathRoughness=1.0-(1.0-pathRoughness)*(1.0-m.roughness);
|
|
1640
|
+
var reflectAlpha=0.0;
|
|
1641
|
+
if(s<RTT_MAX_SECONDARY){reflectAlpha=reflectionTraceShare(pathRoughness*pathRoughness,0u);}
|
|
1642
|
+
var light=rttHitLight(hit,ray.origin,ray.dir,surf,reflectAlpha)+m.emissive;
|
|
1643
|
+
light=coverage*secondary*light;
|
|
1644
|
+
if(s!=0){pathLuminance+=dot(light,vec3f(0.2126,0.7152,0.0722));}
|
|
1645
|
+
if(translucent&&s==0&&!locked){
|
|
1646
|
+
var add=0.0;
|
|
1647
|
+
if(m.holdout){
|
|
1648
|
+
light=vec3f(0.0);
|
|
1649
|
+
reflectAlpha=0.0;
|
|
1650
|
+
if(refractive){m.through=vec3f(0.0);coverage=1.0;}
|
|
1651
|
+
add=m.through.x*coverage;
|
|
1652
|
+
}
|
|
1653
|
+
background+=dot(secondary,vec3f(1.0/3.0))*add;
|
|
1654
|
+
if(refractive){locked=true;}
|
|
1655
|
+
}
|
|
1656
|
+
result.radiance+=light;
|
|
1657
|
+
var reflection=vec3f(0.0);
|
|
1658
|
+
var h=surf.normal;
|
|
1659
|
+
if(reflectAlpha>0.0){reflection=secondary*reflectAlpha*coverage*m.specular;}
|
|
1660
|
+
if(translucent){secondary*=rttSegment(m.through,coverage);}else{secondary=reflection;}
|
|
1661
|
+
var sampleReflection=rttAny(reflection,RTT_THRESHOLD);
|
|
1662
|
+
if(!sampleReflection){reflection=vec3f(0.0);}
|
|
1663
|
+
if(m.roughness>0.0&&(sampleReflection||(m.ior>1.0&&rttAny(secondary,RTT_THRESHOLD)))){
|
|
1664
|
+
var e=rttRandom2();
|
|
1665
|
+
e.y*=1.0-0.1;
|
|
1666
|
+
let basis=frameAround(surf.normal);
|
|
1667
|
+
let tangentV=vec3f(dot(basis.x,-ray.dir),dot(basis.y,-ray.dir),dot(basis.z,-ray.dir));
|
|
1668
|
+
let g=visibleGgxHalf(e,vec2f(m.roughness*m.roughness),tangentV);
|
|
1669
|
+
h=basis.x*g.x+basis.y*g.y+basis.z*g.z;
|
|
1670
|
+
}
|
|
1671
|
+
let normalOut=select(-surf.geoNormal,surf.geoNormal,hit.frontFace);
|
|
1672
|
+
if(translucent&&rttAny(secondary,RTT_THRESHOLD)){
|
|
1673
|
+
if(m.ior>1.0){
|
|
1674
|
+
if(s==0){primaryBent=true;}else{secondaryBent=true;}
|
|
1675
|
+
var refracted=vec3f(0.0);
|
|
1676
|
+
var fresnel=0.0;
|
|
1677
|
+
_=rttSampleRefraction(ray.dir,h,m.ior,1.0,&refracted,&fresnel);
|
|
1678
|
+
if(s==0){
|
|
1679
|
+
primaryOrigin=at-RTT_OFFSET*normalOut;
|
|
1680
|
+
primaryDir=refracted;
|
|
1681
|
+
}else{
|
|
1682
|
+
var pickRefraction=true;
|
|
1683
|
+
if(sampleReflection&&RTT_SAMPLE_REFLECTION_IN_REFLECTIONS){
|
|
1684
|
+
let wr=luminance(secondary)*fresnel;
|
|
1685
|
+
let wf=luminance(reflection)*(1.0-fresnel);
|
|
1686
|
+
pickRefraction=rttRandom1()<wr/max(wr+wf,1e-5);
|
|
1687
|
+
}
|
|
1688
|
+
if(pickRefraction){
|
|
1689
|
+
ray.origin=at-RTT_OFFSET*normalOut;
|
|
1690
|
+
ray.dir=refracted;
|
|
1691
|
+
ray.tMin=0.0;
|
|
1692
|
+
ray.tMax=RTT_NEAR_MAX;
|
|
1693
|
+
sampleReflection=false;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
}else{
|
|
1697
|
+
if(s==0){
|
|
1698
|
+
primaryOrigin=at;
|
|
1699
|
+
primaryDir=ray.dir;
|
|
1700
|
+
if(bent){primaryOrigin+=RTT_OFFSET*primaryDir;}else{primaryFar-=hit.distance;}
|
|
1701
|
+
}else{
|
|
1702
|
+
var pickRefraction=true;
|
|
1703
|
+
if(sampleReflection&&RTT_SAMPLE_REFLECTION_IN_REFLECTIONS){
|
|
1704
|
+
let wr=luminance(secondary);
|
|
1705
|
+
let wf=luminance(reflection);
|
|
1706
|
+
pickRefraction=rttRandom1()<wr/max(wr+wf,1e-5);
|
|
1707
|
+
}
|
|
1708
|
+
if(pickRefraction){
|
|
1709
|
+
ray.origin=at+RTT_OFFSET*ray.dir;
|
|
1710
|
+
ray.tMin=0.0;
|
|
1711
|
+
ray.tMax=RTT_NEAR_MAX;
|
|
1712
|
+
sampleReflection=false;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
if(s==0){
|
|
1718
|
+
if(translucent){primaryThroughput=secondary;}
|
|
1719
|
+
else{primaryThroughput=vec3f(0.0);p=RTT_MAX_PRIMARY-1;}
|
|
1720
|
+
}
|
|
1721
|
+
if(sampleReflection){
|
|
1722
|
+
secondary=reflection;
|
|
1723
|
+
ray.dir=reflect(ray.dir,h);
|
|
1724
|
+
ray.tMax=RTT_NEAR_MAX;
|
|
1725
|
+
if(s==0){
|
|
1726
|
+
ray.origin=at+saturate(dot(normalOut,ray.dir))*RTT_START_NORMAL_BIAS*normalOut;
|
|
1727
|
+
ray.tMin=RTT_START_BIAS;
|
|
1728
|
+
}else{
|
|
1729
|
+
ray.origin=at+RTT_OFFSET*normalOut;
|
|
1730
|
+
ray.tMin=0.0;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
if((s==0&&!sampleReflection)||!rttAny(secondary,RTT_THRESHOLD)){break;}
|
|
1734
|
+
}else if(hit.hit){
|
|
1735
|
+
let surf=rttSurface(hit,ray.dir);
|
|
1736
|
+
var m=surf.material;
|
|
1737
|
+
if(!RTT_REFRACTION){m.ior=1.0;}
|
|
1738
|
+
let at=ray.origin+ray.dir*hit.distance;
|
|
1739
|
+
if(m.blend!=RTT_BLEND_OPAQUE){
|
|
1740
|
+
var refracted=true;
|
|
1741
|
+
if(m.ior>1.0){
|
|
1742
|
+
if(s==0){primaryBent=true;}else{secondaryBent=true;}
|
|
1743
|
+
var dir=vec3f(0.0);
|
|
1744
|
+
var fresnel=0.0;
|
|
1745
|
+
refracted=rttSampleRefraction(ray.dir,surf.normal,1.0/m.ior,1.0,&dir,&fresnel);
|
|
1746
|
+
ray.origin=at+select(-RTT_OFFSET,RTT_OFFSET,refracted)*surf.geoNormal;
|
|
1747
|
+
ray.dir=dir;
|
|
1748
|
+
}else{
|
|
1749
|
+
ray.origin=at+RTT_OFFSET*ray.dir;
|
|
1750
|
+
}
|
|
1751
|
+
ray.tMin=0.0;
|
|
1752
|
+
ray.tMax=RTT_NEAR_MAX;
|
|
1753
|
+
if(s==0){
|
|
1754
|
+
primaryOrigin=ray.origin;
|
|
1755
|
+
primaryDir=ray.dir;
|
|
1756
|
+
if(refracted){p--;}
|
|
1757
|
+
break;
|
|
1758
|
+
}
|
|
1759
|
+
if(refracted){s--;}
|
|
1760
|
+
}else{
|
|
1761
|
+
if(s==0){
|
|
1762
|
+
result.hit=true;
|
|
1763
|
+
primaryThroughput=vec3f(0.0);
|
|
1764
|
+
p=RTT_MAX_PRIMARY-1;
|
|
1765
|
+
}
|
|
1766
|
+
break;
|
|
1767
|
+
}
|
|
1768
|
+
}else{
|
|
1769
|
+
if(s==0){
|
|
1770
|
+
if(primaryBent){
|
|
1771
|
+
result.radiance+=secondary*rttSky(ray.dir);
|
|
1772
|
+
primaryThroughput=vec3f(0.0);
|
|
1773
|
+
}
|
|
1774
|
+
p=RTT_MAX_PRIMARY-1;
|
|
1775
|
+
}else{
|
|
1776
|
+
let sky=secondary*rttSky(ray.dir);
|
|
1777
|
+
pathLuminance+=dot(sky,vec3f(0.2126,0.7152,0.0722));
|
|
1778
|
+
result.radiance+=sky;
|
|
1779
|
+
pathT=3.0e38;
|
|
1780
|
+
}
|
|
1781
|
+
break;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
if(pathLuminance>brightest){
|
|
1785
|
+
brightest=pathLuminance;
|
|
1786
|
+
result.distance=pathT;
|
|
1787
|
+
}
|
|
1788
|
+
if(!rttAny(primaryThroughput,RTT_THRESHOLD)){break;}
|
|
1789
|
+
}
|
|
1790
|
+
result.throughput=primaryThroughput;
|
|
1791
|
+
result.background=vec2f(background,select(0.0,dot(primaryThroughput,vec3f(1.0/3.0)),!locked));
|
|
1792
|
+
return result;
|
|
1793
|
+
}`);var ar="rgba16float",nr="rgba16float",sr="rgba16float",Je=to("RttParams",[["size","vec4u"],["events","vec4u"],["limits","vec4f"],["history","vec4f"]]),me={refraction:1,sampleReflection:2,forceOpaque:4},H={params:0,radiance:2,throughput:3,background:4},ne=H,Yr=`${Je.wgsl}
|
|
1794
|
+
@group(0) @binding(${ne.params}) var<uniform> rtt:RttParams;`,lr="tracedTranslucencyTrace",Tc=8,xs=(e=se)=>[we(ne.params),D(ne.radiance,ar),D(ne.throughput,nr),D(ne.background,sr),...ci(),...ni(je,e),De(ae.lights,"read-only-storage"),...Ot(ae,!0)],Ss=()=>di(fe.first),Rc=v("RTT_SETTINGS_WGSL",[],`var<private> RTT_MAX_PRIMARY:i32;
|
|
1795
|
+
var<private> RTT_MAX_SECONDARY:i32;
|
|
1796
|
+
var<private> RTT_THRESHOLD:f32;
|
|
1797
|
+
var<private> RTT_NEAR_MAX:f32;
|
|
1798
|
+
var<private> RTT_START_BIAS:f32;
|
|
1799
|
+
var<private> RTT_START_NORMAL_BIAS:f32;
|
|
1800
|
+
var<private> RTT_REFRACTION:bool;
|
|
1801
|
+
var<private> RTT_SAMPLE_REFLECTION_IN_REFLECTIONS:bool;
|
|
1802
|
+
var<private> rttSeed:u32;
|
|
1803
|
+
var<private> rttCoord:vec2u;`),bc=v("RTT_RANDOM_WGSL",[],`fn rttNext()->u32{
|
|
1804
|
+
rttSeed=rttSeed*747796405u+2891336453u;
|
|
1805
|
+
let word=((rttSeed>>((rttSeed>>28u)+4u))^rttSeed)*277803737u;
|
|
1806
|
+
return (word>>22u)^word;
|
|
1807
|
+
}
|
|
1808
|
+
fn rttRandom1()->f32{return f32(rttNext()>>8u)*(1.0/16777216.0);}
|
|
1809
|
+
fn rttRandom2()->vec2f{let a=rttRandom1();return vec2f(a,rttRandom1());}`),_c=v("RTT_HOOKS_WGSL",[],`fn rttScene(origin:vec3f,dir:vec3f,tMin:f32,tMax:f32,onlyTranslucent:bool,cullBack:bool)->StHit{
|
|
1810
|
+
let flags=ST_MEET_TRANSLUCENT|select(0u,ST_CULL_BACK,cullBack)|select(0u,ST_ONLY_TRANSLUCENT,onlyTranslucent)|select(0u,ST_FORCE_OPAQUE,(rtt.events.z&${me.forceOpaque}u)!=0u);
|
|
1811
|
+
return stTrace(StRay(origin-view.display.yzw,dir,tMin,tMax,flags));
|
|
1812
|
+
}
|
|
1813
|
+
fn rttSurface(hit:StHit,dir:vec3f)->RttSurface{
|
|
1814
|
+
var s:RttSurface;
|
|
1815
|
+
s.geoNormal=select(-hit.normal,hit.normal,dot(hit.normal,dir)<0.0);
|
|
1816
|
+
s.normal=s.geoNormal;
|
|
1817
|
+
s.material=rttMaterialOf(hit.placement,hit.record);
|
|
1818
|
+
return s;
|
|
1819
|
+
}
|
|
1820
|
+
fn rttHitLight(hit:StHit,origin:vec3f,dir:vec3f,surf:RttSurface,reflectionAlpha:f32)->vec3f{
|
|
1821
|
+
var light=tracedHitLight(hit,origin,dir,${Tc}.0,reflectionView.hardware.w,0.0,rttCoord);
|
|
1822
|
+
if(surf.material.blend!=RTT_BLEND_OPAQUE){light+=surf.material.diffuse*skyIrradiance(surf.normal)/PI;}
|
|
1823
|
+
return light;
|
|
1824
|
+
}
|
|
1825
|
+
fn rttSky(dir:vec3f)->vec3f{return skyRadiance(dir);}`),xc=v("RTT_ENTRY_WGSL",[],`@group(0) @binding(${ae.lights}) var<storage,read> directLights:DirectLights;
|
|
1826
|
+
@group(0) @binding(${ne.radiance}) var rttRadiance:texture_storage_2d<${ar},write>;
|
|
1827
|
+
@group(0) @binding(${ne.throughput}) var rttThroughput:texture_storage_2d<${nr},write>;
|
|
1828
|
+
@group(0) @binding(${ne.background}) var rttBackground:texture_storage_2d<${sr},write>;
|
|
1829
|
+
@compute @workgroup_size(8,8,1)
|
|
1830
|
+
fn ${lr}(@builtin(global_invocation_id) id:vec3u){
|
|
1831
|
+
if(any(id.xy>=rtt.size.xy)){return;}
|
|
1832
|
+
RTT_MAX_PRIMARY=i32(rtt.events.x);
|
|
1833
|
+
RTT_MAX_SECONDARY=i32(rtt.events.y);
|
|
1834
|
+
RTT_REFRACTION=(rtt.events.z&${me.refraction}u)!=0u;
|
|
1835
|
+
RTT_SAMPLE_REFLECTION_IN_REFLECTIONS=(rtt.events.z&${me.sampleReflection}u)!=0u;
|
|
1836
|
+
RTT_THRESHOLD=rtt.limits.x;
|
|
1837
|
+
RTT_NEAR_MAX=reflectionView.march.w;
|
|
1838
|
+
RTT_START_BIAS=reflectionView.hardware.x;
|
|
1839
|
+
RTT_START_NORMAL_BIAS=reflectionView.hardware.y;
|
|
1840
|
+
|
|
1841
|
+
let block=rtt.size.z;
|
|
1842
|
+
var pixel=id.xy*block;
|
|
1843
|
+
pixel+=vec2u(rtt.size.w%block,(rtt.size.w/block)%block);
|
|
1844
|
+
pixel=min(pixel,vec2u(view.viewport.xy)-vec2u(1u));
|
|
1845
|
+
rttCoord=pixel;
|
|
1846
|
+
rttSeed=(pixel.x*1973u+pixel.y*9277u+rtt.size.w*26699u)|1u;
|
|
1847
|
+
var radiance=vec3f(0.0);
|
|
1848
|
+
var throughput=vec3f(1.0);
|
|
1849
|
+
var background=vec2f(0.0);
|
|
1850
|
+
var distance=0.0;
|
|
1851
|
+
let cell=vec2i(pixel);
|
|
1852
|
+
let frontZ=reflectionFrontDepth(cell);
|
|
1853
|
+
let opaqueZ=hizOpaqueDepth(cell);
|
|
1854
|
+
|
|
1855
|
+
if(frontZ!=opaqueZ){
|
|
1856
|
+
let centre=vec2f(pixel)+vec2f(0.5);
|
|
1857
|
+
let eye=view.display.yzw;
|
|
1858
|
+
let front=worldAt(centre,frontZ);
|
|
1859
|
+
let opaque=worldAt(centre,opaqueZ);
|
|
1860
|
+
let dir=normalize(front-eye);
|
|
1861
|
+
let result=rttTracePath(RttRay(eye,dir,0.0,dot(opaque-eye,dir)-0.001));
|
|
1862
|
+
radiance=makeFinite3(result.radiance*rtt.limits.z);
|
|
1863
|
+
|
|
1864
|
+
radiance=spRayFogged(radiance,eye,dir,length(front-eye),result.hit);
|
|
1865
|
+
let most=max(radiance.x,max(radiance.y,radiance.z));
|
|
1866
|
+
if(most>rtt.limits.y){radiance*=rtt.limits.y/most;}
|
|
1867
|
+
throughput=makeFinite3(abs(result.throughput));
|
|
1868
|
+
background=result.background;
|
|
1869
|
+
distance=select(0.0,clamp(result.distance,0.001,65504.0),result.hit);
|
|
1870
|
+
}
|
|
1871
|
+
textureStore(rttRadiance,id.xy,vec4f(radiance,distance));
|
|
1872
|
+
textureStore(rttThroughput,id.xy,vec4f(throughput,0.0));
|
|
1873
|
+
textureStore(rttBackground,id.xy,vec4f(background,0.0,0.0));
|
|
1874
|
+
}`),Ls=(e=se,t=oe)=>W(Yr,[Rc,bc,_c,xc,_e(b),bt(b),te(b),Rt,_o(ei),ii,ve,Q,oi,tn(ae),rn(je,fe,e,t),$t,_s,Ma,hi]);var cr="rgba16float",tt="rgba32float",rt="rg32float",pe="rgba16float",qr={params:H.params,radiance:H.radiance,throughput:H.throughput,background:H.background,resolved:5,history:6,past:7,normals:8,historyOut:9,pastOut:10,finalRadiance:11,finalThroughput:12},y=qr,Pe="tracedTranslucencyResolve",Ge="tracedTranslucencyTemporal",ot="tracedTranslucencySpatial",z=e=>Y(e,"unfilterable-float"),et=(e,t)=>D(e,t),Ns={[Pe]:()=>[we(y.params),z(y.radiance),z(y.throughput),z(y.background),et(y.resolved,cr),et(y.finalThroughput,pe)],[Ge]:()=>[we(y.params),z(y.resolved),z(y.history),z(y.past),z(y.normals),et(y.historyOut,tt),et(y.pastOut,rt)],[ot]:()=>[we(y.params),z(y.history),z(y.past),z(y.normals),et(y.finalRadiance,pe)]},Sc="fn rttCovered(cell:vec2i)->bool{return reflectionFrontDepth(cell)!=hizOpaqueDepth(cell);}",Lc=`@group(0) @binding(${y.radiance}) var rttRadiance:texture_2d<f32>;
|
|
1875
|
+
@group(0) @binding(${y.throughput}) var rttThroughput:texture_2d<f32>;
|
|
1876
|
+
@group(0) @binding(${y.background}) var rttBackground:texture_2d<f32>;
|
|
1877
|
+
@group(0) @binding(${y.resolved}) var rttResolved:texture_storage_2d<${cr},write>;
|
|
1878
|
+
@group(0) @binding(${y.finalThroughput}) var rttFinalThroughput:texture_storage_2d<${pe},write>;
|
|
1879
|
+
${Sc}
|
|
1880
|
+
|
|
1881
|
+
struct RttTexel{radiance:vec4f,throughput:vec3f,background:vec2f,}
|
|
1882
|
+
fn rttTexelAt(t:vec2i)->RttTexel{
|
|
1883
|
+
return RttTexel(textureLoad(rttRadiance,t,0),textureLoad(rttThroughput,t,0).rgb,textureLoad(rttBackground,t,0).rg);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
fn rttPickedPixel(t:vec2i)->vec2i{
|
|
1887
|
+
let block=rtt.size.z;
|
|
1888
|
+
var pixel=vec2u(t)*block+vec2u(rtt.size.w%block,(rtt.size.w/block)%block);
|
|
1889
|
+
return vec2i(min(pixel,vec2u(view.viewport.xy)-vec2u(1u)));
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
fn rttResolve(pixel:vec2i,frontZ:f32)->RttTexel{
|
|
1893
|
+
let block=i32(rtt.size.z);
|
|
1894
|
+
let last=vec2i(rtt.size.xy)-vec2i(1);
|
|
1895
|
+
let at=(vec2f(pixel)+vec2f(0.5))/f32(block)-vec2f(0.5);
|
|
1896
|
+
let base=vec2i(floor(at));
|
|
1897
|
+
let f=at-floor(at);
|
|
1898
|
+
let centre=reflectionLinearOfDevice(frontZ);
|
|
1899
|
+
var sum=RttTexel(vec4f(0.0),vec3f(0.0),vec2f(0.0));
|
|
1900
|
+
var total=0.0;
|
|
1901
|
+
for(var k=0;k<4;k++){
|
|
1902
|
+
let o=vec2i(k&1,k>>1);
|
|
1903
|
+
let t=clamp(base+o,vec2i(0),last);
|
|
1904
|
+
let picked=rttPickedPixel(t);
|
|
1905
|
+
if(!rttCovered(picked)){continue;}
|
|
1906
|
+
let texel=rttTexelAt(t);
|
|
1907
|
+
let w=mix(1.0-f.x,f.x,f32(o.x))*mix(1.0-f.y,f.y,f32(o.y))*exp(-abs(reflectionLinearOfDevice(reflectionFrontDepth(picked))-centre)/max(centre*0.01,1.0e-4));
|
|
1908
|
+
sum.radiance+=w*texel.radiance;
|
|
1909
|
+
sum.throughput+=w*texel.throughput;
|
|
1910
|
+
sum.background+=w*texel.background;
|
|
1911
|
+
total+=w;
|
|
1912
|
+
}
|
|
1913
|
+
if(total<1.0e-6){return rttTexelAt(clamp(vec2i(round(at)),vec2i(0),last));}
|
|
1914
|
+
let inv=1.0/total;
|
|
1915
|
+
return RttTexel(sum.radiance*inv,sum.throughput*inv,sum.background*inv);
|
|
1916
|
+
}
|
|
1917
|
+
@compute @workgroup_size(8,8,1)
|
|
1918
|
+
fn ${Pe}(@builtin(global_invocation_id) id:vec3u){
|
|
1919
|
+
if(any(vec2f(id.xy)>=view.viewport.xy)){return;}
|
|
1920
|
+
let pixel=vec2i(id.xy);
|
|
1921
|
+
if(!rttCovered(pixel)){
|
|
1922
|
+
textureStore(rttResolved,pixel,vec4f(0.0,0.0,0.0,-1.0));
|
|
1923
|
+
textureStore(rttFinalThroughput,pixel,vec4f(1.0));
|
|
1924
|
+
return;
|
|
1925
|
+
}
|
|
1926
|
+
let texel=rttResolve(pixel,reflectionFrontDepth(pixel));
|
|
1927
|
+
textureStore(rttResolved,pixel,texel.radiance);
|
|
1928
|
+
|
|
1929
|
+
textureStore(rttFinalThroughput,pixel,vec4f(texel.throughput,select(texel.background.y,1.0,texel.background.y<=0.0&&texel.background.x<=0.0)));
|
|
1930
|
+
}`,Oc=`@group(0) @binding(${y.resolved}) var rttResolved:texture_2d<f32>;
|
|
1931
|
+
@group(0) @binding(${y.history}) var rttHistory:texture_2d<f32>;
|
|
1932
|
+
@group(0) @binding(${y.past}) var rttPast:texture_2d<f32>;
|
|
1933
|
+
@group(0) @binding(${y.normals}) var rttNormals:texture_2d<f32>;
|
|
1934
|
+
@group(0) @binding(${y.historyOut}) var rttHistoryOut:texture_storage_2d<${tt},write>;
|
|
1935
|
+
@group(0) @binding(${y.pastOut}) var rttPastOut:texture_storage_2d<${rt},write>;
|
|
1936
|
+
|
|
1937
|
+
struct RttHistory{radiance:vec3f,moment:f32,count:f32,valid:bool,}
|
|
1938
|
+
/** The history of the point the last image saw at point: the four texels the point lies between, the bilinear weights; surface, whether the point is the pixel's own, of normal N seen from V, whose texels are kept as their front depth agrees with
|
|
1939
|
+
* the depth the point is expected at (within the history's distance threshold, from half to one and a half by noise, raised at grazing angles) \u2014 a hit's point has no such test. */
|
|
1940
|
+
fn rttHistoryOf(point:vec3f,surface:bool,N:vec3f,V:vec3f,noise:f32)->RttHistory{
|
|
1941
|
+
var held=RttHistory(vec3f(0.0),0.0,0.0,false);
|
|
1942
|
+
if(rtt.history.z==0.0){return held;}
|
|
1943
|
+
let clip=reflectionView.radianceViewProj*vec4f(point,1.0);
|
|
1944
|
+
if(clip.w<=0.0){return held;}
|
|
1945
|
+
let size=view.viewport.xy;
|
|
1946
|
+
let screen=ndcToPixel(stillPast(clip),size);
|
|
1947
|
+
if(any(screen<vec2f(0.0))||any(screen>size)){return held;}
|
|
1948
|
+
let at=clamp(screen,vec2f(0.51),size-vec2f(0.51))-vec2f(0.5);
|
|
1949
|
+
let corner=vec2i(floor(at));
|
|
1950
|
+
let f=at-floor(at);
|
|
1951
|
+
let depth=reflectionLinearDepth(clip);
|
|
1952
|
+
var threshold=reflectionView.denoise.z*mix(0.5,1.5,noise);
|
|
1953
|
+
if(surface){threshold/=clamp(dot(V,N),0.1,1.0);}
|
|
1954
|
+
var sum=vec3f(0.0);
|
|
1955
|
+
var moment=0.0;
|
|
1956
|
+
var weights=0.0;
|
|
1957
|
+
var count=0.0;
|
|
1958
|
+
var kept=false;
|
|
1959
|
+
for(var k=0u;k<4u;k++){
|
|
1960
|
+
let o=vec2u(k&1u,k>>1u);
|
|
1961
|
+
let t=corner+vec2i(o);
|
|
1962
|
+
let past=textureLoad(rttPast,t,0).rg;
|
|
1963
|
+
if(!(past.x>0.0)){continue;}
|
|
1964
|
+
if(surface&&abs(past.x-depth)>=depth*threshold){continue;}
|
|
1965
|
+
let h=textureLoad(rttHistory,t,0);
|
|
1966
|
+
let w=mix(1.0-f.x,f.x,f32(o.x))*mix(1.0-f.y,f.y,f32(o.y));
|
|
1967
|
+
kept=kept||w>0.01;
|
|
1968
|
+
sum+=w*reflectionDenoised(h.rgb);
|
|
1969
|
+
moment+=w*past.y;
|
|
1970
|
+
count+=w*h.a;
|
|
1971
|
+
weights+=w;
|
|
1972
|
+
}
|
|
1973
|
+
if(!kept){return held;}
|
|
1974
|
+
return RttHistory(sum/weights,moment/weights,count/weights,true);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
struct RttWindow{centre:vec3f,extent:vec3f,}
|
|
1978
|
+
fn rttWindow(pixel:vec2i,centre:vec3f)->RttWindow{
|
|
1979
|
+
let last=vec2i(view.viewport.xy)-vec2i(1);
|
|
1980
|
+
var sum=centre;
|
|
1981
|
+
var square=centre*centre;
|
|
1982
|
+
var n=1.0;
|
|
1983
|
+
for(var k=0;k<25;k++){
|
|
1984
|
+
let o=vec2i(k%5-2,k/5-2);
|
|
1985
|
+
if((abs(o.x)==2&&abs(o.y)==2)||all(o==vec2i(0))){continue;}
|
|
1986
|
+
let at=pixel+o;
|
|
1987
|
+
if(any(at<vec2i(0))||any(at>last)){continue;}
|
|
1988
|
+
let r=textureLoad(rttResolved,at,0);
|
|
1989
|
+
if(r.a<0.0){continue;}
|
|
1990
|
+
let v=toYcocg(reflectionDenoised(r.rgb));
|
|
1991
|
+
sum+=v;
|
|
1992
|
+
square+=v*v;
|
|
1993
|
+
n+=1.0;
|
|
1994
|
+
}
|
|
1995
|
+
let m=sum/n;
|
|
1996
|
+
return RttWindow(m,reflectionView.denoise.y*sqrt(max(square/n-m*m,vec3f(0.0))));
|
|
1997
|
+
}
|
|
1998
|
+
@compute @workgroup_size(8,8,1)
|
|
1999
|
+
fn ${Ge}(@builtin(global_invocation_id) id:vec3u){
|
|
2000
|
+
if(any(vec2f(id.xy)>=view.viewport.xy)){return;}
|
|
2001
|
+
let pixel=vec2i(id.xy);
|
|
2002
|
+
let resolved=textureLoad(rttResolved,pixel,0);
|
|
2003
|
+
if(resolved.a<0.0){
|
|
2004
|
+
textureStore(rttHistoryOut,pixel,vec4f(0.0));
|
|
2005
|
+
textureStore(rttPastOut,pixel,vec4f(0.0));
|
|
2006
|
+
return;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
let eye=view.display.yzw;
|
|
2010
|
+
let frontZ=reflectionFrontDepth(pixel);
|
|
2011
|
+
let P=worldAt(vec2f(pixel)+vec2f(0.5),frontZ);
|
|
2012
|
+
let V=normalize(eye-P);
|
|
2013
|
+
let normal=textureLoad(rttNormals,pixel,0);
|
|
2014
|
+
let N=normalize(normal.xyz);
|
|
2015
|
+
let rough=normal.a;
|
|
2016
|
+
var lighting=reflectionDenoised(resolved.rgb);
|
|
2017
|
+
var moment=luminance(lighting)*luminance(lighting);
|
|
2018
|
+
var count=0.0;
|
|
2019
|
+
if(rtt.history.z!=0.0&&reflectionDone(REFLECTION_TEMPORAL)){
|
|
2020
|
+
let noise=interleavedGradientNoise(vec2f(pixel),f32(reflectionView.temporal.y));
|
|
2021
|
+
var fromHit=RttHistory(vec3f(0.0),0.0,0.0,false);
|
|
2022
|
+
let s=saturate(1.0-rough);
|
|
2023
|
+
if(s*(sqrt(s)+rough)>0.5){
|
|
2024
|
+
fromHit=rttHistoryOf(select(P,eye-V*resolved.a,resolved.a>0.0),false,N,V,noise);
|
|
2025
|
+
}
|
|
2026
|
+
let fromSurface=rttHistoryOf(P,true,N,V,noise);
|
|
2027
|
+
if(fromSurface.valid||fromHit.valid){
|
|
2028
|
+
let block=rtt.size.z;
|
|
2029
|
+
let reconstructed=block>1u&&any(vec2u(pixel)%block!=vec2u(rtt.size.w%block,(rtt.size.w/block)%block));
|
|
2030
|
+
let window=rttWindow(pixel,toYcocg(lighting));
|
|
2031
|
+
let hitY=toYcocg(fromHit.radiance);
|
|
2032
|
+
let surfaceY=toYcocg(fromSurface.radiance);
|
|
2033
|
+
|
|
2034
|
+
var alpha=0.0;
|
|
2035
|
+
if(fromSurface.valid&&length(window.centre-hitY)>length(window.centre-surfaceY)+0.01/max(view.preExposure.x,REFLECTION_EPSILON)){alpha=0.8;}
|
|
2036
|
+
alpha=select(1.0,alpha,fromHit.valid);
|
|
2037
|
+
let history=mix(hitY,surfaceY,alpha);
|
|
2038
|
+
let extent=window.extent*select(1.0,2.0,reconstructed);
|
|
2039
|
+
let lo=window.centre-extent;
|
|
2040
|
+
let hi=window.centre+extent;
|
|
2041
|
+
let clamped=mix(clamp(hitY,lo,hi),clamp(surfaceY,lo,hi),alpha);
|
|
2042
|
+
let least=vec3f(REFLECTION_CLAMP_FLOOR/max(view.preExposure.x,REFLECTION_EPSILON));
|
|
2043
|
+
let trust=0.75*saturate(1.0-length(abs(clamped-history)/max(extent,least)))+0.25;
|
|
2044
|
+
let held=select(fromHit.count,fromSurface.count,alpha>0.5);
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
count=accumulationCount(held*trust,1.0,reflectionHistoryLaw(rough,block==1u));
|
|
2048
|
+
let fresh=1.0/(count+select(0.0,4.0,reconstructed));
|
|
2049
|
+
moment=mix(mix(fromHit.moment,fromSurface.moment,alpha),moment,fresh);
|
|
2050
|
+
lighting=mix(fromYcocg(clamped),lighting,fresh);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
textureStore(rttHistoryOut,pixel,rttStored(lighting,count));
|
|
2054
|
+
textureStore(rttPastOut,pixel,vec4f(reflectionLinearOfDevice(frontZ),max(makeFinite(moment),0.0),0.0,0.0));
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
fn rttStored(lighting:vec3f,count:f32)->vec4f{
|
|
2060
|
+
return vec4f(reflectionLinearUnder(max(makeFinite3(lighting),vec3f(0.0)),rtt.limits.y),count);
|
|
2061
|
+
}`,Nc=`@group(0) @binding(${y.history}) var rttHistory:texture_2d<f32>;
|
|
2062
|
+
@group(0) @binding(${y.past}) var rttPast:texture_2d<f32>;
|
|
2063
|
+
@group(0) @binding(${y.normals}) var rttNormals:texture_2d<f32>;
|
|
2064
|
+
@group(0) @binding(${y.finalRadiance}) var rttFinalRadiance:texture_storage_2d<${pe},write>;
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
fn rttSpatial(pixel:vec2i,held:vec4f,past:vec2f)->vec3f{
|
|
2069
|
+
let normal=textureLoad(rttNormals,pixel,0);
|
|
2070
|
+
let N=normalize(normal.xyz);
|
|
2071
|
+
let rough=normal.a;
|
|
2072
|
+
let mine=reflectionDenoised(held.rgb);
|
|
2073
|
+
let lum=luminance(mine);
|
|
2074
|
+
let deviation=sqrt(max(past.y-lum*lum,0.0));
|
|
2075
|
+
let noisy=deviation/max(lum,0.1)>0.5;
|
|
2076
|
+
let share=reflectionYoungShare(held.a,reflectionHistoryLaw(rough,rtt.size.z==1u),noisy);
|
|
2077
|
+
let young=share>0.0;
|
|
2078
|
+
|
|
2079
|
+
// saturate(8 r): a transmitted lobe spreads by the indices of refraction of both faces, not by the reflected lobe's 3 r\xB2. A smooth
|
|
2080
|
+
|
|
2081
|
+
let radius=reflectionFilterRadius(reflectionView.spread.y*saturate(rough*8.0),!(rough>0.0),share,held.a);
|
|
2082
|
+
var result=held.rgb;
|
|
2083
|
+
if(reflectionDone(REFLECTION_BILATERAL)&&(noisy||young)&&radius>=1.0){
|
|
2084
|
+
let taps=reflectionFilterTaps(share,held.a);
|
|
2085
|
+
|
|
2086
|
+
let halfAngle=clamp((fastAtan(3.0*rough*rough)+0.01)*mix(1.0,4.0,share),0.01,0.5*PI);
|
|
2087
|
+
|
|
2088
|
+
let reach=select(share*share,1.0,noisy);
|
|
2089
|
+
let size=vec2i(view.viewport.xy);
|
|
2090
|
+
let P=worldAt(vec2f(pixel)+vec2f(0.5),reflectionFrontDepth(pixel));
|
|
2091
|
+
let depth=reflectionLinearOfDevice(reflectionFrontDepth(pixel));
|
|
2092
|
+
let seed=reflectionReuseSeed(pixel%vec2i(2));
|
|
2093
|
+
var sum=weightedTonemap(mine,share);
|
|
2094
|
+
var total=1.0;
|
|
2095
|
+
for(var k=0u;k<taps;k++){
|
|
2096
|
+
let tap=vec2i(vec2f(pixel)+radius*reflectionReuseTap(k,taps,seed)+vec2f(0.5));
|
|
2097
|
+
if(any(tap<vec2i(0))||any(tap>=size)){continue;}
|
|
2098
|
+
let theirPast=textureLoad(rttPast,tap,0).rg;
|
|
2099
|
+
if(!(theirPast.x>0.0)){continue;}
|
|
2100
|
+
let off=abs(dot(worldAt(vec2f(tap)+vec2f(0.5),reflectionFrontDepth(tap))-P,N))/depth;
|
|
2101
|
+
let angle=fastAcos(saturate(dot(N,normalize(textureLoad(rttNormals,tap,0).xyz))));
|
|
2102
|
+
let across=1.0-saturate(angle/halfAngle);
|
|
2103
|
+
let theirs=reflectionDenoised(textureLoad(rttHistory,tap,0).rgb);
|
|
2104
|
+
let near=mix(exp2(-abs(lum-luminance(theirs))/max(deviation,0.001)),1.0,share);
|
|
2105
|
+
let w=edgeWeight(-reflectionView.reach.w,off,across)*near*reach;
|
|
2106
|
+
sum+=w*weightedTonemap(theirs,share);
|
|
2107
|
+
total+=w;
|
|
2108
|
+
}
|
|
2109
|
+
result=reflectionLinearUnder(weightedUntonemap(sum/total,share),rtt.limits.y);
|
|
2110
|
+
}
|
|
2111
|
+
return result;
|
|
2112
|
+
}
|
|
2113
|
+
@compute @workgroup_size(8,8,1)
|
|
2114
|
+
fn ${ot}(@builtin(global_invocation_id) id:vec3u){
|
|
2115
|
+
if(any(vec2f(id.xy)>=view.viewport.xy)){return;}
|
|
2116
|
+
let pixel=vec2i(id.xy);
|
|
2117
|
+
let past=textureLoad(rttPast,pixel,0).rg;
|
|
2118
|
+
if(!(past.x>0.0)){
|
|
2119
|
+
textureStore(rttFinalRadiance,pixel,vec4f(0.0));
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
textureStore(rttFinalRadiance,pixel,vec4f(rttSpatial(pixel,textureLoad(rttHistory,pixel,0),past),0.0));
|
|
2123
|
+
}`,Ur=[_e(b),bt(b),te(b),ti,Rt],Os=[J,R,Yt,Oe,$,ee,Z,ft,Q,ut],Is=e=>{let t={[Pe]:Lc,[Ge]:Oc,[ot]:Nc}[e],r=e===Pe?Ur:e===Ge?[...Ur,...Os]:[...Ur,...Os,$a,Nr,Se,Le,Dt,ve,ct,ht];return W(`${Yr}
|
|
2124
|
+
${t}`,r)};var ge={radiance:0,throughput:1},As=W(`@group(0) @binding(${ge.radiance}) var rttFinalRadiance:texture_2d<f32>;
|
|
2125
|
+
@group(0) @binding(${ge.throughput}) var rttFinalThroughput:texture_2d<f32>;
|
|
2126
|
+
@fragment fn scale(@builtin(position) pixel:vec4f)->@location(0) vec4f{return textureLoad(rttFinalThroughput,vec2i(pixel.xy),0);}
|
|
2127
|
+
@fragment fn add(@builtin(position) pixel:vec4f)->@location(0) vec4f{return vec4f(textureLoad(rttFinalRadiance,vec2i(pixel.xy),0).rgb,0.0);}`,[Lo]);var hr=8,Cs=nt(e=>e.createBindGroupLayout({label:"Trillion3D traced translucency compose",entries:[Y(ge.radiance,"float","2d",GPUShaderStage.FRAGMENT),Y(ge.throughput,"float","2d",GPUShaderStage.FRAGMENT)]})),Ic=nt(e=>{let t=e.createShaderModule({label:"Trillion3D traced translucency compose",code:As}),r=(o,i,s)=>no(e,co(e,t,Cs(e),o,[{format:at,blend:i,...s!==void 0&&{writeMask:s}}],"Trillion3D traced translucency compose"));return[r("scale",{color:Qo.multiply.color,alpha:Zo}),r("add",{color:xr,alpha:xr},Xo)]}),Ac=ie((e,t,r)=>{let o=`Trillion3D traced translucency trace ${t} ${q(r)}`,i=[e.createBindGroupLayout({label:o,entries:xs(t)}),N(e),e.createBindGroupLayout({label:o,entries:Ss()})],s=U(e,o,e.createPipelineLayout({bindGroupLayouts:i}),e.createShaderModule({label:o,code:Ls(t,r)}),[lr]);return{layouts:i,stages:s}}),kc=le(Ac),Cc=nt(e=>[Pe,Ge,ot].map(t=>{let r=`Trillion3D traced translucency ${t}`,o=[e.createBindGroupLayout({label:r,entries:Ns[t]()}),N(e)],i=U(e,r,e.createPipelineLayout({bindGroupLayouts:o}),e.createShaderModule({label:r,code:Is(t)}),[t]);return{entry:t,layouts:o,stages:i}}));function Fc(e,t,r){let o=(s,a,[l,n])=>e.createTexture({label:`Trillion3D traced translucency ${s}`,size:[l,n],format:a,usage:GPUTextureUsage.STORAGE_BINDING|GPUTextureUsage.TEXTURE_BINDING}),i=[_(t[0],r),_(t[1],r)];return{size:[t[0],t[1]],block:r,trace:i,radiance:o("radiance",ar,i),throughput:o("throughput",nr,i),background:o("background",sr,i),resolved:o("resolved",cr,t),history:[o("history 0",tt,t),o("history 1",tt,t)],past:[o("past 0",rt,t),o("past 1",rt,t)],finalRadiance:o("final radiance",pe,t),finalThroughput:o("final throughput",pe,t)}}function jr(e,t){t(e.radiance),t(e.throughput),t(e.background),t(e.resolved),t(e.history[0]),t(e.history[1]),t(e.past[0]),t(e.past[1]),t(e.finalRadiance),t(e.finalThroughput)}var Pc=e=>e.destroy(),Kr=Ii(e=>{let{device:t}=e;e.textures&&jr(e.textures,r=>st(t,r)),e.params&&st(t,e.params)}),Xr=e=>Kr.release(e);function Gc(e,t){let r=Kr.get(e.gpu);return r?.device!==t&&(r?.textures&&jr(r.textures,Pc),r?.params?.destroy(),r={device:t,turn:0,lastFrame:-2,identity:he(),composeIdentity:he(),denoiseGroups:[void 0,void 0],spatialGroups:[void 0,void 0],sceneGroup:la(t)},Kr.set(e.gpu,r)),r}var dr=new Uint32Array(Je.words),ks=new Float32Array(dr.buffer);function Mc(e,t,r,o,i,s){let a=i.gpu.reflection,l=Je.at,{trace:n,block:h}=o;Me(dr,l.size,n[0],n[1],h,ki(i)&65535);let f=(Pi(r)?me.refraction:0)|(r.tracedTranslucencyNestedReflections?me.sampleReflection:0)|(r.tracedTranslucencyAsOpaque?me.forceOpaque:0);Me(dr,l.events,Mi(r),Hi(r),f,0),Me(ks,l.limits,r.tracedTranslucencyThroughputCutoff,r.tracedTranslucencyRayClamp,a.frame.preExposure??1,0),Me(ks,l.history,0,0,s?1:0,0),t.params??=e.createBuffer({label:"Trillion3D traced translucency parameters",size:Je.words*4,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),e.queue.writeBuffer(t.params,0,dr)}function Hc(e,t,r,o,i,s){let a=e.sceneTrace.maskHold.use("translucency reflections",r,kc(t,r),Sa,xa)?.kernel,l=!0;for(let f=0;f<o.length;f++)o[f].stages.swapped(s)||(l=!1);let n=lo(t,i,s);return a?.stages.ready&&l&&n?a:void 0}function Dc(e,t,r,o){let i=e.textures;return i?.size[0]===r[0]&&i.size[1]===r[1]&&i.block===o?i:(i&&jr(i,s=>st(t,s)),e.resolveGroup=void 0,e.denoiseGroups[0]=e.denoiseGroups[1]=void 0,e.spatialGroups[0]=e.spatialGroups[1]=void 0,e.lastFrame=-2,e.textures=Fc(t,r,o))}function Wc(e,t,r,o,i,s){let a=t.textures,l=t.reads.hit,{next:n}=t.identity;return n[0]=r.layouts[0],n[1]=t.params,n[2]=a.radiance,n[3]=a.throughput,n[4]=a.background,n[5]=o.views.nodes,n[6]=o.views.frames,n[7]=o.views.worlds,n[8]=o.views.tree,n[9]=l.tables,n[10]=l.depth,n[11]=l.final,n[12]=l.instances,n[13]=i,n[14]=s.cubemap,n[15]=s.sampler,t.identity.moved()&&(t.traceGroup=e.createBindGroup({label:"Trillion3D traced translucency trace",layout:r.layouts[0],entries:[{binding:H.params,resource:{buffer:t.params}},{binding:H.radiance,resource:a.radiance.createView()},{binding:H.throughput,resource:a.throughput.createView()},{binding:H.background,resource:a.background.createView()},...xe(o.views),...re(je,l),{binding:ae.lights,resource:{buffer:i}},...B(ae,!0,s)]})),t.traceGroup}function Bc(e,t,r,o){let i=t.textures,s=t.turn;if(t.normals!==r&&(t.normals=r,t.denoiseGroups[0]=t.denoiseGroups[1]=void 0,t.spatialGroups[0]=t.spatialGroups[1]=void 0),t.resolveGroup&&t.denoiseGroups[s]&&t.spatialGroups[s])return;let a=qr,l=h=>h.createView(),n={binding:a.params,resource:{buffer:t.params}};t.resolveGroup??=e.createBindGroup({label:"Trillion3D traced translucency resolve",layout:o[0].layouts[0],entries:[n,{binding:a.radiance,resource:l(i.radiance)},{binding:a.throughput,resource:l(i.throughput)},{binding:a.background,resource:l(i.background)},{binding:a.resolved,resource:l(i.resolved)},{binding:a.finalThroughput,resource:l(i.finalThroughput)}]}),t.denoiseGroups[s]??=e.createBindGroup({label:"Trillion3D traced translucency temporal",layout:o[1].layouts[0],entries:[n,{binding:a.resolved,resource:l(i.resolved)},{binding:a.history,resource:l(i.history[s])},{binding:a.past,resource:l(i.past[s])},{binding:a.normals,resource:r},{binding:a.historyOut,resource:l(i.history[1-s])},{binding:a.pastOut,resource:l(i.past[1-s])}]}),t.spatialGroups[s]??=e.createBindGroup({label:"Trillion3D traced translucency spatial",layout:o[2].layouts[0],entries:[n,{binding:a.history,resource:l(i.history[1-s])},{binding:a.past,resource:l(i.past[1-s])},{binding:a.normals,resource:r},{binding:a.finalRadiance,resource:l(i.finalRadiance)}]})}var fr=M({trace:void 0,reflection:void 0,scene:void 0});function Vc(e,t,r,o,i,s){let a=t.textures,l=t.turn,n=e.beginComputePass({label:Go});n.setPipeline(r.stages.pipelineOf(lr)),n.setBindGroup(0,i.trace),n.setBindGroup(1,i.reflection),n.setBindGroup(fe.group,i.scene),n.dispatchWorkgroups(_(a.trace[0],hr),_(a.trace[1],hr)),n.end();let h=e.beginComputePass({label:Mo});for(let f=0;f<o.length;f++){let{entry:c,stages:d}=o[f];h.setPipeline(d.pipelineOf(c)),h.setBindGroup(0,f===0?t.resolveGroup:f===1?t.denoiseGroups[l]:t.spatialGroups[l]),h.setBindGroup(1,i.reflection),h.dispatchWorkgroups(_(s[0],hr),_(s[1],hr))}h.end()}function $c(e,t,r,o,i,s){let a=r.textures,{next:l}=r.composeIdentity;l[0]=a.finalRadiance,l[1]=a.finalThroughput,r.composeIdentity.moved()&&(r.composeGroup=e.createBindGroup({layout:Cs(e),entries:[{binding:ge.radiance,resource:a.finalRadiance.createView()},{binding:ge.throughput,resource:a.finalThroughput.createView()}]}));let n=t.beginRenderPass({label:Ho,colorAttachments:[{view:o,loadOp:"load",storeOp:"store"}]});n.setViewport(0,0,i[0],i[1],0,1),n.setBindGroup(0,r.composeGroup);for(let h of s)n.setPipeline(h.get()),n.draw(3);n.end()}function zc(e,t,r){let o=Ca(e),{gpu:i,vis:s,run:a}=e,l=i.reflection,n=s.gpuHiz?.depth(),h=$i(e),f=La(e.surfaceAtlas?.lighting,a.frame),c=e.lights.buffer,d=i.deferred;if(!o||!l||!n||!h||!f||!c||!d||!i.hdrView||!s.textures||!s.mapsSampler||l.front.drawn!==Yo(a.frame))return!1;let p=Ne(e,t),w=Cc(t),g=Ic(t),T=Hc(f,t,p,w,g,a.gate);if(!T)return!1;let E=Gc(e,t),G=i.targetSize,mr=Dc(E,t,G,Gi(o)),Vs=E.lastFrame===a.frame-1&&!l.frame.historyCut;Mc(t,E,o,mr,e,Vs),E.reads=Na(e,t,E.reads,p),fr.reflection=Bt(l,n,h,ze(e));let $s=Lt(i,d.placeholders);return fr.trace=Wc(t,E,T,f,c,$s),fr.scene=E.sceneGroup(T.layouts[fe.group],f.sceneTrace,fe.first),Bc(t,E,l.front.views.normals,w),Vc(r,E,T,w,fr,G),$c(t,r,E,i.hdrView,G,g),a.gpuDrawCalls+=2,E.turn=1-E.turn,E.lastFrame=a.frame,!0}var Yc=(e,t)=>e.createBindGroupLayout({label:"Trillion3D reflection probe cache",entries:[Y(u.flags,"uint"),Y(u.normals,"unfilterable-float"),Y(u.lobes,"uint"),D(u.rays,Bo,"read-write","2d-array"),De(u.tiles,"read-only-storage"),De(u.lights,"read-only-storage"),D(u.blue,Uo,"read-only"),...Ot(V,!0),D(u.traceOut,Et),...Oi(t)]}),Fs="Trillion3D reflection probe cache",Ps=X((e,t)=>{let r=Yc(e,t),o=U(e,Fs,e.createPipelineLayout({bindGroupLayouts:[r,N(e)]}),e.createShaderModule({label:Fs,code:Ni(t)}),["cacheLimits","cacheReads"],{REFLECTION_LAYER:0});return{layout:r,stages:o,pipeline:i=>o.pipelineOf(i)}});var Zr=new WeakMap,Ms=e=>void Zr.delete(e);function Gs(e,t,r,o){e.setPipeline(r.kernels.pipeline(o)),e.setBindGroup(0,r.group),e.dispatchWorkgroupsIndirect(t,0)}var Uc=e=>({limits:(t,r)=>Gs(t,r,e,"cacheLimits"),reads:(t,r)=>Gs(t,r,e,"cacheReads")});function Hs(e,t,r,o){if(!o.probeCache||!o.enabled)return;let i=e.bounce.probes,s=i?.cache.views,a=e.gpu.viewProbes,l=a?.indirect&&a.resources.params;if(!i||!s||!l)return;let n=Ps(t.device,s.light);if(!n.stages.swapped(e.run.gate))return;let{grids:h,device:f}=t,c=t.trace,d=Zr.get(c);d||Zr.set(c,d={ids:he()});let{ids:p}=d,{next:w}=p,g=0;w[g++]=n.layout,w[g++]=h,w[g++]=r.flags,w[g++]=r.normals,w[g++]=r.lobes,w[g++]=r.lights,w[g++]=r.blue,w[g++]=r.fog.cubemap,w[g++]=r.fog.sampler,w[g++]=l,w[g++]=i.uniform,w[g++]=i.table,w[g++]=s.final,w[g++]=s.raw,w[g++]=s.sky,w.length!==g&&(w.length=g);let T=p.moved();if(!d.group||T){let E=Si.at;d.group=f.createBindGroup({label:"Trillion3D reflection probe cache",layout:n.layout,entries:[...A(u,{flags:r.flags,normals:r.normals,lobes:r.lobes,rays:h.rays,tiles:{buffer:h.tracing},lights:{buffer:r.lights},blue:r.blue,traceOut:h.fresh}),...B(V,!0,r.fog),...A(E,{params:{buffer:l},bounceGrid:{buffer:i.uniform},cacheFinal:s.final,cacheRaw:s.raw,cacheSky:s.sky}),{binding:Li,resource:i.table}]})}return d.kernels=n,d.stage??=Uc(d)}function qc(e,t,r){let o=t.reflection;if(!o)return Xr(t);let{traced:i}=o,s=h=>ho(e,h),a=i.releaseGrids(s);for(let h of i.closureSides?.sides??[])a=h.releaseGrids(s)||a;let l=!!r?.meshes.grid.view&&i.meshes.grid===r.meshes.grid;a=i.releaseMeshes(h=>h.dispose())||a;let n=l?r.releaseGrid():void 0;return n?.dispose(),a=!!n||a,a=o.front.releaseGrids(t)||a,i.trace.groups=i.trace.hardware.groups=void 0,Ms(i.trace),Xr(t)||a}function Ds(e){bs(e.vis);let t=ro(e.context)?void 0:e.bounce.screen;return Ci(e,r=>qc(e.gpu.device,r,t))}var Qr=M({rays:void 0,stage:void 0});function Ws(e,t,r,o){if(!t)return;let i=Fr(r,o),s=t.sceneTrace.maskHold.use("hardware reflections",i,$n(e.device,i),zt,Ye,Ue)?.kernel;if(s?.ready)return Qr.rays=t,Qr.stage=s,Qr}var Kc=e=>e.ready;function Bs(e,t,r,o){let i=Fr(r,o),s=e.sceneTrace.maskHold.use("own rays",i,Bn(t,i),Kc,Ye,Ue)?.kernel;return s?.ready?s:void 0}var ur=[0,0],Xc=[0,0],Jr=[!1,!1],Zc=No("normalRough"),eo=M({surfaces:void 0,tiles:void 0});function Qc(e,t,r,o,i){let{gpu:s,lights:a}=e,l=o.views(),{inputs:n}=t.traced;n.flags=l[Io],n.normals=l[Zc],n.lobes=o.lobesView,n.closureNormals=o.closureNormals,n.lights=a.buffer,n.fog=Lt(s,s.deferred.placeholders),n.field=zi(e);let h=r.marchesField?_a(e):void 0;r.marchesField&&Oa(e);let f=e.views.active===e.views.main?h:void 0;f?.feedback.begin(f.cache,s.targetSize,e.run.gate,e.surfaceAtlas?.lighting?.begunFeedback),n.hit=Ia(e,t.device,i),n.lightPattern=qi(e,"lightPatternBounce")??s.deferred.placeholders.lightPattern,n.lightProfile=ji(e)??Ki(t.device);let c=Ji(t.lit.held,t.frame.image??-1);return n.vectors=c&&ya(e)||t.noVectors,n.layerMotion=Yi(e)??Ui(t.device),n.movers=Ra(e,t.device),qo(t.device),n.blue=Ko(t.device),f}function Jc(e,t){if(!(!(t.closures>1)||Xi(e)<2))return eo.surfaces=t,eo.tiles=Ga(e),eo}var it=M({lit:!1,hardware:void 0,hitRun:void 0,own:void 0});function eh(e,t,r,o){let{reflection:i,stages:s,depth:a,lightView:l,settings:n,sceneRays:h}=t,{traced:f}=i,c=!!h&&jn(i.device,n.hit,o),d=Ws(f,h,s.light,c);f.inputs.rays=d?.rays;let p=Xn(f,n.hit,d?.rays,s.light,c&&d?.rays?Vi(i,a,l,ze(e)):void 0,Fa(e.gpu,i.device),e.lights.store,e.run.frame),w=d&&En(r,n.frontBlock)?Bs(d.rays,i.device,s.light,c):void 0,g=i.frame;return g.sceneTriangles=!!d,g.hitUnlit=c&&!!d&&!p,g.ownRays=!!w,g.sceneTriangles&&i.writeView(g,i.lit.held),it.lit=c,it.hardware=d,it.hitRun=p,it.own=w,it}function th(e,t,r,o){e.set=t,t&&(e.grid[0]=r[0],e.grid[1]=r[1],e.vertices=o)}function rh(e,t,r){if(!r)return;let{reflection:o,stages:i,depth:s,lightView:a,surfaces:l,settings:n}=r,{traced:h}=o;h.litAsk.set=!1;let f=Qc(e,o,n,l,i.light),c=Bt(o,s,a,ze(e)),d=e.gpu.targetSize;ur[0]=n.block,ur[1]=n.blockY;let p=Xc;p[0]=br(d[0],n.block,n.frontBlock[0]),p[1]=br(d[1],n.blockY,n.frontBlock[1]),Jr[0]=n.reconstruction,Jr[1]=n.frontReconstruction;let{lit:w,hardware:g,hitRun:T,own:E}=eh(e,r,ur,p);o.census.clear(t);let G=_n(e,o.device,t,h,i,n,o.frame.viewProjection,h.grids.meshRays);Es(t,h,i,h.inputs,c,d,ur,n.frontBlock,p,Jr,!!o.frame.front,g?.stage,E,G,Hs(e,h,h.inputs,n),T,Jc(e,l)),o.depthImage=o.frame.image??-1,o.census.copy(t,e.run.frame),f?.feedback.end(t,f.cache),th(h.litAsk,w,p,n.hit.vertices)}function oh(e){let t=e.gpu.reflection;if(!t)return;let{traced:r}=t,{litAsk:o}=r,i=o.set?o:void 0;r.peekGrids()?.keepLit(e.run.frame,i),t.front.grids.keepLit(e.run.frame,i);let s=t.closureSides?.sides;if(s)for(let a of s)a.peekGrids()?.keepLit(e.run.frame,i);o.set=!1}var oE={ask:Rs,release:Ds};export{zc as encodeTracedTranslucency,Ec as followReflectionLight,oh as keepReflectionGrids,pc as makeReflectionKernels,oE as passSlot,rh as traceReflections};
|
|
2128
|
+
//# sourceMappingURL=trillion3d-reflectionsCode-3T6W62HT.js.map
|