shaders 3.0.448 → 3.0.450
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/cli.js +2 -2
- package/dist/core/{AngularBlur-xU811GPM.js → AngularBlur-4jt7bNoF.js} +15 -15
- package/dist/core/{Arc-DYvFxtGy.js → Arc-DXIfbBgd.js} +13 -12
- package/dist/core/{Ascii-ChE4BP7J.js → Ascii-GDof03Ca.js} +51 -53
- package/dist/core/{Aurora-BThE6pbb.js → Aurora-CS4vewUW.js} +63 -68
- package/dist/core/{BarShift-DdjkPSk3.js → BarShift-BtnYLQ0B.js} +31 -32
- package/dist/core/{BarnDoors-B_kxVuec.js → BarnDoors-Dw9K-amf.js} +21 -22
- package/dist/core/{Beam-C7zPHuIU.js → Beam-D_cyaMjJ.js} +32 -39
- package/dist/core/{Bend-CFcEjifF.js → Bend-CSs5UIh8.js} +27 -28
- package/dist/core/{Blob-CgUolAhz.js → Blob-h25zA5WH.js} +54 -60
- package/dist/core/{BlockDissolve-CLSxXB4e.js → BlockDissolve-CKN_KvLP.js} +21 -20
- package/dist/core/{BlockNoise-BgEJOicU.js → BlockNoise-DhKyd_F7.js} +16 -14
- package/dist/core/{BlueNoise-BqMtBLxM.js → BlueNoise-Auhzq4x5.js} +12 -10
- package/dist/core/{Blur-Xaa6jVPT.js → Blur-CcxMqYsu.js} +27 -27
- package/dist/core/{Boids-B8QUNxRL.js → Boids-D51U46GF.js} +916 -787
- package/dist/core/{BokehBlur-B5fql96U.js → BokehBlur-Cfaqbh3I.js} +104 -104
- package/dist/core/{BrickPattern-EAD5HD4e.js → BrickPattern-tASwilX0.js} +34 -38
- package/dist/core/{BrightnessContrast-mbv32DkA.js → BrightnessContrast-ZCKqJW7i.js} +9 -10
- package/dist/core/{BrushedMetal-B10fDdGt.js → BrushedMetal-B6gSVB28.js} +81 -84
- package/dist/core/{Bulge-C1Pq4DHk.js → Bulge-dCYtWP4S.js} +19 -19
- package/dist/core/{CRTScreen-Ctx0Mxtb.js → CRTScreen-CVY1lOGL.js} +35 -37
- package/dist/core/{CarbonFiber-DSSARe6R.js → CarbonFiber-Do9EONKv.js} +81 -84
- package/dist/core/{Chalkboard-C7srb54u.js → Chalkboard-0hyyGnYl.js} +59 -61
- package/dist/core/{ChannelBlur-DE3T4-pj.js → ChannelBlur-DcZKCKXi.js} +13 -15
- package/dist/core/{CheckerWipe-Dp49-iaT.js → CheckerWipe-BIE62tJ1.js} +23 -23
- package/dist/core/{Checkerboard-oVWtS0rz.js → Checkerboard-CRnfu63u.js} +31 -31
- package/dist/core/{Chevron-CCD5JTRA.js → Chevron-Ld_v4z9T.js} +20 -20
- package/dist/core/{ChromaFlow-BiE9Mes0.js → ChromaFlow-CTWeauIr.js} +32 -33
- package/dist/core/{ChromaticAberration-XEasUrD3.js → ChromaticAberration-CxuOb68m.js} +13 -13
- package/dist/core/{Circle-CvQ9duDU.js → Circle-XP1B5rsN.js} +14 -13
- package/dist/core/{ColorWheel-CXvfWAjN.js → ColorWheel-CFU_OmOW.js} +30 -34
- package/dist/core/{CompressionArtifacts-BDaP7XI6.js → CompressionArtifacts-Bc9xTdQP.js} +64 -66
- package/dist/core/{ConcentricSpin-D06hFXEb.js → ConcentricSpin-DTJytpAk.js} +39 -41
- package/dist/core/{ConicGradient-Cg6vy3gl.js → ConicGradient-C-4uDmQj.js} +17 -18
- package/dist/core/{ContourLines-Cg2Dlmcr.js → ContourLines-C8p6f-1y.js} +29 -30
- package/dist/core/{CornerPin-wtqiMUCa.js → CornerPin-CB92kX10.js} +55 -57
- package/dist/core/{Crescent-Co__JqEE.js → Crescent-Dk4nlG8T.js} +14 -13
- package/dist/core/{Cross-CFytbdrZ.js → Cross-DsnI1U8g.js} +14 -13
- package/dist/core/{Crystal-U7VqhbHy.js → Crystal-CR_sG2y7.js} +143 -152
- package/dist/core/{CurlNoise-BXWYh1Qi.js → CurlNoise-DJ27ih0F.js} +16 -14
- package/dist/core/{CursorRipples-APbH7SVR.js → CursorRipples-CuO3sZga.js} +59 -58
- package/dist/core/{CursorTrail-D5Fj0wGp.js → CursorTrail-d4xx4QpM.js} +72 -71
- package/dist/core/{DataMosh-CWRLpjU3.js → DataMosh-BhvE-2yC.js} +71 -73
- package/dist/core/{DiamondGradient-C_2VoEiQ.js → DiamondGradient-CtOVKrYf.js} +23 -25
- package/dist/core/{DiamondWipe-BkdNODD1.js → DiamondWipe-D-yiQBVj.js} +22 -22
- package/dist/core/{DiffuseBlur-Dl7S4KBW.js → DiffuseBlur-BDf-Czxz.js} +11 -12
- package/dist/core/{DisplacementMap-lv-qoLem.js → DisplacementMap-B_jf_2lj.js} +26 -26
- package/dist/core/{Dither-B33J_gJU.js → Dither-D3P6EJU8.js} +116 -119
- package/dist/core/{DotGrid-DaOhiRaL.js → DotGrid-BnSVhJlh.js} +37 -39
- package/dist/core/{DropShadow-C5Z2Rs2C.js → DropShadow-BSKVH3n3.js} +37 -37
- package/dist/core/{Duotone-x4cywJbU.js → Duotone-DfjYuK2u.js} +7 -7
- package/dist/core/{Ellipse-CrQ1XYjx.js → Ellipse-D7_1QKaa.js} +13 -12
- package/dist/core/{Emboss-DNwO5JcE.js → Emboss-ZiPslqzl.js} +76 -78
- package/dist/core/{Engraving-FsaRQiyI.js → Engraving-DsfkKajz.js} +57 -59
- package/dist/core/{ErosionNoise-CloHpdFT.js → ErosionNoise-SELArv9H.js} +13 -11
- package/dist/core/{Exposure-mO6KjYvc.js → Exposure-A7WlTOti.js} +4 -5
- package/dist/core/{FallingLines-D_1wHUkx.js → FallingLines-9PRMb_Ou.js} +40 -42
- package/dist/core/{FilmGrain-DDhrsw94.js → FilmGrain-SXzVDesw.js} +17 -18
- package/dist/core/{FilmStock-BaP2aTLu.js → FilmStock-RK4fk4m0.js} +74 -74
- package/dist/core/{Flip-DYuqyJva.js → Flip-DjoNWG4v.js} +10 -12
- package/dist/core/{FloatingParticles-DJwNpHtZ.js → FloatingParticles-D7vUF5g7.js} +637 -451
- package/dist/core/{FlowField-D4iGiDic.js → FlowField-tHrXhd1b.js} +24 -23
- package/dist/core/{Flower-D0MqoayS.js → Flower-BfehbmmG.js} +14 -13
- package/dist/core/{FlowingGradient-9Zu0Pu4a.js → FlowingGradient-BTKjkx5F.js} +38 -39
- package/dist/core/{FlutedGlass-C_clmShu.js → FlutedGlass-uFT7iy_9.js} +43 -43
- package/dist/core/{Fog-C_kY5pWB.js → Fog-Cu1CMATa.js} +172 -171
- package/dist/core/{Form3D-D4aXZGoJ.js → Form3D-D0ji-MeC.js} +259 -267
- package/dist/core/{FractalNoise-mMVLGmIv.js → FractalNoise-D9HYiOdr.js} +30 -28
- package/dist/core/{Frost-M53tZlcf.js → Frost-DQZZxdTk.js} +70 -73
- package/dist/core/{GaborNoise-BhXywN1d.js → GaborNoise-D7BP0K4g.js} +16 -14
- package/dist/core/{Glass-B9D_52op.js → Glass-CzCVnGn-.js} +6 -4
- package/dist/core/{GlassTiles-DIkGYgVE.js → GlassTiles-DJzPPqwz.js} +23 -26
- package/dist/core/{Glitch-CUOJt5VX.js → Glitch-D1Dx8__X.js} +84 -72
- package/dist/core/{Glow-D5AdnLvU.js → Glow-Bd9_o_Kv.js} +76 -77
- package/dist/core/{Godrays-BeQCWVw7.js → Godrays-DRPRWGPm.js} +52 -56
- package/dist/core/{Goo-C0_0QYne.js → Goo-28A_pNBg.js} +64 -65
- package/dist/core/{GradientMap-DOVK05_a.js → GradientMap-D8dv-1AX.js} +47 -50
- package/dist/core/{Grayscale-Uv_6LYA9.js → Grayscale-BlVXBVwW.js} +6 -6
- package/dist/core/{Grid-Dbp4DoXZ.js → Grid-D9vlHvs1.js} +46 -48
- package/dist/core/{GridDistortion-D_21zIrm.js → GridDistortion-BpqDvqj6.js} +63 -62
- package/dist/core/{Group-DXiB5Qrx.js → Group-bwQnJRec.js} +1 -1
- package/dist/core/{HTMLInCanvas-xXPLTYIv.js → HTMLInCanvas-gCf64ozE.js} +1 -1
- package/dist/core/{Halftone-DszIQsyx.js → Halftone-B_WouxiP.js} +59 -62
- package/dist/core/{Heart-COpnSJPD.js → Heart-Bmt2TLNz.js} +12 -11
- package/dist/core/{Heatmap-CMm8SD-P.js → Heatmap-Ruef741_.js} +57 -55
- package/dist/core/{HexGrid-B6wNW-45.js → HexGrid-By9k0YuI.js} +32 -35
- package/dist/core/{Hologram-XejRN51V.js → Hologram-Cf25ONOE.js} +62 -66
- package/dist/core/{Holographic-D1G_Ou1y.js → Holographic-C9RzYykt.js} +58 -61
- package/dist/core/{HueShift-BCDgYfJs.js → HueShift-V3gQVuIo.js} +7 -10
- package/dist/core/{ImageTexture-BE2Jlkg6.js → ImageTexture-DAUR2N5Q.js} +3 -2
- package/dist/core/{InkFlow-DJaJqula.js → InkFlow-DlP1gmr4.js} +156 -156
- package/dist/core/{Invert-DDmITZjt.js → Invert-K648khvD.js} +4 -4
- package/dist/core/{IrisWipe-BFs5DDSa.js → IrisWipe-Clkd_5CA.js} +20 -23
- package/dist/core/{IsometricCubes-ChKqYTIw.js → IsometricCubes-CzfAwpQ5.js} +37 -42
- package/dist/core/{Kaleidoscope-C8_-tC6T.js → Kaleidoscope-B9k6HkNn.js} +21 -21
- package/dist/core/{KeyFrames-xR9ZzHKj.js → KeyFrames-DX6JFhsy.js} +130 -129
- package/dist/core/{LensFlare-DHGNEDIX.js → LensFlare-G73cvrIG.js} +82 -84
- package/dist/core/{LightEdge-DYfhB3-7.js → LightEdge-D3i7HUR9.js} +106 -107
- package/dist/core/{LightLeak-CYjuMURe.js → LightLeak-B8yGreP-.js} +58 -59
- package/dist/core/{LinearBlur-CV7gKYHV.js → LinearBlur-BEzNPe0e.js} +14 -14
- package/dist/core/{LinearGradient-DAzw65UB.js → LinearGradient-XjXyaoii.js} +36 -37
- package/dist/core/{LinearWipe-DoDZF7y0.js → LinearWipe-Doj9aS5n.js} +20 -21
- package/dist/core/{LiquidMetal-C9OxRyE4.js → LiquidMetal-CWV_RQip.js} +70 -73
- package/dist/core/{Liquify-gNsuR7aA.js → Liquify-DWrgFruC.js} +67 -66
- package/dist/core/{MagneticFilings-CQ7zHEow.js → MagneticFilings-Co0V07-1.js} +996 -756
- package/dist/core/{Marble-BSSMSrv8.js → Marble-D13mDBvL.js} +22 -21
- package/dist/core/{Mirror-BZAUA2jk.js → Mirror-DvukM_eG.js} +18 -18
- package/dist/core/{MultiPointGradient-HSfAYB-u.js → MultiPointGradient-CyK_Ty9a.js} +30 -31
- package/dist/core/{Neon-D9d6Osal.js → Neon-DD8qY6H9.js} +102 -113
- package/dist/core/{NoiseDissolve-CnELvUG_.js → NoiseDissolve-CeX3VO8J.js} +23 -22
- package/dist/core/{ObjectTracker-COh35yTh.js → ObjectTracker-BWo8H1kh.js} +3 -3
- package/dist/core/{PagePeel-B6sjmvZ1.js → PagePeel-BL5IeBeD.js} +54 -58
- package/dist/core/{Paper-LfukraJk.js → Paper-BAq9MqtG.js} +16 -15
- package/dist/core/{Parallelogram-DBi0yAG3.js → Parallelogram-DYzFG9ci.js} +14 -13
- package/dist/core/{ParticleField-q7COY9YT.js → ParticleField-Bl4uztO7.js} +1489 -1340
- package/dist/core/{ParticleFlow-DiHWbIon.js → ParticleFlow-RPxLP8HC.js} +1422 -1149
- package/dist/core/{Particles-BFsKUAPx.js → Particles-BDEX4Fw2.js} +866 -656
- package/dist/core/{PerlinNoise-KV2GG0ts.js → PerlinNoise-BtXlaEd8.js} +16 -14
- package/dist/core/{Perspective-CJSrtEy5.js → Perspective-CdU5nAEn.js} +23 -25
- package/dist/core/{PixelSort-WD-Y6ZFu.js → PixelSort-C7TX1ClH.js} +109 -109
- package/dist/core/{PixelThrow-CnOXm7Hv.js → PixelThrow-DpKEZPMK.js} +35 -35
- package/dist/core/{Pixelate-XJI9f1oT.js → Pixelate-C2OQUtqr.js} +19 -19
- package/dist/core/{Plasma-C0dnSaw1.js → Plasma-DLq9HroF.js} +33 -32
- package/dist/core/{Plastic-DBv_6A7q.js → Plastic-C2hiOaXw.js} +82 -84
- package/dist/core/{PolarCoordinates-B8Cq2bzT.js → PolarCoordinates-Bumv-Hi3.js} +16 -18
- package/dist/core/{Polygon-ORM35JKg.js → Polygon-DOpR58g4.js} +16 -17
- package/dist/core/{Posterize-Dn-Vv2S1.js → Posterize-CVNOkDme.js} +5 -8
- package/dist/core/{Prism-CYLsGJHY.js → Prism-CCQ1BsBL.js} +36 -40
- package/dist/core/{ProgressiveBlur-BXUumCm5.js → ProgressiveBlur-Cprr1XSE.js} +63 -65
- package/dist/core/{RadialGradient-j6T56q1W.js → RadialGradient-CsmCSySC.js} +22 -23
- package/dist/core/{RadialWipe-Bz19qvls.js → RadialWipe-BAnsqol4.js} +25 -25
- package/dist/core/{RandomBars-3RlhwDYG.js → RandomBars-DdhtxO8o.js} +23 -23
- package/dist/core/{ReactionDiffusion-DdXavIVw.js → ReactionDiffusion-Bih4xEtV.js} +173 -175
- package/dist/core/{RectangularCoordinates-p3250IKV.js → RectangularCoordinates-CKKA2oY1.js} +14 -14
- package/dist/core/{ReflectivePlane-BOl9AEoO.js → ReflectivePlane-u3Tje37M.js} +35 -37
- package/dist/core/{Repeater-BMXmN95R.js → Repeater-C-agsqBS.js} +2 -2
- package/dist/core/{Ring-DKcROHDs.js → Ring-Cj7bR89h.js} +15 -14
- package/dist/core/{RippleWipe-QH8D0Y-2.js → RippleWipe-VL1MMd5o.js} +24 -27
- package/dist/core/{Ripples-8fFdo6aq.js → Ripples-B88TeopS.js} +18 -21
- package/dist/core/{RoundedRect-Cr76tP9o.js → RoundedRect-jn8_QLrT.js} +14 -13
- package/dist/core/{Saturation-Dqifs1x7.js → Saturation-dCNIhHq2.js} +8 -9
- package/dist/core/{Scratches-sa8JU4Eb.js → Scratches-Dz_1Ptk0.js} +16 -14
- package/dist/core/{Sharpness-IRuPd9nn.js → Sharpness-Bxq4YiRL.js} +21 -22
- package/dist/core/{Shatter-BYaxMvyd.js → Shatter-DsuYUr-1.js} +73 -72
- package/dist/core/{SimplexNoise-C2vmRzgy.js → SimplexNoise-CvalBPNF.js} +19 -17
- package/dist/core/{SineWave-BGAJyGFr.js → SineWave-XPK5BsPB.js} +20 -20
- package/dist/core/{SliceWipe-BOcCk5Se.js → SliceWipe-gSs_VRwf.js} +19 -19
- package/dist/core/{Smoke-B1twbhQ4.js → Smoke-kzRXFLW9.js} +156 -155
- package/dist/core/{SmokeFill-CAayneM2.js → SmokeFill-DQZeqiwX.js} +233 -231
- package/dist/core/{SmokeFlow-Ug8difAz.js → SmokeFlow-n23YvKoI.js} +143 -142
- package/dist/core/{Solarize-205KKROH.js → Solarize-DINiQSz1.js} +12 -14
- package/dist/core/{SolidColor-B4pj8onb.js → SolidColor-Cu_9b_my.js} +1 -1
- package/dist/core/{Spherize-DUQxwwCL.js → Spherize-BLY2eqBV.js} +31 -37
- package/dist/core/{Spiral-DY1c-N4F.js → Spiral-CWCmvI3m.js} +36 -36
- package/dist/core/{Star-DRxNaHHo.js → Star-9WSeF-vW.js} +14 -13
- package/dist/core/{Stone-CUdcvOWd.js → Stone-CVO2Ey8i.js} +2 -2
- package/dist/core/{Strands-CFxYJMFu.js → Strands-D9Sz1vX9.js} +47 -49
- package/dist/core/{Stretch-DYrVdt8A.js → Stretch-DMT2Y6kN.js} +19 -19
- package/dist/core/{Stripes-BvnoWdwn.js → Stripes-DPVbOQkX.js} +39 -39
- package/dist/core/{StudioBackground-srQGUpfZ.js → StudioBackground-5JgYClrr.js} +67 -68
- package/dist/core/{SunBurst-COsVDZ4e.js → SunBurst-Din5CIAU.js} +18 -20
- package/dist/core/{Surface3D-TsGPzdGm.js → Surface3D-CW2ApEgt.js} +1934 -1528
- package/dist/core/{Swirl-nXMWVY2X.js → Swirl-DrchXPfh.js} +18 -21
- package/dist/core/{Teardrop-Bjtkigk4.js → Teardrop-CDt_XA4d.js} +13 -12
- package/dist/core/{Text-BGdsqRl5.js → Text-o_dubJeo.js} +20 -21
- package/dist/core/{ThinFilm-DhMKI5e2.js → ThinFilm-d7IlUY62.js} +59 -67
- package/dist/core/{TiltShift-BwuYyXB6.js → TiltShift-DJVcMb_M.js} +66 -67
- package/dist/core/{TimeTrail-CE2XumxR.js → TimeTrail-D1Gir7BK.js} +1003 -1647
- package/dist/core/{Tint-BTmcGjEl.js → Tint-Cak_PyOJ.js} +25 -26
- package/dist/core/{Trapezoid-CiZCh8QS.js → Trapezoid-DnFhlKCD.js} +14 -13
- package/dist/core/{TriangularGrid-BnQOEljy.js → TriangularGrid-BE9CgVlb.js} +34 -36
- package/dist/core/{Tritone-Ta084wlF.js → Tritone-mqU9b4YZ.js} +7 -10
- package/dist/core/{Truchet-BxCh_IIp.js → Truchet-yLdaw6z4.js} +31 -33
- package/dist/core/{Twirl-Cw4jm59Q.js → Twirl-SA6uh8pI.js} +16 -16
- package/dist/core/{VHS-Nwk0E-tf.js → VHS-Ch-bVeit.js} +68 -69
- package/dist/core/{VenetianBlinds-BZ0sS97G.js → VenetianBlinds-CboEoPIZ.js} +22 -23
- package/dist/core/{Vesica-Cf1KiSzK.js → Vesica-DmJWzk7E.js} +13 -12
- package/dist/core/{Vibrance-qWGvLkrW.js → Vibrance-7rW_G3qT.js} +7 -8
- package/dist/core/{VideoTexture-48ylVDvN.js → VideoTexture-Ctk5_1F8.js} +34 -39
- package/dist/core/{Vignette-CK_Li7v2.js → Vignette-DXtlR5LT.js} +20 -22
- package/dist/core/{Voronoi-DMYFDwIS.js → Voronoi-B0ZrQ6QO.js} +33 -37
- package/dist/core/{Water-D74wbHmn.js → Water-DfwGqSnM.js} +101 -108
- package/dist/core/{Watercolor-zo8-4Vqx.js → Watercolor-BAShYSu7.js} +305 -389
- package/dist/core/{WaveDistortion-BLrvGOzF.js → WaveDistortion-Cj4QBBKm.js} +80 -82
- package/dist/core/{WaveletNoise-a5OpO8-D.js → WaveletNoise-DYiU_ziD.js} +16 -14
- package/dist/core/{Weave-D1D3kuUg.js → Weave-DVefdB9i.js} +28 -31
- package/dist/core/{WebcamTexture-pBETyQYG.js → WebcamTexture-BO9jNxcP.js} +7 -7
- package/dist/core/{Wool-CMnWPdy9.js → Wool-D304TmpD.js} +2 -2
- package/dist/core/{WorleyNoise-BAEo0duh.js → WorleyNoise-B5FBTklZ.js} +69 -70
- package/dist/core/{ZoomBlur-CnBNmcfx.js → ZoomBlur-DxySopLs.js} +12 -12
- package/dist/core/agents-c-JjGH1b.js +1440 -0
- package/dist/core/blur-DKmdsW6d.js +2247 -0
- package/dist/core/compute-BoeIXi0l.js +31 -0
- package/dist/core/dataEncoding-CEmpiitu.js +24 -0
- package/dist/core/device-BODv_4aH.js +10 -0
- package/dist/core/edges-BZUKQxSE.js +29857 -0
- package/dist/core/{glass-sOqjtPJD.js → glass-BVqgjSPg.js} +164 -172
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/gpu/kit/agents.d.ts +17 -1
- package/dist/core/gpu/kit/agents.d.ts.map +1 -1
- package/dist/core/gpu/passManager.d.ts +6 -2
- package/dist/core/gpu/passManager.d.ts.map +1 -1
- package/dist/core/gpu/textures.d.ts +2 -2
- package/dist/core/gpu/textures.d.ts.map +1 -1
- package/dist/core/index.js +324 -226
- package/dist/core/media-Ds6MRfGR.js +757 -0
- package/dist/core/noise-Cq0KUOSC.js +12033 -0
- package/dist/core/noiseColor-CQyzqpVZ.js +103 -0
- package/dist/core/{noiseColor-CRpf22bk.js → noiseColor-DjCUZ_8u.js} +2 -2
- package/dist/core/noiseStylize-fKVcJbGK.js +359 -0
- package/dist/core/porters-DogLzpKT.js +991 -0
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +208 -199
- package/dist/core/sdf-o99ONcMJ.js +5174 -0
- package/dist/core/shaderRegistry-BSrnuqx-.js +425 -0
- package/dist/core/shaders/AngularBlur/index.js +5 -4
- package/dist/core/shaders/Arc/index.js +7 -4
- package/dist/core/shaders/Ascii/index.js +5 -4
- package/dist/core/shaders/Aurora/index.js +6 -4
- package/dist/core/shaders/BarShift/index.js +5 -4
- package/dist/core/shaders/BarnDoors/index.js +5 -4
- package/dist/core/shaders/Beam/index.js +5 -4
- package/dist/core/shaders/Bend/index.js +5 -4
- package/dist/core/shaders/Blob/index.js +5 -4
- package/dist/core/shaders/BlockDissolve/index.js +6 -4
- package/dist/core/shaders/BlockNoise/index.js +8 -5
- package/dist/core/shaders/BlueNoise/index.js +8 -5
- package/dist/core/shaders/Blur/index.js +6 -4
- package/dist/core/shaders/Boids/index.d.ts +3 -3
- package/dist/core/shaders/Boids/index.d.ts.map +1 -1
- package/dist/core/shaders/Boids/index.js +9 -5
- package/dist/core/shaders/BokehBlur/index.js +6 -4
- package/dist/core/shaders/BrickPattern/index.js +5 -4
- package/dist/core/shaders/BrightnessContrast/index.js +5 -4
- package/dist/core/shaders/BrushedMetal/index.js +11 -6
- package/dist/core/shaders/Bulge/index.js +5 -4
- package/dist/core/shaders/CRTScreen/index.js +5 -4
- package/dist/core/shaders/CarbonFiber/index.js +11 -6
- package/dist/core/shaders/Chalkboard/index.js +5 -4
- package/dist/core/shaders/ChannelBlur/index.js +6 -4
- package/dist/core/shaders/CheckerWipe/index.js +5 -4
- package/dist/core/shaders/Checkerboard/index.js +5 -4
- package/dist/core/shaders/Chevron/index.js +5 -4
- package/dist/core/shaders/ChromaFlow/index.js +6 -4
- package/dist/core/shaders/ChromaticAberration/index.js +5 -4
- package/dist/core/shaders/Circle/index.js +7 -4
- package/dist/core/shaders/ColorWheel/index.js +5 -4
- package/dist/core/shaders/CompressionArtifacts/index.js +5 -4
- package/dist/core/shaders/ConcentricSpin/index.js +5 -4
- package/dist/core/shaders/ConicGradient/index.js +5 -4
- package/dist/core/shaders/ContourLines/index.js +5 -4
- package/dist/core/shaders/CornerPin/index.js +5 -4
- package/dist/core/shaders/Crescent/index.js +7 -4
- package/dist/core/shaders/Cross/index.js +7 -4
- package/dist/core/shaders/Crystal/index.js +11 -6
- package/dist/core/shaders/CurlNoise/index.js +8 -5
- package/dist/core/shaders/CursorRipples/index.js +5 -4
- package/dist/core/shaders/CursorTrail/index.js +5 -4
- package/dist/core/shaders/DataMosh/index.js +5 -4
- package/dist/core/shaders/DiamondGradient/index.js +5 -4
- package/dist/core/shaders/DiamondWipe/index.js +5 -4
- package/dist/core/shaders/DiffuseBlur/index.js +5 -4
- package/dist/core/shaders/DisplacementMap/index.js +5 -4
- package/dist/core/shaders/Dither/index.js +5 -4
- package/dist/core/shaders/DotGrid/index.js +5 -4
- package/dist/core/shaders/DropShadow/index.js +5 -4
- package/dist/core/shaders/Duotone/index.js +5 -4
- package/dist/core/shaders/Ellipse/index.js +7 -4
- package/dist/core/shaders/Emboss/index.js +10 -6
- package/dist/core/shaders/Engraving/index.js +6 -4
- package/dist/core/shaders/ErosionNoise/index.js +8 -5
- package/dist/core/shaders/Exposure/index.js +5 -4
- package/dist/core/shaders/FallingLines/index.js +5 -4
- package/dist/core/shaders/FilmGrain/index.js +5 -4
- package/dist/core/shaders/FilmStock/index.js +6 -4
- package/dist/core/shaders/Flip/index.js +5 -4
- package/dist/core/shaders/FloatingParticles/index.d.ts +9 -4
- package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +9 -5
- package/dist/core/shaders/FlowField/index.js +6 -4
- package/dist/core/shaders/Flower/index.js +7 -4
- package/dist/core/shaders/FlowingGradient/index.js +6 -4
- package/dist/core/shaders/FlutedGlass/index.js +5 -4
- package/dist/core/shaders/Fog/index.js +5 -4
- package/dist/core/shaders/Form3D/index.js +5 -4
- package/dist/core/shaders/FractalNoise/index.js +7 -4
- package/dist/core/shaders/Frost/index.js +11 -6
- package/dist/core/shaders/GaborNoise/index.js +8 -5
- package/dist/core/shaders/Glass/index.js +11 -6
- package/dist/core/shaders/GlassTiles/index.js +5 -4
- package/dist/core/shaders/Glitch/index.d.ts +1 -1
- package/dist/core/shaders/Glitch/index.d.ts.map +1 -1
- package/dist/core/shaders/Glitch/index.js +5 -4
- package/dist/core/shaders/Glow/index.js +6 -4
- package/dist/core/shaders/Godrays/index.js +5 -4
- package/dist/core/shaders/Goo/index.js +10 -6
- package/dist/core/shaders/GradientMap/index.js +5 -4
- package/dist/core/shaders/Grayscale/index.js +5 -4
- package/dist/core/shaders/Grid/index.js +5 -4
- package/dist/core/shaders/GridDistortion/index.js +5 -4
- package/dist/core/shaders/Group/index.js +5 -4
- package/dist/core/shaders/HTMLInCanvas/index.js +5 -4
- package/dist/core/shaders/Halftone/index.js +5 -4
- package/dist/core/shaders/Heart/index.js +7 -4
- package/dist/core/shaders/Heatmap/index.js +11 -6
- package/dist/core/shaders/HexGrid/index.js +5 -4
- package/dist/core/shaders/Hologram/index.js +11 -6
- package/dist/core/shaders/Holographic/index.js +11 -6
- package/dist/core/shaders/HueShift/index.js +5 -4
- package/dist/core/shaders/ImageTexture/index.js +7 -5
- package/dist/core/shaders/InkFlow/index.js +5 -4
- package/dist/core/shaders/Invert/index.js +5 -4
- package/dist/core/shaders/IrisWipe/index.js +5 -4
- package/dist/core/shaders/IsometricCubes/index.js +5 -4
- package/dist/core/shaders/Kaleidoscope/index.js +5 -4
- package/dist/core/shaders/KeyFrames/index.js +5 -4
- package/dist/core/shaders/LensFlare/index.js +5 -4
- package/dist/core/shaders/LightEdge/index.js +11 -6
- package/dist/core/shaders/LightLeak/index.js +6 -4
- package/dist/core/shaders/LinearBlur/index.js +5 -4
- package/dist/core/shaders/LinearGradient/index.js +5 -4
- package/dist/core/shaders/LinearWipe/index.js +5 -4
- package/dist/core/shaders/LiquidMetal/index.js +11 -6
- package/dist/core/shaders/Liquify/index.js +5 -4
- package/dist/core/shaders/MagneticFilings/index.d.ts +0 -2
- package/dist/core/shaders/MagneticFilings/index.d.ts.map +1 -1
- package/dist/core/shaders/MagneticFilings/index.js +9 -5
- package/dist/core/shaders/Marble/index.js +6 -4
- package/dist/core/shaders/Mirror/index.js +5 -4
- package/dist/core/shaders/MultiPointGradient/index.js +5 -4
- package/dist/core/shaders/Neon/index.js +9 -5
- package/dist/core/shaders/NoiseDissolve/index.js +6 -4
- package/dist/core/shaders/ObjectTracker/index.js +6 -5
- package/dist/core/shaders/PagePeel/index.js +5 -4
- package/dist/core/shaders/Paper/index.js +6 -4
- package/dist/core/shaders/Parallelogram/index.js +7 -4
- package/dist/core/shaders/ParticleField/index.d.ts +10 -5
- package/dist/core/shaders/ParticleField/index.d.ts.map +1 -1
- package/dist/core/shaders/ParticleField/index.js +9 -5
- package/dist/core/shaders/ParticleFlow/index.d.ts +10 -4
- package/dist/core/shaders/ParticleFlow/index.d.ts.map +1 -1
- package/dist/core/shaders/ParticleFlow/index.js +9 -5
- package/dist/core/shaders/Particles/index.d.ts +4 -3
- package/dist/core/shaders/Particles/index.d.ts.map +1 -1
- package/dist/core/shaders/Particles/index.js +12 -6
- package/dist/core/shaders/PerlinNoise/index.js +8 -5
- package/dist/core/shaders/Perspective/index.js +5 -4
- package/dist/core/shaders/PixelSort/index.js +5 -4
- package/dist/core/shaders/PixelThrow/index.js +6 -4
- package/dist/core/shaders/Pixelate/index.js +5 -4
- package/dist/core/shaders/Plasma/index.js +6 -4
- package/dist/core/shaders/Plastic/index.js +11 -6
- package/dist/core/shaders/PolarCoordinates/index.js +5 -4
- package/dist/core/shaders/Polygon/index.js +7 -4
- package/dist/core/shaders/Posterize/index.js +5 -4
- package/dist/core/shaders/Prism/index.js +5 -4
- package/dist/core/shaders/ProgressiveBlur/index.js +6 -4
- package/dist/core/shaders/RadialGradient/index.js +5 -4
- package/dist/core/shaders/RadialWipe/index.js +5 -4
- package/dist/core/shaders/RandomBars/index.js +6 -4
- package/dist/core/shaders/ReactionDiffusion/index.js +5 -4
- package/dist/core/shaders/RectangularCoordinates/index.js +5 -4
- package/dist/core/shaders/ReflectivePlane/index.js +6 -4
- package/dist/core/shaders/Repeater/index.js +5 -4
- package/dist/core/shaders/Ring/index.js +7 -4
- package/dist/core/shaders/RippleWipe/index.js +5 -4
- package/dist/core/shaders/Ripples/index.js +5 -4
- package/dist/core/shaders/RoundedRect/index.js +7 -4
- package/dist/core/shaders/Saturation/index.js +5 -4
- package/dist/core/shaders/Scratches/index.js +8 -5
- package/dist/core/shaders/Sharpness/index.js +5 -4
- package/dist/core/shaders/Shatter/index.js +6 -4
- package/dist/core/shaders/SimplexNoise/index.js +7 -4
- package/dist/core/shaders/SineWave/index.js +5 -4
- package/dist/core/shaders/SliceWipe/index.js +5 -4
- package/dist/core/shaders/Smoke/index.js +5 -4
- package/dist/core/shaders/SmokeFill/index.js +10 -6
- package/dist/core/shaders/SmokeFlow/index.js +5 -4
- package/dist/core/shaders/Solarize/index.js +5 -4
- package/dist/core/shaders/SolidColor/index.js +2 -2
- package/dist/core/shaders/Spherize/index.js +5 -4
- package/dist/core/shaders/Spiral/index.js +5 -4
- package/dist/core/shaders/Star/index.js +7 -4
- package/dist/core/shaders/Stone/index.js +4 -3
- package/dist/core/shaders/Strands/index.js +5 -4
- package/dist/core/shaders/Stretch/index.js +5 -4
- package/dist/core/shaders/Stripes/index.js +5 -4
- package/dist/core/shaders/StudioBackground/index.js +5 -4
- package/dist/core/shaders/SunBurst/index.js +5 -4
- package/dist/core/shaders/Surface3D/index.d.ts +4 -2
- package/dist/core/shaders/Surface3D/index.d.ts.map +1 -1
- package/dist/core/shaders/Surface3D/index.js +7 -4
- package/dist/core/shaders/Swirl/index.js +5 -4
- package/dist/core/shaders/Teardrop/index.js +7 -4
- package/dist/core/shaders/Text/index.js +6 -5
- package/dist/core/shaders/ThinFilm/index.js +9 -5
- package/dist/core/shaders/TiltShift/index.js +6 -4
- package/dist/core/shaders/TimeTrail/index.d.ts +47 -1
- package/dist/core/shaders/TimeTrail/index.d.ts.map +1 -1
- package/dist/core/shaders/TimeTrail/index.js +7 -5
- package/dist/core/shaders/Tint/index.js +5 -4
- package/dist/core/shaders/Trapezoid/index.js +7 -4
- package/dist/core/shaders/TriangularGrid/index.js +5 -4
- package/dist/core/shaders/Tritone/index.js +5 -4
- package/dist/core/shaders/Truchet/index.js +5 -4
- package/dist/core/shaders/Twirl/index.js +5 -4
- package/dist/core/shaders/VHS/index.js +5 -4
- package/dist/core/shaders/VenetianBlinds/index.js +5 -4
- package/dist/core/shaders/Vesica/index.js +7 -4
- package/dist/core/shaders/Vibrance/index.js +5 -4
- package/dist/core/shaders/VideoTexture/index.js +6 -5
- package/dist/core/shaders/Vignette/index.js +5 -4
- package/dist/core/shaders/Voronoi/index.js +5 -4
- package/dist/core/shaders/Water/index.js +11 -6
- package/dist/core/shaders/Watercolor/index.d.ts +1 -1
- package/dist/core/shaders/Watercolor/index.d.ts.map +1 -1
- package/dist/core/shaders/Watercolor/index.js +6 -4
- package/dist/core/shaders/WaveDistortion/index.js +5 -4
- package/dist/core/shaders/WaveletNoise/index.js +8 -5
- package/dist/core/shaders/Weave/index.js +5 -4
- package/dist/core/shaders/WebcamTexture/index.js +7 -5
- package/dist/core/shaders/Wool/index.js +4 -3
- package/dist/core/shaders/WorleyNoise/index.js +5 -4
- package/dist/core/shaders/ZoomBlur/index.js +5 -4
- package/dist/core/shapeEffectBounds-Dg4GQ5vW.js +19213 -0
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +188 -184
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +197 -193
- package/dist/registry.js +0 -1
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
- package/dist/core/coords-BkIjixe_.js +0 -55724
- package/dist/core/noiseStylize-J6sFKoTh.js +0 -65
- package/dist/core/porters-BmU6G9TR.js +0 -321
- package/dist/core/shaderRegistry-D75z2sND.js +0 -425
- package/dist/core/shapeEffectBounds-PQqKLQXO.js +0 -406
- /package/dist/core/{fonts-DwhbVe2B.js → fonts-v_F1SFl9.js} +0 -0
- /package/dist/core/{naturalSize-Caz3-kRv.js → naturalSize-B679wTgN.js} +0 -0
- /package/dist/core/{transformations-t0d2-uSX.js → transformations-CsPUHppB.js} +0 -0
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { Bt as
|
|
2
|
-
import {
|
|
1
|
+
import { At as mix, Bt as sqrt, Ct as exp, Dt as length, Et as fract, Gt as arrayOf, H as mixColorsLinear, Kt as texture2d, Ot as max, Qt as struct, Tt as floor, U as mixColorsVariants, Ut as data_exports, Wt as atomic, cn as i32, d as ZERO, dt as atomicLoad, et as src_default, ft as atomicStore, ht as abs, in as vec3f, it as textureLoad, kt as min, ln as u32, mt as select, nt as std_exports, on as vec4f, ot as textureStore, qt as textureStorage2d, rn as vec2u, sn as f32, tn as vec2f, ut as atomicAdd, vt as ceil, yt as clamp } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { l as hash33, p as noise_exports, r as curl22z } from "./noise-Cq0KUOSC.js";
|
|
3
|
+
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-BoeIXi0l.js";
|
|
4
|
+
import { t as isMobileGpuViewport } from "./device-BODv_4aH.js";
|
|
5
|
+
import { a as makeAgentTexelWeightFn, l as resolveAgentShape, s as orientedShapeOptions, t as AGENT_SHAPES } from "./agents-c-JjGH1b.js";
|
|
6
|
+
import { a as transformColor, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
3
7
|
var N = 256;
|
|
4
8
|
var FLUID_COUNT = N * N;
|
|
5
|
-
var JACOBI_ITERS = 10;
|
|
9
|
+
var JACOBI_ITERS = isMobileGpuViewport() ? 6 : 10;
|
|
6
10
|
var PRESSURE_DISSIPATION = .8;
|
|
7
11
|
var VEL_FORMAT = "rgba16float";
|
|
8
|
-
var RES = 1024;
|
|
12
|
+
var RES = isMobileGpuViewport() ? 512 : 1024;
|
|
9
13
|
var INV_RES = 1 / RES;
|
|
14
|
+
var SIZE_REF_RES = 1024;
|
|
10
15
|
var STATE_FORMAT = "rgba16float";
|
|
11
16
|
var MAX_PARTICLES = 16384;
|
|
17
|
+
var COUNT_MAX_MOBILE = 6e3;
|
|
12
18
|
var SPLAT_R = 14;
|
|
13
|
-
var SPLAT_WIN = 29;
|
|
14
19
|
var AA_W = .75 * INV_RES;
|
|
15
20
|
var HARD_GAIN = 637;
|
|
16
21
|
var SOFT_GAIN = 255;
|
|
@@ -25,83 +30,83 @@ var AMBIENT_DRIFT = .09;
|
|
|
25
30
|
var INERTIA_RATE = 6;
|
|
26
31
|
var SPEED_NORM = .35;
|
|
27
32
|
var WARMUP_FRAMES = 3;
|
|
28
|
-
var FlowParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
29
|
-
dt:
|
|
30
|
-
curlStrength:
|
|
31
|
-
velFade:
|
|
32
|
-
ambient:
|
|
33
|
-
ambientTime:
|
|
34
|
-
ambientFreq:
|
|
33
|
+
var FlowParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
34
|
+
dt: f32,
|
|
35
|
+
curlStrength: f32,
|
|
36
|
+
velFade: f32,
|
|
37
|
+
ambient: f32,
|
|
38
|
+
ambientTime: f32,
|
|
39
|
+
ambientFreq: f32
|
|
35
40
|
}), "FlowParams");
|
|
36
|
-
var SplatParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
37
|
-
posX:
|
|
38
|
-
posY:
|
|
39
|
-
velX:
|
|
40
|
-
velY:
|
|
41
|
-
radius:
|
|
41
|
+
var SplatParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
42
|
+
posX: f32,
|
|
43
|
+
posY: f32,
|
|
44
|
+
velX: f32,
|
|
45
|
+
velY: f32,
|
|
46
|
+
radius: f32
|
|
42
47
|
}), "SplatParams");
|
|
43
|
-
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
44
|
-
colA:
|
|
45
|
-
colB:
|
|
46
|
-
dt:
|
|
47
|
-
aspect:
|
|
48
|
-
trails:
|
|
49
|
-
bodyR:
|
|
50
|
-
speedNorm:
|
|
51
|
-
advect:
|
|
48
|
+
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
49
|
+
colA: vec4f,
|
|
50
|
+
colB: vec4f,
|
|
51
|
+
dt: f32,
|
|
52
|
+
aspect: f32,
|
|
53
|
+
trails: f32,
|
|
54
|
+
bodyR: f32,
|
|
55
|
+
speedNorm: f32,
|
|
56
|
+
advect: f32
|
|
52
57
|
}), "SimParams");
|
|
53
|
-
var fluidLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
58
|
+
var fluidLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
54
59
|
velA: {
|
|
55
|
-
storage:
|
|
60
|
+
storage: arrayOf(vec4f, FLUID_COUNT),
|
|
56
61
|
access: "mutable"
|
|
57
62
|
},
|
|
58
63
|
velB: {
|
|
59
|
-
storage:
|
|
64
|
+
storage: arrayOf(vec4f, FLUID_COUNT),
|
|
60
65
|
access: "mutable"
|
|
61
66
|
},
|
|
62
67
|
pressure: {
|
|
63
|
-
storage:
|
|
68
|
+
storage: arrayOf(f32, FLUID_COUNT),
|
|
64
69
|
access: "mutable"
|
|
65
70
|
},
|
|
66
71
|
divergence: {
|
|
67
|
-
storage:
|
|
72
|
+
storage: arrayOf(f32, FLUID_COUNT),
|
|
68
73
|
access: "mutable"
|
|
69
74
|
},
|
|
70
75
|
params: { uniform: FlowParams },
|
|
71
76
|
sparams: { uniform: SplatParams },
|
|
72
|
-
velOutTex: { storageTexture:
|
|
77
|
+
velOutTex: { storageTexture: textureStorage2d(VEL_FORMAT, "write-only") }
|
|
73
78
|
}), "fluidLayout");
|
|
74
|
-
var pfLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
79
|
+
var pfLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
75
80
|
particles: {
|
|
76
|
-
storage:
|
|
81
|
+
storage: arrayOf(vec4f, MAX_PARTICLES),
|
|
77
82
|
access: "mutable"
|
|
78
83
|
},
|
|
79
84
|
accumE: {
|
|
80
|
-
storage:
|
|
85
|
+
storage: arrayOf(atomic(u32), RES * RES),
|
|
81
86
|
access: "mutable"
|
|
82
87
|
},
|
|
83
88
|
accumS: {
|
|
84
|
-
storage:
|
|
89
|
+
storage: arrayOf(atomic(u32), RES * RES),
|
|
85
90
|
access: "mutable"
|
|
86
91
|
},
|
|
87
92
|
trailBuf: {
|
|
88
|
-
storage:
|
|
93
|
+
storage: arrayOf(vec4f, RES * RES),
|
|
89
94
|
access: "mutable"
|
|
90
95
|
},
|
|
91
|
-
velTex: { texture:
|
|
96
|
+
velTex: { texture: texture2d(f32) },
|
|
92
97
|
params: { uniform: SimParams },
|
|
93
|
-
outTex: { storageTexture:
|
|
98
|
+
outTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
94
99
|
}), "pfLayout");
|
|
95
|
-
var nidx =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
],
|
|
100
|
+
var nidx = src_default.fn([
|
|
101
|
+
i32,
|
|
102
|
+
i32,
|
|
103
|
+
i32,
|
|
104
|
+
i32
|
|
105
|
+
], u32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((ii, ji, di, dj) => {
|
|
101
106
|
"use gpu";
|
|
102
|
-
const row =
|
|
103
|
-
const col =
|
|
104
|
-
return
|
|
107
|
+
const row = clamp(__tsover_add(ii, di), 0, __tsover_sub(N, 1));
|
|
108
|
+
const col = clamp(__tsover_add(ji, dj), 0, __tsover_sub(N, 1));
|
|
109
|
+
return u32(__tsover_add(__tsover_mul(row, N), col));
|
|
105
110
|
}), {
|
|
106
111
|
v: 1,
|
|
107
112
|
name: void 0,
|
|
@@ -206,24 +211,24 @@ var nidx = tgpu.fn([
|
|
|
206
211
|
]
|
|
207
212
|
},
|
|
208
213
|
externals: () => ({
|
|
209
|
-
std,
|
|
214
|
+
std: std_exports,
|
|
210
215
|
N,
|
|
211
|
-
d
|
|
216
|
+
d: data_exports
|
|
212
217
|
})
|
|
213
218
|
}) && $.f)({}));
|
|
214
|
-
const particleFlowForceKernel =
|
|
219
|
+
const particleFlowForceKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
215
220
|
"use gpu";
|
|
216
221
|
const p = fluidLayout.$.sparams;
|
|
217
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
218
|
-
const cellX = __tsover_add(
|
|
219
|
-
const cellY = __tsover_add(
|
|
222
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
223
|
+
const cellX = __tsover_add(f32(cx), .5);
|
|
224
|
+
const cellY = __tsover_add(f32(cy), .5);
|
|
220
225
|
const dx = __tsover_sub(cellX, p.posX);
|
|
221
226
|
const dy = __tsover_sub(cellY, p.posY);
|
|
222
227
|
const distSq = __tsover_add(__tsover_mul(dx, dx), __tsover_mul(dy, dy));
|
|
223
|
-
const radSq =
|
|
224
|
-
const inf =
|
|
228
|
+
const radSq = max(__tsover_mul(p.radius, p.radius), f32(1));
|
|
229
|
+
const inf = exp(__tsover_mul(__tsover_div(distSq, radSq), -1));
|
|
225
230
|
const vel = fluidLayout.$.velA[idx];
|
|
226
|
-
fluidLayout.$.velA[idx] =
|
|
231
|
+
fluidLayout.$.velA[idx] = vec4f(__tsover_add(vel.x, __tsover_mul(p.velX, inf)), __tsover_add(vel.y, __tsover_mul(p.velY, inf)), vel.z, 0);
|
|
227
232
|
}), {
|
|
228
233
|
v: 1,
|
|
229
234
|
name: void 0,
|
|
@@ -515,23 +520,23 @@ const particleFlowForceKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) =>
|
|
|
515
520
|
},
|
|
516
521
|
externals: () => ({
|
|
517
522
|
fluidLayout,
|
|
518
|
-
d,
|
|
523
|
+
d: data_exports,
|
|
519
524
|
N,
|
|
520
|
-
std
|
|
525
|
+
std: std_exports
|
|
521
526
|
})
|
|
522
527
|
}) && $.f)({})).$name("particleFlowForce");
|
|
523
|
-
const particleFlowCurlKernel =
|
|
528
|
+
const particleFlowCurlKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
524
529
|
"use gpu";
|
|
525
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
526
|
-
const ii =
|
|
527
|
-
const ji =
|
|
530
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
531
|
+
const ii = i32(cy);
|
|
532
|
+
const ji = i32(cx);
|
|
528
533
|
const vL = fluidLayout.$.velA[nidx(ii, ji, 0, -1)];
|
|
529
534
|
const vR = fluidLayout.$.velA[nidx(ii, ji, 0, 1)];
|
|
530
535
|
const vU = fluidLayout.$.velA[nidx(ii, ji, -1, 0)];
|
|
531
536
|
const vD = fluidLayout.$.velA[nidx(ii, ji, 1, 0)];
|
|
532
537
|
const curl = __tsover_mul(__tsover_sub(__tsover_sub(vR.y, vL.y), __tsover_sub(vD.x, vU.x)), .5);
|
|
533
538
|
const vel = fluidLayout.$.velA[idx];
|
|
534
|
-
fluidLayout.$.velA[idx] =
|
|
539
|
+
fluidLayout.$.velA[idx] = vec4f(vel.x, vel.y, curl, 0);
|
|
535
540
|
}), {
|
|
536
541
|
v: 1,
|
|
537
542
|
name: void 0,
|
|
@@ -811,34 +816,40 @@ const particleFlowCurlKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (
|
|
|
811
816
|
]
|
|
812
817
|
},
|
|
813
818
|
externals: () => ({
|
|
814
|
-
d,
|
|
819
|
+
d: data_exports,
|
|
815
820
|
N,
|
|
816
821
|
fluidLayout,
|
|
817
822
|
nidx
|
|
818
823
|
})
|
|
819
824
|
}) && $.f)({})).$name("particleFlowCurl");
|
|
820
|
-
const particleFlowVorticityKernel =
|
|
825
|
+
const particleFlowVorticityKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
821
826
|
"use gpu";
|
|
822
827
|
const p = fluidLayout.$.params;
|
|
823
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
824
|
-
const ii =
|
|
825
|
-
const ji =
|
|
826
|
-
const cL =
|
|
827
|
-
const cR =
|
|
828
|
-
const cU =
|
|
829
|
-
const cD =
|
|
828
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
829
|
+
const ii = i32(cy);
|
|
830
|
+
const ji = i32(cx);
|
|
831
|
+
const cL = abs(fluidLayout.$.velA[nidx(ii, ji, 0, -1)].z);
|
|
832
|
+
const cR = abs(fluidLayout.$.velA[nidx(ii, ji, 0, 1)].z);
|
|
833
|
+
const cU = abs(fluidLayout.$.velA[nidx(ii, ji, -1, 0)].z);
|
|
834
|
+
const cD = abs(fluidLayout.$.velA[nidx(ii, ji, 1, 0)].z);
|
|
830
835
|
const cc = fluidLayout.$.velA[idx].z;
|
|
831
836
|
const gx = __tsover_mul(__tsover_sub(cR, cL), .5);
|
|
832
837
|
const gy = __tsover_mul(__tsover_sub(cD, cU), .5);
|
|
833
|
-
const gl =
|
|
838
|
+
const gl = max(sqrt(__tsover_add(__tsover_mul(gx, gx), __tsover_mul(gy, gy))), f32(1e-5));
|
|
834
839
|
const fx = __tsover_mul(__tsover_mul(__tsover_mul(__tsover_div(gy, gl), cc), p.curlStrength), p.dt);
|
|
835
840
|
const fy = __tsover_mul(__tsover_mul(__tsover_mul(__tsover_mul(__tsover_div(gx, gl), -1), cc), p.curlStrength), p.dt);
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
841
|
+
let ax = f32(0);
|
|
842
|
+
let ay = f32(0);
|
|
843
|
+
if (p.ambient > 0) {
|
|
844
|
+
const uvx = __tsover_div(__tsover_add(f32(cx), .5), f32(N));
|
|
845
|
+
const uvy = __tsover_div(__tsover_add(f32(cy), .5), f32(N));
|
|
846
|
+
const amb = curl22z(vec2f(__tsover_mul(uvx, p.ambientFreq), __tsover_mul(uvy, p.ambientFreq)), p.ambientTime);
|
|
847
|
+
const af = __tsover_mul(__tsover_mul(p.ambient, AMBIENT_K), p.dt);
|
|
848
|
+
ax = __tsover_mul(amb.x, af);
|
|
849
|
+
ay = __tsover_mul(amb.y, af);
|
|
850
|
+
}
|
|
840
851
|
const vel = fluidLayout.$.velA[idx];
|
|
841
|
-
fluidLayout.$.velA[idx] =
|
|
852
|
+
fluidLayout.$.velA[idx] = vec4f(__tsover_add(__tsover_add(vel.x, fx), ax), __tsover_add(__tsover_add(vel.y, fy), ay), vel.z, 0);
|
|
842
853
|
}), {
|
|
843
854
|
v: 1,
|
|
844
855
|
name: void 0,
|
|
@@ -1244,132 +1255,203 @@ const particleFlowVorticityKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
1244
1255
|
]
|
|
1245
1256
|
],
|
|
1246
1257
|
[
|
|
1247
|
-
|
|
1248
|
-
"
|
|
1258
|
+
12,
|
|
1259
|
+
"ax",
|
|
1249
1260
|
[
|
|
1250
|
-
|
|
1261
|
+
6,
|
|
1251
1262
|
[
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
[
|
|
1256
|
-
7,
|
|
1257
|
-
"d",
|
|
1258
|
-
"f32"
|
|
1259
|
-
],
|
|
1260
|
-
["cx"]
|
|
1261
|
-
],
|
|
1262
|
-
"+",
|
|
1263
|
-
[5, "0.5"]
|
|
1263
|
+
7,
|
|
1264
|
+
"d",
|
|
1265
|
+
"f32"
|
|
1264
1266
|
],
|
|
1265
|
-
"
|
|
1266
|
-
[
|
|
1267
|
-
6,
|
|
1268
|
-
[
|
|
1269
|
-
7,
|
|
1270
|
-
"d",
|
|
1271
|
-
"f32"
|
|
1272
|
-
],
|
|
1273
|
-
["N"]
|
|
1274
|
-
]
|
|
1267
|
+
[[5, "0"]]
|
|
1275
1268
|
]
|
|
1276
1269
|
],
|
|
1277
1270
|
[
|
|
1278
|
-
|
|
1279
|
-
"
|
|
1271
|
+
12,
|
|
1272
|
+
"ay",
|
|
1280
1273
|
[
|
|
1281
|
-
|
|
1274
|
+
6,
|
|
1282
1275
|
[
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
[
|
|
1287
|
-
7,
|
|
1288
|
-
"d",
|
|
1289
|
-
"f32"
|
|
1290
|
-
],
|
|
1291
|
-
["cy"]
|
|
1292
|
-
],
|
|
1293
|
-
"+",
|
|
1294
|
-
[5, "0.5"]
|
|
1276
|
+
7,
|
|
1277
|
+
"d",
|
|
1278
|
+
"f32"
|
|
1295
1279
|
],
|
|
1296
|
-
"
|
|
1297
|
-
[
|
|
1298
|
-
6,
|
|
1299
|
-
[
|
|
1300
|
-
7,
|
|
1301
|
-
"d",
|
|
1302
|
-
"f32"
|
|
1303
|
-
],
|
|
1304
|
-
["N"]
|
|
1305
|
-
]
|
|
1280
|
+
[[5, "0"]]
|
|
1306
1281
|
]
|
|
1307
1282
|
],
|
|
1308
1283
|
[
|
|
1309
|
-
|
|
1310
|
-
"amb",
|
|
1284
|
+
11,
|
|
1311
1285
|
[
|
|
1312
|
-
|
|
1286
|
+
1,
|
|
1313
1287
|
[
|
|
1314
1288
|
7,
|
|
1315
|
-
"
|
|
1316
|
-
"
|
|
1289
|
+
"p",
|
|
1290
|
+
"ambient"
|
|
1317
1291
|
],
|
|
1318
|
-
|
|
1319
|
-
|
|
1292
|
+
">",
|
|
1293
|
+
[5, "0"]
|
|
1294
|
+
],
|
|
1295
|
+
[0, [
|
|
1296
|
+
[
|
|
1297
|
+
13,
|
|
1298
|
+
"uvx",
|
|
1320
1299
|
[
|
|
1321
|
-
7,
|
|
1322
|
-
"d",
|
|
1323
|
-
"vec2f"
|
|
1324
|
-
],
|
|
1325
|
-
[[
|
|
1326
1300
|
1,
|
|
1327
|
-
"uvx",
|
|
1328
|
-
"*",
|
|
1329
1301
|
[
|
|
1302
|
+
1,
|
|
1303
|
+
[
|
|
1304
|
+
6,
|
|
1305
|
+
[
|
|
1306
|
+
7,
|
|
1307
|
+
"d",
|
|
1308
|
+
"f32"
|
|
1309
|
+
],
|
|
1310
|
+
["cx"]
|
|
1311
|
+
],
|
|
1312
|
+
"+",
|
|
1313
|
+
[5, "0.5"]
|
|
1314
|
+
],
|
|
1315
|
+
"/",
|
|
1316
|
+
[
|
|
1317
|
+
6,
|
|
1318
|
+
[
|
|
1319
|
+
7,
|
|
1320
|
+
"d",
|
|
1321
|
+
"f32"
|
|
1322
|
+
],
|
|
1323
|
+
["N"]
|
|
1324
|
+
]
|
|
1325
|
+
]
|
|
1326
|
+
],
|
|
1327
|
+
[
|
|
1328
|
+
13,
|
|
1329
|
+
"uvy",
|
|
1330
|
+
[
|
|
1331
|
+
1,
|
|
1332
|
+
[
|
|
1333
|
+
1,
|
|
1334
|
+
[
|
|
1335
|
+
6,
|
|
1336
|
+
[
|
|
1337
|
+
7,
|
|
1338
|
+
"d",
|
|
1339
|
+
"f32"
|
|
1340
|
+
],
|
|
1341
|
+
["cy"]
|
|
1342
|
+
],
|
|
1343
|
+
"+",
|
|
1344
|
+
[5, "0.5"]
|
|
1345
|
+
],
|
|
1346
|
+
"/",
|
|
1347
|
+
[
|
|
1348
|
+
6,
|
|
1349
|
+
[
|
|
1350
|
+
7,
|
|
1351
|
+
"d",
|
|
1352
|
+
"f32"
|
|
1353
|
+
],
|
|
1354
|
+
["N"]
|
|
1355
|
+
]
|
|
1356
|
+
]
|
|
1357
|
+
],
|
|
1358
|
+
[
|
|
1359
|
+
13,
|
|
1360
|
+
"amb",
|
|
1361
|
+
[
|
|
1362
|
+
6,
|
|
1363
|
+
[
|
|
1364
|
+
7,
|
|
1365
|
+
"noise",
|
|
1366
|
+
"curl22z"
|
|
1367
|
+
],
|
|
1368
|
+
[[
|
|
1369
|
+
6,
|
|
1370
|
+
[
|
|
1371
|
+
7,
|
|
1372
|
+
"d",
|
|
1373
|
+
"vec2f"
|
|
1374
|
+
],
|
|
1375
|
+
[[
|
|
1376
|
+
1,
|
|
1377
|
+
"uvx",
|
|
1378
|
+
"*",
|
|
1379
|
+
[
|
|
1380
|
+
7,
|
|
1381
|
+
"p",
|
|
1382
|
+
"ambientFreq"
|
|
1383
|
+
]
|
|
1384
|
+
], [
|
|
1385
|
+
1,
|
|
1386
|
+
"uvy",
|
|
1387
|
+
"*",
|
|
1388
|
+
[
|
|
1389
|
+
7,
|
|
1390
|
+
"p",
|
|
1391
|
+
"ambientFreq"
|
|
1392
|
+
]
|
|
1393
|
+
]]
|
|
1394
|
+
], [
|
|
1330
1395
|
7,
|
|
1331
1396
|
"p",
|
|
1332
|
-
"
|
|
1333
|
-
]
|
|
1334
|
-
]
|
|
1397
|
+
"ambientTime"
|
|
1398
|
+
]]
|
|
1399
|
+
]
|
|
1400
|
+
],
|
|
1401
|
+
[
|
|
1402
|
+
13,
|
|
1403
|
+
"af",
|
|
1404
|
+
[
|
|
1335
1405
|
1,
|
|
1336
|
-
|
|
1406
|
+
[
|
|
1407
|
+
1,
|
|
1408
|
+
[
|
|
1409
|
+
7,
|
|
1410
|
+
"p",
|
|
1411
|
+
"ambient"
|
|
1412
|
+
],
|
|
1413
|
+
"*",
|
|
1414
|
+
"AMBIENT_K"
|
|
1415
|
+
],
|
|
1337
1416
|
"*",
|
|
1338
1417
|
[
|
|
1339
1418
|
7,
|
|
1340
1419
|
"p",
|
|
1341
|
-
"
|
|
1420
|
+
"dt"
|
|
1342
1421
|
]
|
|
1343
|
-
]
|
|
1344
|
-
],
|
|
1345
|
-
7,
|
|
1346
|
-
"p",
|
|
1347
|
-
"ambientTime"
|
|
1348
|
-
]]
|
|
1349
|
-
]
|
|
1350
|
-
],
|
|
1351
|
-
[
|
|
1352
|
-
13,
|
|
1353
|
-
"af",
|
|
1354
|
-
[
|
|
1355
|
-
1,
|
|
1422
|
+
]
|
|
1423
|
+
],
|
|
1356
1424
|
[
|
|
1357
|
-
|
|
1425
|
+
2,
|
|
1426
|
+
"ax",
|
|
1427
|
+
"=",
|
|
1358
1428
|
[
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1429
|
+
1,
|
|
1430
|
+
[
|
|
1431
|
+
7,
|
|
1432
|
+
"amb",
|
|
1433
|
+
"x"
|
|
1434
|
+
],
|
|
1435
|
+
"*",
|
|
1436
|
+
"af"
|
|
1437
|
+
]
|
|
1365
1438
|
],
|
|
1366
|
-
"*",
|
|
1367
1439
|
[
|
|
1368
|
-
|
|
1369
|
-
"
|
|
1370
|
-
"
|
|
1440
|
+
2,
|
|
1441
|
+
"ay",
|
|
1442
|
+
"=",
|
|
1443
|
+
[
|
|
1444
|
+
1,
|
|
1445
|
+
[
|
|
1446
|
+
7,
|
|
1447
|
+
"amb",
|
|
1448
|
+
"y"
|
|
1449
|
+
],
|
|
1450
|
+
"*",
|
|
1451
|
+
"af"
|
|
1452
|
+
]
|
|
1371
1453
|
]
|
|
1372
|
-
]
|
|
1454
|
+
]]
|
|
1373
1455
|
],
|
|
1374
1456
|
[
|
|
1375
1457
|
13,
|
|
@@ -1425,16 +1507,7 @@ const particleFlowVorticityKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
1425
1507
|
"fx"
|
|
1426
1508
|
],
|
|
1427
1509
|
"+",
|
|
1428
|
-
|
|
1429
|
-
1,
|
|
1430
|
-
[
|
|
1431
|
-
7,
|
|
1432
|
-
"amb",
|
|
1433
|
-
"x"
|
|
1434
|
-
],
|
|
1435
|
-
"*",
|
|
1436
|
-
"af"
|
|
1437
|
-
]
|
|
1510
|
+
"ax"
|
|
1438
1511
|
],
|
|
1439
1512
|
[
|
|
1440
1513
|
1,
|
|
@@ -1449,16 +1522,7 @@ const particleFlowVorticityKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
1449
1522
|
"fy"
|
|
1450
1523
|
],
|
|
1451
1524
|
"+",
|
|
1452
|
-
|
|
1453
|
-
1,
|
|
1454
|
-
[
|
|
1455
|
-
7,
|
|
1456
|
-
"amb",
|
|
1457
|
-
"y"
|
|
1458
|
-
],
|
|
1459
|
-
"*",
|
|
1460
|
-
"af"
|
|
1461
|
-
]
|
|
1525
|
+
"ay"
|
|
1462
1526
|
],
|
|
1463
1527
|
[
|
|
1464
1528
|
7,
|
|
@@ -1482,30 +1546,30 @@ const particleFlowVorticityKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
1482
1546
|
},
|
|
1483
1547
|
externals: () => ({
|
|
1484
1548
|
fluidLayout,
|
|
1485
|
-
d,
|
|
1549
|
+
d: data_exports,
|
|
1486
1550
|
N,
|
|
1487
|
-
std,
|
|
1551
|
+
std: std_exports,
|
|
1488
1552
|
nidx,
|
|
1489
1553
|
noise: noise_exports,
|
|
1490
1554
|
AMBIENT_K
|
|
1491
1555
|
})
|
|
1492
1556
|
}) && $.f)({})).$name("particleFlowVorticity");
|
|
1493
|
-
const particleFlowDivergenceKernel =
|
|
1557
|
+
const particleFlowDivergenceKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1494
1558
|
"use gpu";
|
|
1495
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
1496
|
-
const ii =
|
|
1497
|
-
const ji =
|
|
1498
|
-
const jf =
|
|
1499
|
-
const iF =
|
|
1559
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
1560
|
+
const ii = i32(cy);
|
|
1561
|
+
const ji = i32(cx);
|
|
1562
|
+
const jf = f32(cx);
|
|
1563
|
+
const iF = f32(cy);
|
|
1500
1564
|
const selfVel = fluidLayout.$.velA[idx];
|
|
1501
1565
|
const normalL = fluidLayout.$.velA[nidx(ii, ji, 0, -1)].x;
|
|
1502
1566
|
const normalR = fluidLayout.$.velA[nidx(ii, ji, 0, 1)].x;
|
|
1503
1567
|
const normalU = fluidLayout.$.velA[nidx(ii, ji, -1, 0)].y;
|
|
1504
1568
|
const normalD = fluidLayout.$.velA[nidx(ii, ji, 1, 0)].y;
|
|
1505
|
-
const L =
|
|
1506
|
-
const R =
|
|
1507
|
-
const T =
|
|
1508
|
-
const B =
|
|
1569
|
+
const L = select(normalL, __tsover_mul(selfVel.x, -1), jf < .5);
|
|
1570
|
+
const R = select(normalR, __tsover_mul(selfVel.x, -1), jf > f32(__tsover_sub(N, 1.5)));
|
|
1571
|
+
const T = select(normalU, __tsover_mul(selfVel.y, -1), iF < .5);
|
|
1572
|
+
const B = select(normalD, __tsover_mul(selfVel.y, -1), iF > f32(__tsover_sub(N, 1.5)));
|
|
1509
1573
|
const div = __tsover_mul(__tsover_add(__tsover_sub(R, L), __tsover_sub(B, T)), .5);
|
|
1510
1574
|
fluidLayout.$.pressure[idx] = __tsover_mul(fluidLayout.$.pressure[idx], PRESSURE_DISSIPATION);
|
|
1511
1575
|
fluidLayout.$.divergence[idx] = div;
|
|
@@ -1996,19 +2060,19 @@ const particleFlowDivergenceKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($
|
|
|
1996
2060
|
]
|
|
1997
2061
|
},
|
|
1998
2062
|
externals: () => ({
|
|
1999
|
-
d,
|
|
2063
|
+
d: data_exports,
|
|
2000
2064
|
N,
|
|
2001
2065
|
fluidLayout,
|
|
2002
2066
|
nidx,
|
|
2003
|
-
std,
|
|
2067
|
+
std: std_exports,
|
|
2004
2068
|
PRESSURE_DISSIPATION
|
|
2005
2069
|
})
|
|
2006
2070
|
}) && $.f)({})).$name("particleFlowDivergence");
|
|
2007
|
-
const particleFlowJacobiKernel =
|
|
2071
|
+
const particleFlowJacobiKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2008
2072
|
"use gpu";
|
|
2009
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2010
|
-
const ii =
|
|
2011
|
-
const ji =
|
|
2073
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2074
|
+
const ii = i32(cy);
|
|
2075
|
+
const ji = i32(cx);
|
|
2012
2076
|
const pL = fluidLayout.$.pressure[nidx(ii, ji, 0, -1)];
|
|
2013
2077
|
const pR = fluidLayout.$.pressure[nidx(ii, ji, 0, 1)];
|
|
2014
2078
|
const pU = fluidLayout.$.pressure[nidx(ii, ji, -1, 0)];
|
|
@@ -2257,23 +2321,23 @@ const particleFlowJacobiKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) =>
|
|
|
2257
2321
|
]
|
|
2258
2322
|
},
|
|
2259
2323
|
externals: () => ({
|
|
2260
|
-
d,
|
|
2324
|
+
d: data_exports,
|
|
2261
2325
|
N,
|
|
2262
2326
|
fluidLayout,
|
|
2263
2327
|
nidx
|
|
2264
2328
|
})
|
|
2265
2329
|
}) && $.f)({})).$name("particleFlowJacobi");
|
|
2266
|
-
const particleFlowGradSubtractKernel =
|
|
2330
|
+
const particleFlowGradSubtractKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2267
2331
|
"use gpu";
|
|
2268
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2269
|
-
const ii =
|
|
2270
|
-
const ji =
|
|
2332
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2333
|
+
const ii = i32(cy);
|
|
2334
|
+
const ji = i32(cx);
|
|
2271
2335
|
const pL = fluidLayout.$.pressure[nidx(ii, ji, 0, -1)];
|
|
2272
2336
|
const pR = fluidLayout.$.pressure[nidx(ii, ji, 0, 1)];
|
|
2273
2337
|
const pU = fluidLayout.$.pressure[nidx(ii, ji, -1, 0)];
|
|
2274
2338
|
const pD = fluidLayout.$.pressure[nidx(ii, ji, 1, 0)];
|
|
2275
2339
|
const vel = fluidLayout.$.velA[idx];
|
|
2276
|
-
fluidLayout.$.velA[idx] =
|
|
2340
|
+
fluidLayout.$.velA[idx] = vec4f(__tsover_sub(vel.x, __tsover_mul(__tsover_sub(pR, pL), .5)), __tsover_sub(vel.y, __tsover_mul(__tsover_sub(pD, pU), .5)), vel.z, 0);
|
|
2277
2341
|
}), {
|
|
2278
2342
|
v: 1,
|
|
2279
2343
|
name: void 0,
|
|
@@ -2546,31 +2610,31 @@ const particleFlowGradSubtractKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (
|
|
|
2546
2610
|
]
|
|
2547
2611
|
},
|
|
2548
2612
|
externals: () => ({
|
|
2549
|
-
d,
|
|
2613
|
+
d: data_exports,
|
|
2550
2614
|
N,
|
|
2551
2615
|
fluidLayout,
|
|
2552
2616
|
nidx
|
|
2553
2617
|
})
|
|
2554
2618
|
}) && $.f)({})).$name("particleFlowGradSubtract");
|
|
2555
|
-
const particleFlowAdvectVelKernel =
|
|
2619
|
+
const particleFlowAdvectVelKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2556
2620
|
"use gpu";
|
|
2557
2621
|
const p = fluidLayout.$.params;
|
|
2558
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2622
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2559
2623
|
const vel = fluidLayout.$.velA[idx];
|
|
2560
|
-
const srcX =
|
|
2561
|
-
const srcY =
|
|
2562
|
-
const x0 =
|
|
2563
|
-
const y0 =
|
|
2624
|
+
const srcX = clamp(__tsover_sub(f32(cx), __tsover_mul(vel.x, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
2625
|
+
const srcY = clamp(__tsover_sub(f32(cy), __tsover_mul(vel.y, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
2626
|
+
const x0 = clamp(floor(srcX), 0, f32(__tsover_sub(N, 2)));
|
|
2627
|
+
const y0 = clamp(floor(srcY), 0, f32(__tsover_sub(N, 2)));
|
|
2564
2628
|
const sx = __tsover_sub(srcX, x0);
|
|
2565
2629
|
const sy = __tsover_sub(srcY, y0);
|
|
2566
|
-
const ix0 =
|
|
2567
|
-
const iy0 =
|
|
2568
|
-
const v00 = fluidLayout.$.velA[
|
|
2569
|
-
const v10 = fluidLayout.$.velA[
|
|
2570
|
-
const v01 = fluidLayout.$.velA[
|
|
2571
|
-
const v11 = fluidLayout.$.velA[
|
|
2630
|
+
const ix0 = i32(x0);
|
|
2631
|
+
const iy0 = i32(y0);
|
|
2632
|
+
const v00 = fluidLayout.$.velA[u32(__tsover_add(__tsover_mul(iy0, N), ix0))];
|
|
2633
|
+
const v10 = fluidLayout.$.velA[u32(__tsover_add(__tsover_add(__tsover_mul(iy0, N), ix0), 1))];
|
|
2634
|
+
const v01 = fluidLayout.$.velA[u32(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0))];
|
|
2635
|
+
const v11 = fluidLayout.$.velA[u32(__tsover_add(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0), 1))];
|
|
2572
2636
|
const decay = __tsover_add(1, __tsover_mul(p.velFade, p.dt));
|
|
2573
|
-
fluidLayout.$.velB[idx] =
|
|
2637
|
+
fluidLayout.$.velB[idx] = vec4f(__tsover_div(mix(mix(v00.x, v10.x, sx), mix(v01.x, v11.x, sx), sy), decay), __tsover_div(mix(mix(v00.y, v10.y, sx), mix(v01.y, v11.y, sx), sy), decay), 0, 0);
|
|
2574
2638
|
}), {
|
|
2575
2639
|
v: 1,
|
|
2576
2640
|
name: void 0,
|
|
@@ -3208,17 +3272,17 @@ const particleFlowAdvectVelKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
3208
3272
|
},
|
|
3209
3273
|
externals: () => ({
|
|
3210
3274
|
fluidLayout,
|
|
3211
|
-
d,
|
|
3275
|
+
d: data_exports,
|
|
3212
3276
|
N,
|
|
3213
|
-
std
|
|
3277
|
+
std: std_exports
|
|
3214
3278
|
})
|
|
3215
3279
|
}) && $.f)({})).$name("particleFlowAdvectVel");
|
|
3216
|
-
const particleFlowCopyVelKernel =
|
|
3280
|
+
const particleFlowCopyVelKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
3217
3281
|
"use gpu";
|
|
3218
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
3282
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
3219
3283
|
const v = fluidLayout.$.velB[idx];
|
|
3220
|
-
fluidLayout.$.velA[idx] =
|
|
3221
|
-
|
|
3284
|
+
fluidLayout.$.velA[idx] = vec4f(v.x, v.y, 0, 0);
|
|
3285
|
+
textureStore(fluidLayout.$.velOutTex, vec2u(cx, cy), vec4f(v.x, v.y, 0, 0));
|
|
3222
3286
|
}), {
|
|
3223
3287
|
v: 1,
|
|
3224
3288
|
name: void 0,
|
|
@@ -3369,18 +3433,18 @@ const particleFlowCopyVelKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) =
|
|
|
3369
3433
|
]
|
|
3370
3434
|
},
|
|
3371
3435
|
externals: () => ({
|
|
3372
|
-
d,
|
|
3436
|
+
d: data_exports,
|
|
3373
3437
|
N,
|
|
3374
3438
|
fluidLayout,
|
|
3375
|
-
std
|
|
3439
|
+
std: std_exports
|
|
3376
3440
|
})
|
|
3377
3441
|
}) && $.f)({})).$name("particleFlowCopyVel");
|
|
3378
|
-
const particleFlowInitKernel =
|
|
3442
|
+
const particleFlowInitKernel = src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
3379
3443
|
"use gpu";
|
|
3380
3444
|
const prm = pfLayout.$.params;
|
|
3381
|
-
const fi =
|
|
3382
|
-
const r = hash33(
|
|
3383
|
-
pfLayout.$.particles[i] =
|
|
3445
|
+
const fi = f32(i);
|
|
3446
|
+
const r = hash33(vec3f(__tsover_add(__tsover_mul(fi, 1.6180339), .71), __tsover_add(__tsover_mul(fi, 2.7182818), 4.17), __tsover_add(__tsover_mul(fi, 3.1415926), 9.03)));
|
|
3447
|
+
pfLayout.$.particles[i] = vec4f(__tsover_mul(r.x, prm.aspect), r.y, 0, 0);
|
|
3384
3448
|
}), {
|
|
3385
3449
|
v: 1,
|
|
3386
3450
|
name: void 0,
|
|
@@ -3528,189 +3592,76 @@ const particleFlowInitKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalT
|
|
|
3528
3592
|
},
|
|
3529
3593
|
externals: () => ({
|
|
3530
3594
|
pfLayout,
|
|
3531
|
-
d,
|
|
3595
|
+
d: data_exports,
|
|
3532
3596
|
noise: noise_exports
|
|
3533
3597
|
})
|
|
3534
3598
|
}) && $.f)({})).$name("particleFlowInit");
|
|
3535
|
-
|
|
3599
|
+
var R2A = .7548776662466927;
|
|
3600
|
+
var R2B = .5698402909980532;
|
|
3601
|
+
var HOME_RATE = 1.8;
|
|
3602
|
+
const particleFlowIntegrateKernel = src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
3536
3603
|
"use gpu";
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3539
|
-
|
|
3604
|
+
const prm = pfLayout.$.params;
|
|
3605
|
+
const a = pfLayout.$.particles[i];
|
|
3606
|
+
const pos = vec2f(a.x, a.y);
|
|
3607
|
+
const dt = prm.dt;
|
|
3608
|
+
const aspect = max(prm.aspect, 1e-5);
|
|
3609
|
+
const uvx = __tsover_div(pos.x, aspect);
|
|
3610
|
+
const uvy = pos.y;
|
|
3611
|
+
const NF = f32(N);
|
|
3612
|
+
const su = __tsover_sub(__tsover_mul(uvx, NF), .5);
|
|
3613
|
+
const sv = __tsover_sub(__tsover_mul(uvy, NF), .5);
|
|
3614
|
+
const x0 = floor(su);
|
|
3615
|
+
const y0 = floor(sv);
|
|
3616
|
+
const fx = __tsover_sub(su, x0);
|
|
3617
|
+
const fy = __tsover_sub(sv, y0);
|
|
3618
|
+
const maxT = __tsover_sub(NF, 1);
|
|
3619
|
+
const ix0 = u32(clamp(x0, 0, maxT));
|
|
3620
|
+
const ix1 = u32(clamp(__tsover_add(x0, 1), 0, maxT));
|
|
3621
|
+
const iy0 = u32(clamp(y0, 0, maxT));
|
|
3622
|
+
const iy1 = u32(clamp(__tsover_add(y0, 1), 0, maxT));
|
|
3623
|
+
const v00 = textureLoad(pfLayout.$.velTex, vec2u(ix0, iy0), 0);
|
|
3624
|
+
const v10 = textureLoad(pfLayout.$.velTex, vec2u(ix1, iy0), 0);
|
|
3625
|
+
const v01 = textureLoad(pfLayout.$.velTex, vec2u(ix0, iy1), 0);
|
|
3626
|
+
const v11 = textureLoad(pfLayout.$.velTex, vec2u(ix1, iy1), 0);
|
|
3627
|
+
const gvx = mix(mix(v00.x, v10.x, fx), mix(v01.x, v11.x, fx), fy);
|
|
3628
|
+
const gvy = mix(mix(v00.y, v10.y, fx), mix(v01.y, v11.y, fx), fy);
|
|
3629
|
+
const fieldVx = __tsover_mul(__tsover_mul(__tsover_div(gvx, NF), aspect), prm.advect);
|
|
3630
|
+
const fieldVy = __tsover_mul(__tsover_div(gvy, NF), prm.advect);
|
|
3631
|
+
const blend = __tsover_sub(1, exp(__tsover_mul(__tsover_mul(dt, INERTIA_RATE), -1)));
|
|
3632
|
+
const fi = f32(i);
|
|
3633
|
+
const homeX = __tsover_mul(fract(__tsover_add(.5, __tsover_mul(fi, R2A))), aspect);
|
|
3634
|
+
const homeY = fract(__tsover_add(.5, __tsover_mul(fi, R2B)));
|
|
3635
|
+
const velX = __tsover_add(mix(a.z, fieldVx, blend), __tsover_mul(__tsover_sub(homeX, pos.x), __tsover_mul(HOME_RATE, dt)));
|
|
3636
|
+
const velY = __tsover_add(mix(a.w, fieldVy, blend), __tsover_mul(__tsover_sub(homeY, pos.y), __tsover_mul(HOME_RATE, dt)));
|
|
3637
|
+
const nposX = clamp(__tsover_add(pos.x, __tsover_mul(velX, dt)), 0, aspect);
|
|
3638
|
+
const nposY = clamp(__tsover_add(pos.y, __tsover_mul(velY, dt)), 0, 1);
|
|
3639
|
+
pfLayout.$.particles[i] = vec4f(nposX, nposY, velX, velY);
|
|
3540
3640
|
}), {
|
|
3541
3641
|
v: 1,
|
|
3542
3642
|
name: void 0,
|
|
3543
3643
|
ast: {
|
|
3544
3644
|
"params": [{
|
|
3545
3645
|
"type": "i",
|
|
3546
|
-
"name": "
|
|
3547
|
-
}, {
|
|
3548
|
-
"type": "i",
|
|
3549
|
-
"name": "y"
|
|
3646
|
+
"name": "i"
|
|
3550
3647
|
}],
|
|
3551
3648
|
"body": [0, [
|
|
3552
3649
|
[
|
|
3553
3650
|
13,
|
|
3554
|
-
"
|
|
3651
|
+
"prm",
|
|
3555
3652
|
[
|
|
3556
|
-
|
|
3653
|
+
7,
|
|
3557
3654
|
[
|
|
3558
|
-
|
|
3559
|
-
"
|
|
3560
|
-
"
|
|
3561
|
-
[
|
|
3562
|
-
6,
|
|
3563
|
-
[
|
|
3564
|
-
7,
|
|
3565
|
-
"d",
|
|
3566
|
-
"u32"
|
|
3567
|
-
],
|
|
3568
|
-
["RES"]
|
|
3569
|
-
]
|
|
3655
|
+
7,
|
|
3656
|
+
"pfLayout",
|
|
3657
|
+
"$"
|
|
3570
3658
|
],
|
|
3571
|
-
"
|
|
3572
|
-
"x"
|
|
3659
|
+
"params"
|
|
3573
3660
|
]
|
|
3574
3661
|
],
|
|
3575
3662
|
[
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
7,
|
|
3579
|
-
"std",
|
|
3580
|
-
"atomicStore"
|
|
3581
|
-
],
|
|
3582
|
-
[[
|
|
3583
|
-
8,
|
|
3584
|
-
[
|
|
3585
|
-
7,
|
|
3586
|
-
[
|
|
3587
|
-
7,
|
|
3588
|
-
"pfLayout",
|
|
3589
|
-
"$"
|
|
3590
|
-
],
|
|
3591
|
-
"accumE"
|
|
3592
|
-
],
|
|
3593
|
-
"idx"
|
|
3594
|
-
], [
|
|
3595
|
-
6,
|
|
3596
|
-
[
|
|
3597
|
-
7,
|
|
3598
|
-
"d",
|
|
3599
|
-
"u32"
|
|
3600
|
-
],
|
|
3601
|
-
[[5, "0"]]
|
|
3602
|
-
]]
|
|
3603
|
-
],
|
|
3604
|
-
[
|
|
3605
|
-
6,
|
|
3606
|
-
[
|
|
3607
|
-
7,
|
|
3608
|
-
"std",
|
|
3609
|
-
"atomicStore"
|
|
3610
|
-
],
|
|
3611
|
-
[[
|
|
3612
|
-
8,
|
|
3613
|
-
[
|
|
3614
|
-
7,
|
|
3615
|
-
[
|
|
3616
|
-
7,
|
|
3617
|
-
"pfLayout",
|
|
3618
|
-
"$"
|
|
3619
|
-
],
|
|
3620
|
-
"accumS"
|
|
3621
|
-
],
|
|
3622
|
-
"idx"
|
|
3623
|
-
], [
|
|
3624
|
-
6,
|
|
3625
|
-
[
|
|
3626
|
-
7,
|
|
3627
|
-
"d",
|
|
3628
|
-
"u32"
|
|
3629
|
-
],
|
|
3630
|
-
[[5, "0"]]
|
|
3631
|
-
]]
|
|
3632
|
-
]
|
|
3633
|
-
]],
|
|
3634
|
-
"externalNames": [
|
|
3635
|
-
"d",
|
|
3636
|
-
"RES",
|
|
3637
|
-
"std",
|
|
3638
|
-
"pfLayout"
|
|
3639
|
-
]
|
|
3640
|
-
},
|
|
3641
|
-
externals: () => ({
|
|
3642
|
-
d,
|
|
3643
|
-
RES,
|
|
3644
|
-
std,
|
|
3645
|
-
pfLayout
|
|
3646
|
-
})
|
|
3647
|
-
}) && $.f)({})).$name("particleFlowClear");
|
|
3648
|
-
var R2A = .7548776662466927;
|
|
3649
|
-
var R2B = .5698402909980532;
|
|
3650
|
-
var HOME_RATE = 1.8;
|
|
3651
|
-
const particleFlowIntegrateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
3652
|
-
"use gpu";
|
|
3653
|
-
const prm = pfLayout.$.params;
|
|
3654
|
-
const a = pfLayout.$.particles[i];
|
|
3655
|
-
const pos = d.vec2f(a.x, a.y);
|
|
3656
|
-
const dt = prm.dt;
|
|
3657
|
-
const aspect = std.max(prm.aspect, 1e-5);
|
|
3658
|
-
const uvx = __tsover_div(pos.x, aspect);
|
|
3659
|
-
const uvy = pos.y;
|
|
3660
|
-
const NF = d.f32(N);
|
|
3661
|
-
const su = __tsover_sub(__tsover_mul(uvx, NF), .5);
|
|
3662
|
-
const sv = __tsover_sub(__tsover_mul(uvy, NF), .5);
|
|
3663
|
-
const x0 = std.floor(su);
|
|
3664
|
-
const y0 = std.floor(sv);
|
|
3665
|
-
const fx = __tsover_sub(su, x0);
|
|
3666
|
-
const fy = __tsover_sub(sv, y0);
|
|
3667
|
-
const maxT = __tsover_sub(NF, 1);
|
|
3668
|
-
const ix0 = d.u32(std.clamp(x0, 0, maxT));
|
|
3669
|
-
const ix1 = d.u32(std.clamp(__tsover_add(x0, 1), 0, maxT));
|
|
3670
|
-
const iy0 = d.u32(std.clamp(y0, 0, maxT));
|
|
3671
|
-
const iy1 = d.u32(std.clamp(__tsover_add(y0, 1), 0, maxT));
|
|
3672
|
-
const v00 = std.textureLoad(pfLayout.$.velTex, d.vec2u(ix0, iy0), 0);
|
|
3673
|
-
const v10 = std.textureLoad(pfLayout.$.velTex, d.vec2u(ix1, iy0), 0);
|
|
3674
|
-
const v01 = std.textureLoad(pfLayout.$.velTex, d.vec2u(ix0, iy1), 0);
|
|
3675
|
-
const v11 = std.textureLoad(pfLayout.$.velTex, d.vec2u(ix1, iy1), 0);
|
|
3676
|
-
const gvx = std.mix(std.mix(v00.x, v10.x, fx), std.mix(v01.x, v11.x, fx), fy);
|
|
3677
|
-
const gvy = std.mix(std.mix(v00.y, v10.y, fx), std.mix(v01.y, v11.y, fx), fy);
|
|
3678
|
-
const fieldVx = __tsover_mul(__tsover_mul(__tsover_div(gvx, NF), aspect), prm.advect);
|
|
3679
|
-
const fieldVy = __tsover_mul(__tsover_div(gvy, NF), prm.advect);
|
|
3680
|
-
const blend = __tsover_sub(1, std.exp(__tsover_mul(__tsover_mul(dt, INERTIA_RATE), -1)));
|
|
3681
|
-
const fi = d.f32(i);
|
|
3682
|
-
const homeX = __tsover_mul(std.fract(__tsover_add(.5, __tsover_mul(fi, R2A))), aspect);
|
|
3683
|
-
const homeY = std.fract(__tsover_add(.5, __tsover_mul(fi, R2B)));
|
|
3684
|
-
const velX = __tsover_add(std.mix(a.z, fieldVx, blend), __tsover_mul(__tsover_sub(homeX, pos.x), __tsover_mul(HOME_RATE, dt)));
|
|
3685
|
-
const velY = __tsover_add(std.mix(a.w, fieldVy, blend), __tsover_mul(__tsover_sub(homeY, pos.y), __tsover_mul(HOME_RATE, dt)));
|
|
3686
|
-
const nposX = std.clamp(__tsover_add(pos.x, __tsover_mul(velX, dt)), 0, aspect);
|
|
3687
|
-
const nposY = std.clamp(__tsover_add(pos.y, __tsover_mul(velY, dt)), 0, 1);
|
|
3688
|
-
pfLayout.$.particles[i] = d.vec4f(nposX, nposY, velX, velY);
|
|
3689
|
-
}), {
|
|
3690
|
-
v: 1,
|
|
3691
|
-
name: void 0,
|
|
3692
|
-
ast: {
|
|
3693
|
-
"params": [{
|
|
3694
|
-
"type": "i",
|
|
3695
|
-
"name": "i"
|
|
3696
|
-
}],
|
|
3697
|
-
"body": [0, [
|
|
3698
|
-
[
|
|
3699
|
-
13,
|
|
3700
|
-
"prm",
|
|
3701
|
-
[
|
|
3702
|
-
7,
|
|
3703
|
-
[
|
|
3704
|
-
7,
|
|
3705
|
-
"pfLayout",
|
|
3706
|
-
"$"
|
|
3707
|
-
],
|
|
3708
|
-
"params"
|
|
3709
|
-
]
|
|
3710
|
-
],
|
|
3711
|
-
[
|
|
3712
|
-
13,
|
|
3713
|
-
"a",
|
|
3663
|
+
13,
|
|
3664
|
+
"a",
|
|
3714
3665
|
[
|
|
3715
3666
|
8,
|
|
3716
3667
|
[
|
|
@@ -4586,8 +4537,8 @@ const particleFlowIntegrateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (gl
|
|
|
4586
4537
|
},
|
|
4587
4538
|
externals: () => ({
|
|
4588
4539
|
pfLayout,
|
|
4589
|
-
d,
|
|
4590
|
-
std,
|
|
4540
|
+
d: data_exports,
|
|
4541
|
+
std: std_exports,
|
|
4591
4542
|
N,
|
|
4592
4543
|
INERTIA_RATE,
|
|
4593
4544
|
R2A,
|
|
@@ -4598,46 +4549,54 @@ const particleFlowIntegrateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (gl
|
|
|
4598
4549
|
function makeParticleFlowSplatKernel(shape) {
|
|
4599
4550
|
const name = resolveAgentShape(shape, "streak");
|
|
4600
4551
|
const s = AGENT_SHAPES[name];
|
|
4601
|
-
const weightFn =
|
|
4552
|
+
const weightFn = makeAgentTexelWeightFn(name);
|
|
4602
4553
|
const HL = name === "glow" ? 1 : s.hl;
|
|
4603
4554
|
const SOFT = s.soft;
|
|
4604
4555
|
const EXT = name === "glow" ? s.ext + 1 : s.ext;
|
|
4605
4556
|
const GAIN = s.soft ? SOFT_GAIN : HARD_GAIN;
|
|
4606
|
-
return
|
|
4557
|
+
return src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
4607
4558
|
"use gpu";
|
|
4608
4559
|
const prm = pfLayout.$.params;
|
|
4609
4560
|
const a = pfLayout.$.particles[i];
|
|
4610
|
-
const pos =
|
|
4611
|
-
const vel =
|
|
4612
|
-
const spd =
|
|
4613
|
-
const dir =
|
|
4614
|
-
const agitI =
|
|
4615
|
-
const
|
|
4561
|
+
const pos = vec2f(a.x, a.y);
|
|
4562
|
+
const vel = vec2f(a.z, a.w);
|
|
4563
|
+
const spd = length(vel);
|
|
4564
|
+
const dir = select(vec2f(1, 0), vel.div(max(spd, 1e-5)), spd > 1e-5);
|
|
4565
|
+
const agitI = clamp(__tsover_div(spd, max(prm.speedNorm, 1e-5)), 0, 1);
|
|
4566
|
+
const aspect = max(prm.aspect, 1e-5);
|
|
4567
|
+
const bodyR = clamp(prm.bodyR, 1e-6, __tsover_mul(f32(SPLAT_R), INV_RES));
|
|
4616
4568
|
const hl = __tsover_mul(bodyR, HL);
|
|
4617
|
-
const
|
|
4618
|
-
const
|
|
4619
|
-
const
|
|
4620
|
-
const
|
|
4621
|
-
const
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4569
|
+
const invR2 = __tsover_div(1, __tsover_mul(bodyR, bodyR));
|
|
4570
|
+
const radW = __tsover_add(__tsover_mul(bodyR, EXT), __tsover_mul(AA_W, 2));
|
|
4571
|
+
const extSq = __tsover_mul(radW, radW);
|
|
4572
|
+
const txf = __tsover_mul(__tsover_div(pos.x, aspect), f32(RES));
|
|
4573
|
+
const tyf = __tsover_mul(pos.y, f32(RES));
|
|
4574
|
+
const cxi = i32(floor(txf));
|
|
4575
|
+
const cyi = i32(floor(tyf));
|
|
4576
|
+
const radY = i32(ceil(__tsover_mul(radW, f32(RES))));
|
|
4577
|
+
const radX = i32(ceil(__tsover_div(__tsover_mul(radW, f32(RES)), aspect)));
|
|
4578
|
+
const x0 = max(__tsover_sub(cxi, radX), 0);
|
|
4579
|
+
const x1 = min(__tsover_add(cxi, radX), __tsover_sub(i32(RES), 1));
|
|
4580
|
+
const y0 = max(__tsover_sub(cyi, radY), 0);
|
|
4581
|
+
const y1 = min(__tsover_add(cyi, radY), __tsover_sub(i32(RES), 1));
|
|
4582
|
+
for (let py = y0; py <= y1; py++) {
|
|
4583
|
+
const offY = __tsover_sub(__tsover_mul(__tsover_add(f32(py), .5), INV_RES), pos.y);
|
|
4584
|
+
const offYSq = __tsover_mul(offY, offY);
|
|
4585
|
+
for (let px = x0; px <= x1; px++) {
|
|
4586
|
+
const offX = __tsover_sub(__tsover_mul(__tsover_mul(__tsover_add(f32(px), .5), INV_RES), aspect), pos.x);
|
|
4587
|
+
if (__tsover_add(__tsover_mul(offX, offX), offYSq) < extSq) {
|
|
4629
4588
|
const t = __tsover_add(__tsover_mul(offX, dir.x), __tsover_mul(offY, dir.y));
|
|
4630
4589
|
const n = __tsover_add(__tsover_mul(offX, -dir.y), __tsover_mul(offY, dir.x));
|
|
4631
|
-
const
|
|
4632
|
-
const
|
|
4633
|
-
const
|
|
4634
|
-
const
|
|
4635
|
-
const w = __tsover_mul(weightFn(tEval, n, bodyR, AA_W
|
|
4636
|
-
const e =
|
|
4637
|
-
if (e >
|
|
4638
|
-
const idx =
|
|
4639
|
-
|
|
4640
|
-
|
|
4590
|
+
const tEval = select(t, __tsover_sub(t, clamp(t, -hl, hl)), f32(SOFT) > .5);
|
|
4591
|
+
const tk = clamp(__tsover_div(__tsover_sub(hl, t), max(__tsover_mul(hl, 2), 1e-6)), 0, 1);
|
|
4592
|
+
const bright = __tsover_sub(1, __tsover_mul(__tsover_mul(.55, tk), f32(SOFT)));
|
|
4593
|
+
const qEval = __tsover_mul(__tsover_add(__tsover_mul(tEval, tEval), __tsover_mul(n, n)), invR2);
|
|
4594
|
+
const w = __tsover_mul(weightFn(qEval, tEval, n, bodyR, AA_W), bright);
|
|
4595
|
+
const e = u32(__tsover_mul(w, f32(GAIN)));
|
|
4596
|
+
if (e > u32(0)) {
|
|
4597
|
+
const idx = u32(__tsover_add(__tsover_mul(py, i32(RES)), px));
|
|
4598
|
+
atomicAdd(pfLayout.$.accumE[idx], e);
|
|
4599
|
+
atomicAdd(pfLayout.$.accumS[idx], u32(__tsover_mul(__tsover_mul(w, agitI), f32(GAIN))));
|
|
4641
4600
|
}
|
|
4642
4601
|
}
|
|
4643
4602
|
}
|
|
@@ -4818,7 +4777,7 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
4818
4777
|
],
|
|
4819
4778
|
[
|
|
4820
4779
|
13,
|
|
4821
|
-
"
|
|
4780
|
+
"aspect",
|
|
4822
4781
|
[
|
|
4823
4782
|
6,
|
|
4824
4783
|
[
|
|
@@ -4829,8 +4788,42 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
4829
4788
|
[[
|
|
4830
4789
|
7,
|
|
4831
4790
|
"prm",
|
|
4832
|
-
"
|
|
4833
|
-
], [5, "0.
|
|
4791
|
+
"aspect"
|
|
4792
|
+
], [5, "0.00001"]]
|
|
4793
|
+
]
|
|
4794
|
+
],
|
|
4795
|
+
[
|
|
4796
|
+
13,
|
|
4797
|
+
"bodyR",
|
|
4798
|
+
[
|
|
4799
|
+
6,
|
|
4800
|
+
[
|
|
4801
|
+
7,
|
|
4802
|
+
"std",
|
|
4803
|
+
"clamp"
|
|
4804
|
+
],
|
|
4805
|
+
[
|
|
4806
|
+
[
|
|
4807
|
+
7,
|
|
4808
|
+
"prm",
|
|
4809
|
+
"bodyR"
|
|
4810
|
+
],
|
|
4811
|
+
[5, "0.000001"],
|
|
4812
|
+
[
|
|
4813
|
+
1,
|
|
4814
|
+
[
|
|
4815
|
+
6,
|
|
4816
|
+
[
|
|
4817
|
+
7,
|
|
4818
|
+
"d",
|
|
4819
|
+
"f32"
|
|
4820
|
+
],
|
|
4821
|
+
["SPLAT_R"]
|
|
4822
|
+
],
|
|
4823
|
+
"*",
|
|
4824
|
+
"INV_RES"
|
|
4825
|
+
]
|
|
4826
|
+
]
|
|
4834
4827
|
]
|
|
4835
4828
|
],
|
|
4836
4829
|
[
|
|
@@ -4845,44 +4838,49 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
4845
4838
|
],
|
|
4846
4839
|
[
|
|
4847
4840
|
13,
|
|
4848
|
-
"
|
|
4841
|
+
"invR2",
|
|
4849
4842
|
[
|
|
4850
4843
|
1,
|
|
4844
|
+
[5, "1"],
|
|
4845
|
+
"/",
|
|
4851
4846
|
[
|
|
4852
4847
|
1,
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4848
|
+
"bodyR",
|
|
4849
|
+
"*",
|
|
4850
|
+
"bodyR"
|
|
4851
|
+
]
|
|
4852
|
+
]
|
|
4853
|
+
],
|
|
4854
|
+
[
|
|
4855
|
+
13,
|
|
4856
|
+
"radW",
|
|
4857
|
+
[
|
|
4858
|
+
1,
|
|
4859
|
+
[
|
|
4860
|
+
1,
|
|
4861
|
+
"bodyR",
|
|
4862
|
+
"*",
|
|
4863
|
+
"EXT"
|
|
4866
4864
|
],
|
|
4867
|
-
"
|
|
4865
|
+
"+",
|
|
4868
4866
|
[
|
|
4869
4867
|
1,
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
"*",
|
|
4874
|
-
"EXT"
|
|
4875
|
-
],
|
|
4876
|
-
"+",
|
|
4877
|
-
[
|
|
4878
|
-
1,
|
|
4879
|
-
"AA_W",
|
|
4880
|
-
"*",
|
|
4881
|
-
[5, "2"]
|
|
4882
|
-
]
|
|
4868
|
+
"AA_W",
|
|
4869
|
+
"*",
|
|
4870
|
+
[5, "2"]
|
|
4883
4871
|
]
|
|
4884
4872
|
]
|
|
4885
4873
|
],
|
|
4874
|
+
[
|
|
4875
|
+
13,
|
|
4876
|
+
"extSq",
|
|
4877
|
+
[
|
|
4878
|
+
1,
|
|
4879
|
+
"radW",
|
|
4880
|
+
"*",
|
|
4881
|
+
"radW"
|
|
4882
|
+
]
|
|
4883
|
+
],
|
|
4886
4884
|
[
|
|
4887
4885
|
13,
|
|
4888
4886
|
"txf",
|
|
@@ -4896,19 +4894,7 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
4896
4894
|
"x"
|
|
4897
4895
|
],
|
|
4898
4896
|
"/",
|
|
4899
|
-
|
|
4900
|
-
6,
|
|
4901
|
-
[
|
|
4902
|
-
7,
|
|
4903
|
-
"std",
|
|
4904
|
-
"max"
|
|
4905
|
-
],
|
|
4906
|
-
[[
|
|
4907
|
-
7,
|
|
4908
|
-
"prm",
|
|
4909
|
-
"aspect"
|
|
4910
|
-
], [5, "0.00001"]]
|
|
4911
|
-
]
|
|
4897
|
+
"aspect"
|
|
4912
4898
|
],
|
|
4913
4899
|
"*",
|
|
4914
4900
|
[
|
|
@@ -4987,423 +4973,585 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
4987
4973
|
]
|
|
4988
4974
|
],
|
|
4989
4975
|
[
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
12,
|
|
4993
|
-
"ky",
|
|
4994
|
-
[5, "0"]
|
|
4995
|
-
],
|
|
4996
|
-
[
|
|
4997
|
-
1,
|
|
4998
|
-
"ky",
|
|
4999
|
-
"<",
|
|
5000
|
-
"SPLAT_WIN"
|
|
5001
|
-
],
|
|
4976
|
+
13,
|
|
4977
|
+
"radY",
|
|
5002
4978
|
[
|
|
5003
|
-
|
|
5004
|
-
"++",
|
|
5005
|
-
"ky"
|
|
5006
|
-
],
|
|
5007
|
-
[0, [[
|
|
5008
|
-
14,
|
|
5009
|
-
[
|
|
5010
|
-
12,
|
|
5011
|
-
"kx",
|
|
5012
|
-
[5, "0"]
|
|
5013
|
-
],
|
|
5014
|
-
[
|
|
5015
|
-
1,
|
|
5016
|
-
"kx",
|
|
5017
|
-
"<",
|
|
5018
|
-
"SPLAT_WIN"
|
|
5019
|
-
],
|
|
4979
|
+
6,
|
|
5020
4980
|
[
|
|
5021
|
-
|
|
5022
|
-
"
|
|
5023
|
-
"
|
|
4981
|
+
7,
|
|
4982
|
+
"d",
|
|
4983
|
+
"i32"
|
|
5024
4984
|
],
|
|
5025
|
-
[
|
|
4985
|
+
[[
|
|
4986
|
+
6,
|
|
5026
4987
|
[
|
|
5027
|
-
|
|
5028
|
-
"
|
|
4988
|
+
7,
|
|
4989
|
+
"std",
|
|
4990
|
+
"ceil"
|
|
4991
|
+
],
|
|
4992
|
+
[[
|
|
4993
|
+
1,
|
|
4994
|
+
"radW",
|
|
4995
|
+
"*",
|
|
5029
4996
|
[
|
|
5030
|
-
|
|
4997
|
+
6,
|
|
5031
4998
|
[
|
|
5032
|
-
|
|
5033
|
-
"
|
|
5034
|
-
"
|
|
5035
|
-
"kx"
|
|
4999
|
+
7,
|
|
5000
|
+
"d",
|
|
5001
|
+
"f32"
|
|
5036
5002
|
],
|
|
5037
|
-
"
|
|
5038
|
-
"SPLAT_R"
|
|
5003
|
+
["RES"]
|
|
5039
5004
|
]
|
|
5040
|
-
]
|
|
5005
|
+
]]
|
|
5006
|
+
]]
|
|
5007
|
+
]
|
|
5008
|
+
],
|
|
5009
|
+
[
|
|
5010
|
+
13,
|
|
5011
|
+
"radX",
|
|
5012
|
+
[
|
|
5013
|
+
6,
|
|
5014
|
+
[
|
|
5015
|
+
7,
|
|
5016
|
+
"d",
|
|
5017
|
+
"i32"
|
|
5018
|
+
],
|
|
5019
|
+
[[
|
|
5020
|
+
6,
|
|
5041
5021
|
[
|
|
5042
|
-
|
|
5043
|
-
"
|
|
5022
|
+
7,
|
|
5023
|
+
"std",
|
|
5024
|
+
"ceil"
|
|
5025
|
+
],
|
|
5026
|
+
[[
|
|
5027
|
+
1,
|
|
5044
5028
|
[
|
|
5045
5029
|
1,
|
|
5030
|
+
"radW",
|
|
5031
|
+
"*",
|
|
5046
5032
|
[
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5033
|
+
6,
|
|
5034
|
+
[
|
|
5035
|
+
7,
|
|
5036
|
+
"d",
|
|
5037
|
+
"f32"
|
|
5038
|
+
],
|
|
5039
|
+
["RES"]
|
|
5040
|
+
]
|
|
5041
|
+
],
|
|
5042
|
+
"/",
|
|
5043
|
+
"aspect"
|
|
5044
|
+
]]
|
|
5045
|
+
]]
|
|
5046
|
+
]
|
|
5047
|
+
],
|
|
5048
|
+
[
|
|
5049
|
+
13,
|
|
5050
|
+
"x0",
|
|
5051
|
+
[
|
|
5052
|
+
6,
|
|
5053
|
+
[
|
|
5054
|
+
7,
|
|
5055
|
+
"std",
|
|
5056
|
+
"max"
|
|
5057
|
+
],
|
|
5058
|
+
[[
|
|
5059
|
+
1,
|
|
5060
|
+
"cxi",
|
|
5061
|
+
"-",
|
|
5062
|
+
"radX"
|
|
5063
|
+
], [5, "0"]]
|
|
5064
|
+
]
|
|
5065
|
+
],
|
|
5066
|
+
[
|
|
5067
|
+
13,
|
|
5068
|
+
"x1",
|
|
5069
|
+
[
|
|
5070
|
+
6,
|
|
5071
|
+
[
|
|
5072
|
+
7,
|
|
5073
|
+
"std",
|
|
5074
|
+
"min"
|
|
5075
|
+
],
|
|
5076
|
+
[[
|
|
5077
|
+
1,
|
|
5078
|
+
"cxi",
|
|
5079
|
+
"+",
|
|
5080
|
+
"radX"
|
|
5081
|
+
], [
|
|
5082
|
+
1,
|
|
5083
|
+
[
|
|
5084
|
+
6,
|
|
5085
|
+
[
|
|
5086
|
+
7,
|
|
5087
|
+
"d",
|
|
5088
|
+
"i32"
|
|
5089
|
+
],
|
|
5090
|
+
["RES"]
|
|
5091
|
+
],
|
|
5092
|
+
"-",
|
|
5093
|
+
[5, "1"]
|
|
5094
|
+
]]
|
|
5095
|
+
]
|
|
5096
|
+
],
|
|
5097
|
+
[
|
|
5098
|
+
13,
|
|
5099
|
+
"y0",
|
|
5100
|
+
[
|
|
5101
|
+
6,
|
|
5102
|
+
[
|
|
5103
|
+
7,
|
|
5104
|
+
"std",
|
|
5105
|
+
"max"
|
|
5106
|
+
],
|
|
5107
|
+
[[
|
|
5108
|
+
1,
|
|
5109
|
+
"cyi",
|
|
5110
|
+
"-",
|
|
5111
|
+
"radY"
|
|
5112
|
+
], [5, "0"]]
|
|
5113
|
+
]
|
|
5114
|
+
],
|
|
5115
|
+
[
|
|
5116
|
+
13,
|
|
5117
|
+
"y1",
|
|
5118
|
+
[
|
|
5119
|
+
6,
|
|
5120
|
+
[
|
|
5121
|
+
7,
|
|
5122
|
+
"std",
|
|
5123
|
+
"min"
|
|
5124
|
+
],
|
|
5125
|
+
[[
|
|
5126
|
+
1,
|
|
5127
|
+
"cyi",
|
|
5128
|
+
"+",
|
|
5129
|
+
"radY"
|
|
5130
|
+
], [
|
|
5131
|
+
1,
|
|
5132
|
+
[
|
|
5133
|
+
6,
|
|
5134
|
+
[
|
|
5135
|
+
7,
|
|
5136
|
+
"d",
|
|
5137
|
+
"i32"
|
|
5138
|
+
],
|
|
5139
|
+
["RES"]
|
|
5140
|
+
],
|
|
5141
|
+
"-",
|
|
5142
|
+
[5, "1"]
|
|
5143
|
+
]]
|
|
5144
|
+
]
|
|
5145
|
+
],
|
|
5146
|
+
[
|
|
5147
|
+
14,
|
|
5148
|
+
[
|
|
5149
|
+
12,
|
|
5150
|
+
"py",
|
|
5151
|
+
"y0"
|
|
5152
|
+
],
|
|
5153
|
+
[
|
|
5154
|
+
1,
|
|
5155
|
+
"py",
|
|
5156
|
+
"<=",
|
|
5157
|
+
"y1"
|
|
5158
|
+
],
|
|
5159
|
+
[
|
|
5160
|
+
102,
|
|
5161
|
+
"++",
|
|
5162
|
+
"py"
|
|
5163
|
+
],
|
|
5164
|
+
[0, [
|
|
5165
|
+
[
|
|
5166
|
+
13,
|
|
5167
|
+
"offY",
|
|
5168
|
+
[
|
|
5169
|
+
1,
|
|
5058
5170
|
[
|
|
5059
|
-
|
|
5171
|
+
1,
|
|
5060
5172
|
[
|
|
5061
|
-
|
|
5173
|
+
1,
|
|
5062
5174
|
[
|
|
5063
|
-
|
|
5175
|
+
6,
|
|
5064
5176
|
[
|
|
5065
|
-
|
|
5066
|
-
"
|
|
5067
|
-
"
|
|
5068
|
-
[5, "0"]
|
|
5177
|
+
7,
|
|
5178
|
+
"d",
|
|
5179
|
+
"f32"
|
|
5069
5180
|
],
|
|
5070
|
-
"
|
|
5071
|
-
[
|
|
5072
|
-
1,
|
|
5073
|
-
"px",
|
|
5074
|
-
"<",
|
|
5075
|
-
"RES"
|
|
5076
|
-
]
|
|
5181
|
+
["py"]
|
|
5077
5182
|
],
|
|
5078
|
-
"
|
|
5183
|
+
"+",
|
|
5184
|
+
[5, "0.5"]
|
|
5185
|
+
],
|
|
5186
|
+
"*",
|
|
5187
|
+
"INV_RES"
|
|
5188
|
+
],
|
|
5189
|
+
"-",
|
|
5190
|
+
[
|
|
5191
|
+
7,
|
|
5192
|
+
"pos",
|
|
5193
|
+
"y"
|
|
5194
|
+
]
|
|
5195
|
+
]
|
|
5196
|
+
],
|
|
5197
|
+
[
|
|
5198
|
+
13,
|
|
5199
|
+
"offYSq",
|
|
5200
|
+
[
|
|
5201
|
+
1,
|
|
5202
|
+
"offY",
|
|
5203
|
+
"*",
|
|
5204
|
+
"offY"
|
|
5205
|
+
]
|
|
5206
|
+
],
|
|
5207
|
+
[
|
|
5208
|
+
14,
|
|
5209
|
+
[
|
|
5210
|
+
12,
|
|
5211
|
+
"px",
|
|
5212
|
+
"x0"
|
|
5213
|
+
],
|
|
5214
|
+
[
|
|
5215
|
+
1,
|
|
5216
|
+
"px",
|
|
5217
|
+
"<=",
|
|
5218
|
+
"x1"
|
|
5219
|
+
],
|
|
5220
|
+
[
|
|
5221
|
+
102,
|
|
5222
|
+
"++",
|
|
5223
|
+
"px"
|
|
5224
|
+
],
|
|
5225
|
+
[0, [[
|
|
5226
|
+
13,
|
|
5227
|
+
"offX",
|
|
5228
|
+
[
|
|
5229
|
+
1,
|
|
5230
|
+
[
|
|
5231
|
+
1,
|
|
5079
5232
|
[
|
|
5080
5233
|
1,
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5234
|
+
[
|
|
5235
|
+
1,
|
|
5236
|
+
[
|
|
5237
|
+
6,
|
|
5238
|
+
[
|
|
5239
|
+
7,
|
|
5240
|
+
"d",
|
|
5241
|
+
"f32"
|
|
5242
|
+
],
|
|
5243
|
+
["px"]
|
|
5244
|
+
],
|
|
5245
|
+
"+",
|
|
5246
|
+
[5, "0.5"]
|
|
5247
|
+
],
|
|
5248
|
+
"*",
|
|
5249
|
+
"INV_RES"
|
|
5250
|
+
],
|
|
5251
|
+
"*",
|
|
5252
|
+
"aspect"
|
|
5085
5253
|
],
|
|
5086
|
-
"
|
|
5254
|
+
"-",
|
|
5087
5255
|
[
|
|
5088
|
-
|
|
5089
|
-
"
|
|
5090
|
-
"
|
|
5091
|
-
"RES"
|
|
5256
|
+
7,
|
|
5257
|
+
"pos",
|
|
5258
|
+
"x"
|
|
5092
5259
|
]
|
|
5260
|
+
]
|
|
5261
|
+
], [
|
|
5262
|
+
11,
|
|
5263
|
+
[
|
|
5264
|
+
1,
|
|
5265
|
+
[
|
|
5266
|
+
1,
|
|
5267
|
+
[
|
|
5268
|
+
1,
|
|
5269
|
+
"offX",
|
|
5270
|
+
"*",
|
|
5271
|
+
"offX"
|
|
5272
|
+
],
|
|
5273
|
+
"+",
|
|
5274
|
+
"offYSq"
|
|
5275
|
+
],
|
|
5276
|
+
"<",
|
|
5277
|
+
"extSq"
|
|
5093
5278
|
],
|
|
5094
5279
|
[0, [
|
|
5095
5280
|
[
|
|
5096
5281
|
13,
|
|
5097
|
-
"
|
|
5282
|
+
"t",
|
|
5098
5283
|
[
|
|
5099
5284
|
1,
|
|
5100
5285
|
[
|
|
5101
5286
|
1,
|
|
5102
|
-
|
|
5103
|
-
1,
|
|
5104
|
-
[
|
|
5105
|
-
1,
|
|
5106
|
-
[
|
|
5107
|
-
6,
|
|
5108
|
-
[
|
|
5109
|
-
7,
|
|
5110
|
-
"d",
|
|
5111
|
-
"f32"
|
|
5112
|
-
],
|
|
5113
|
-
["px"]
|
|
5114
|
-
],
|
|
5115
|
-
"+",
|
|
5116
|
-
[5, "0.5"]
|
|
5117
|
-
],
|
|
5118
|
-
"*",
|
|
5119
|
-
"INV_RES"
|
|
5120
|
-
],
|
|
5287
|
+
"offX",
|
|
5121
5288
|
"*",
|
|
5122
5289
|
[
|
|
5123
5290
|
7,
|
|
5124
|
-
"
|
|
5125
|
-
"
|
|
5291
|
+
"dir",
|
|
5292
|
+
"x"
|
|
5126
5293
|
]
|
|
5127
5294
|
],
|
|
5128
|
-
"
|
|
5295
|
+
"+",
|
|
5129
5296
|
[
|
|
5130
|
-
|
|
5131
|
-
"
|
|
5132
|
-
"
|
|
5297
|
+
1,
|
|
5298
|
+
"offY",
|
|
5299
|
+
"*",
|
|
5300
|
+
[
|
|
5301
|
+
7,
|
|
5302
|
+
"dir",
|
|
5303
|
+
"y"
|
|
5304
|
+
]
|
|
5133
5305
|
]
|
|
5134
5306
|
]
|
|
5135
5307
|
],
|
|
5136
5308
|
[
|
|
5137
5309
|
13,
|
|
5138
|
-
"
|
|
5310
|
+
"n",
|
|
5139
5311
|
[
|
|
5140
5312
|
1,
|
|
5141
5313
|
[
|
|
5142
5314
|
1,
|
|
5315
|
+
"offX",
|
|
5316
|
+
"*",
|
|
5143
5317
|
[
|
|
5144
|
-
|
|
5318
|
+
4,
|
|
5319
|
+
"-",
|
|
5145
5320
|
[
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
],
|
|
5152
|
-
["py"]
|
|
5153
|
-
],
|
|
5154
|
-
"+",
|
|
5155
|
-
[5, "0.5"]
|
|
5156
|
-
],
|
|
5157
|
-
"*",
|
|
5158
|
-
"INV_RES"
|
|
5321
|
+
7,
|
|
5322
|
+
"dir",
|
|
5323
|
+
"y"
|
|
5324
|
+
]
|
|
5325
|
+
]
|
|
5159
5326
|
],
|
|
5160
|
-
"
|
|
5327
|
+
"+",
|
|
5161
5328
|
[
|
|
5162
|
-
|
|
5163
|
-
"
|
|
5164
|
-
"
|
|
5329
|
+
1,
|
|
5330
|
+
"offY",
|
|
5331
|
+
"*",
|
|
5332
|
+
[
|
|
5333
|
+
7,
|
|
5334
|
+
"dir",
|
|
5335
|
+
"x"
|
|
5336
|
+
]
|
|
5165
5337
|
]
|
|
5166
5338
|
]
|
|
5167
5339
|
],
|
|
5168
5340
|
[
|
|
5169
|
-
|
|
5341
|
+
13,
|
|
5342
|
+
"tGlow",
|
|
5170
5343
|
[
|
|
5171
5344
|
1,
|
|
5345
|
+
"t",
|
|
5346
|
+
"-",
|
|
5172
5347
|
[
|
|
5173
|
-
|
|
5348
|
+
6,
|
|
5174
5349
|
[
|
|
5175
|
-
|
|
5176
|
-
"
|
|
5177
|
-
"
|
|
5178
|
-
"offX"
|
|
5350
|
+
7,
|
|
5351
|
+
"std",
|
|
5352
|
+
"clamp"
|
|
5179
5353
|
],
|
|
5180
|
-
"+",
|
|
5181
5354
|
[
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5355
|
+
"t",
|
|
5356
|
+
[
|
|
5357
|
+
4,
|
|
5358
|
+
"-",
|
|
5359
|
+
"hl"
|
|
5360
|
+
],
|
|
5361
|
+
"hl"
|
|
5186
5362
|
]
|
|
5363
|
+
]
|
|
5364
|
+
]
|
|
5365
|
+
],
|
|
5366
|
+
[
|
|
5367
|
+
13,
|
|
5368
|
+
"tEval",
|
|
5369
|
+
[
|
|
5370
|
+
6,
|
|
5371
|
+
[
|
|
5372
|
+
7,
|
|
5373
|
+
"std",
|
|
5374
|
+
"select"
|
|
5187
5375
|
],
|
|
5188
|
-
"<",
|
|
5189
|
-
"extSq"
|
|
5190
|
-
],
|
|
5191
|
-
[0, [
|
|
5192
5376
|
[
|
|
5193
|
-
13,
|
|
5194
5377
|
"t",
|
|
5378
|
+
"tGlow",
|
|
5195
5379
|
[
|
|
5196
5380
|
1,
|
|
5197
5381
|
[
|
|
5198
|
-
|
|
5199
|
-
"offX",
|
|
5200
|
-
"*",
|
|
5382
|
+
6,
|
|
5201
5383
|
[
|
|
5202
5384
|
7,
|
|
5203
|
-
"
|
|
5204
|
-
"
|
|
5205
|
-
]
|
|
5385
|
+
"d",
|
|
5386
|
+
"f32"
|
|
5387
|
+
],
|
|
5388
|
+
["SOFT"]
|
|
5206
5389
|
],
|
|
5207
|
-
"
|
|
5208
|
-
[
|
|
5209
|
-
1,
|
|
5210
|
-
"offY",
|
|
5211
|
-
"*",
|
|
5212
|
-
[
|
|
5213
|
-
7,
|
|
5214
|
-
"dir",
|
|
5215
|
-
"y"
|
|
5216
|
-
]
|
|
5217
|
-
]
|
|
5390
|
+
">",
|
|
5391
|
+
[5, "0.5"]
|
|
5218
5392
|
]
|
|
5393
|
+
]
|
|
5394
|
+
]
|
|
5395
|
+
],
|
|
5396
|
+
[
|
|
5397
|
+
13,
|
|
5398
|
+
"tk",
|
|
5399
|
+
[
|
|
5400
|
+
6,
|
|
5401
|
+
[
|
|
5402
|
+
7,
|
|
5403
|
+
"std",
|
|
5404
|
+
"clamp"
|
|
5219
5405
|
],
|
|
5220
5406
|
[
|
|
5221
|
-
13,
|
|
5222
|
-
"n",
|
|
5223
5407
|
[
|
|
5224
5408
|
1,
|
|
5225
5409
|
[
|
|
5226
5410
|
1,
|
|
5227
|
-
"
|
|
5228
|
-
"
|
|
5229
|
-
|
|
5230
|
-
4,
|
|
5231
|
-
"-",
|
|
5232
|
-
[
|
|
5233
|
-
7,
|
|
5234
|
-
"dir",
|
|
5235
|
-
"y"
|
|
5236
|
-
]
|
|
5237
|
-
]
|
|
5411
|
+
"hl",
|
|
5412
|
+
"-",
|
|
5413
|
+
"t"
|
|
5238
5414
|
],
|
|
5239
|
-
"
|
|
5240
|
-
[
|
|
5241
|
-
1,
|
|
5242
|
-
"offY",
|
|
5243
|
-
"*",
|
|
5244
|
-
[
|
|
5245
|
-
7,
|
|
5246
|
-
"dir",
|
|
5247
|
-
"x"
|
|
5248
|
-
]
|
|
5249
|
-
]
|
|
5250
|
-
]
|
|
5251
|
-
],
|
|
5252
|
-
[
|
|
5253
|
-
13,
|
|
5254
|
-
"tGlow",
|
|
5255
|
-
[
|
|
5256
|
-
1,
|
|
5257
|
-
"t",
|
|
5258
|
-
"-",
|
|
5415
|
+
"/",
|
|
5259
5416
|
[
|
|
5260
5417
|
6,
|
|
5261
5418
|
[
|
|
5262
5419
|
7,
|
|
5263
5420
|
"std",
|
|
5264
|
-
"
|
|
5421
|
+
"max"
|
|
5265
5422
|
],
|
|
5266
|
-
[
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
],
|
|
5273
|
-
"hl"
|
|
5274
|
-
]
|
|
5423
|
+
[[
|
|
5424
|
+
1,
|
|
5425
|
+
"hl",
|
|
5426
|
+
"*",
|
|
5427
|
+
[5, "2"]
|
|
5428
|
+
], [5, "0.000001"]]
|
|
5275
5429
|
]
|
|
5276
|
-
]
|
|
5277
|
-
|
|
5430
|
+
],
|
|
5431
|
+
[5, "0"],
|
|
5432
|
+
[5, "1"]
|
|
5433
|
+
]
|
|
5434
|
+
]
|
|
5435
|
+
],
|
|
5436
|
+
[
|
|
5437
|
+
13,
|
|
5438
|
+
"bright",
|
|
5439
|
+
[
|
|
5440
|
+
1,
|
|
5441
|
+
[5, "1"],
|
|
5442
|
+
"-",
|
|
5278
5443
|
[
|
|
5279
|
-
|
|
5280
|
-
|
|
5444
|
+
1,
|
|
5445
|
+
[
|
|
5446
|
+
1,
|
|
5447
|
+
[5, "0.55"],
|
|
5448
|
+
"*",
|
|
5449
|
+
"tk"
|
|
5450
|
+
],
|
|
5451
|
+
"*",
|
|
5281
5452
|
[
|
|
5282
5453
|
6,
|
|
5283
5454
|
[
|
|
5284
5455
|
7,
|
|
5285
|
-
"
|
|
5286
|
-
"
|
|
5456
|
+
"d",
|
|
5457
|
+
"f32"
|
|
5287
5458
|
],
|
|
5288
|
-
[
|
|
5289
|
-
"t",
|
|
5290
|
-
"tGlow",
|
|
5291
|
-
[
|
|
5292
|
-
1,
|
|
5293
|
-
[
|
|
5294
|
-
6,
|
|
5295
|
-
[
|
|
5296
|
-
7,
|
|
5297
|
-
"d",
|
|
5298
|
-
"f32"
|
|
5299
|
-
],
|
|
5300
|
-
["SOFT"]
|
|
5301
|
-
],
|
|
5302
|
-
">",
|
|
5303
|
-
[5, "0.5"]
|
|
5304
|
-
]
|
|
5305
|
-
]
|
|
5459
|
+
["SOFT"]
|
|
5306
5460
|
]
|
|
5307
|
-
]
|
|
5461
|
+
]
|
|
5462
|
+
]
|
|
5463
|
+
],
|
|
5464
|
+
[
|
|
5465
|
+
13,
|
|
5466
|
+
"qEval",
|
|
5467
|
+
[
|
|
5468
|
+
1,
|
|
5308
5469
|
[
|
|
5309
|
-
|
|
5310
|
-
"tk",
|
|
5470
|
+
1,
|
|
5311
5471
|
[
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
"hl",
|
|
5324
|
-
"-",
|
|
5325
|
-
"t"
|
|
5326
|
-
],
|
|
5327
|
-
"/",
|
|
5328
|
-
[
|
|
5329
|
-
6,
|
|
5330
|
-
[
|
|
5331
|
-
7,
|
|
5332
|
-
"std",
|
|
5333
|
-
"max"
|
|
5334
|
-
],
|
|
5335
|
-
[[
|
|
5336
|
-
1,
|
|
5337
|
-
"hl",
|
|
5338
|
-
"*",
|
|
5339
|
-
[5, "2"]
|
|
5340
|
-
], [5, "0.000001"]]
|
|
5341
|
-
]
|
|
5342
|
-
],
|
|
5343
|
-
[5, "0"],
|
|
5344
|
-
[5, "1"]
|
|
5345
|
-
]
|
|
5472
|
+
1,
|
|
5473
|
+
"tEval",
|
|
5474
|
+
"*",
|
|
5475
|
+
"tEval"
|
|
5476
|
+
],
|
|
5477
|
+
"+",
|
|
5478
|
+
[
|
|
5479
|
+
1,
|
|
5480
|
+
"n",
|
|
5481
|
+
"*",
|
|
5482
|
+
"n"
|
|
5346
5483
|
]
|
|
5347
5484
|
],
|
|
5485
|
+
"*",
|
|
5486
|
+
"invR2"
|
|
5487
|
+
]
|
|
5488
|
+
],
|
|
5489
|
+
[
|
|
5490
|
+
13,
|
|
5491
|
+
"w",
|
|
5492
|
+
[
|
|
5493
|
+
1,
|
|
5348
5494
|
[
|
|
5349
|
-
|
|
5350
|
-
"
|
|
5495
|
+
6,
|
|
5496
|
+
"weightFn",
|
|
5351
5497
|
[
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
"
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
[
|
|
5358
|
-
1,
|
|
5359
|
-
[5, "0.55"],
|
|
5360
|
-
"*",
|
|
5361
|
-
"tk"
|
|
5362
|
-
],
|
|
5363
|
-
"*",
|
|
5364
|
-
[
|
|
5365
|
-
6,
|
|
5366
|
-
[
|
|
5367
|
-
7,
|
|
5368
|
-
"d",
|
|
5369
|
-
"f32"
|
|
5370
|
-
],
|
|
5371
|
-
["SOFT"]
|
|
5372
|
-
]
|
|
5373
|
-
]
|
|
5498
|
+
"qEval",
|
|
5499
|
+
"tEval",
|
|
5500
|
+
"n",
|
|
5501
|
+
"bodyR",
|
|
5502
|
+
"AA_W"
|
|
5374
5503
|
]
|
|
5375
5504
|
],
|
|
5505
|
+
"*",
|
|
5506
|
+
"bright"
|
|
5507
|
+
]
|
|
5508
|
+
],
|
|
5509
|
+
[
|
|
5510
|
+
13,
|
|
5511
|
+
"e",
|
|
5512
|
+
[
|
|
5513
|
+
6,
|
|
5376
5514
|
[
|
|
5377
|
-
|
|
5515
|
+
7,
|
|
5516
|
+
"d",
|
|
5517
|
+
"u32"
|
|
5518
|
+
],
|
|
5519
|
+
[[
|
|
5520
|
+
1,
|
|
5378
5521
|
"w",
|
|
5522
|
+
"*",
|
|
5379
5523
|
[
|
|
5380
|
-
|
|
5524
|
+
6,
|
|
5381
5525
|
[
|
|
5382
|
-
|
|
5383
|
-
"
|
|
5384
|
-
|
|
5385
|
-
"tEval",
|
|
5386
|
-
"n",
|
|
5387
|
-
"bodyR",
|
|
5388
|
-
"AA_W",
|
|
5389
|
-
[
|
|
5390
|
-
6,
|
|
5391
|
-
[
|
|
5392
|
-
7,
|
|
5393
|
-
"d",
|
|
5394
|
-
"f32"
|
|
5395
|
-
],
|
|
5396
|
-
["SOFT"]
|
|
5397
|
-
]
|
|
5398
|
-
]
|
|
5526
|
+
7,
|
|
5527
|
+
"d",
|
|
5528
|
+
"f32"
|
|
5399
5529
|
],
|
|
5400
|
-
"
|
|
5401
|
-
"bright"
|
|
5530
|
+
["GAIN"]
|
|
5402
5531
|
]
|
|
5403
|
-
]
|
|
5532
|
+
]]
|
|
5533
|
+
]
|
|
5534
|
+
],
|
|
5535
|
+
[
|
|
5536
|
+
11,
|
|
5537
|
+
[
|
|
5538
|
+
1,
|
|
5539
|
+
"e",
|
|
5540
|
+
">",
|
|
5541
|
+
[
|
|
5542
|
+
6,
|
|
5543
|
+
[
|
|
5544
|
+
7,
|
|
5545
|
+
"d",
|
|
5546
|
+
"u32"
|
|
5547
|
+
],
|
|
5548
|
+
[[5, "0"]]
|
|
5549
|
+
]
|
|
5550
|
+
],
|
|
5551
|
+
[0, [
|
|
5404
5552
|
[
|
|
5405
5553
|
13,
|
|
5406
|
-
"
|
|
5554
|
+
"idx",
|
|
5407
5555
|
[
|
|
5408
5556
|
6,
|
|
5409
5557
|
[
|
|
@@ -5413,149 +5561,111 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
5413
5561
|
],
|
|
5414
5562
|
[[
|
|
5415
5563
|
1,
|
|
5416
|
-
"w",
|
|
5417
|
-
"*",
|
|
5418
5564
|
[
|
|
5419
|
-
|
|
5565
|
+
1,
|
|
5566
|
+
"py",
|
|
5567
|
+
"*",
|
|
5420
5568
|
[
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5569
|
+
6,
|
|
5570
|
+
[
|
|
5571
|
+
7,
|
|
5572
|
+
"d",
|
|
5573
|
+
"i32"
|
|
5574
|
+
],
|
|
5575
|
+
["RES"]
|
|
5576
|
+
]
|
|
5577
|
+
],
|
|
5578
|
+
"+",
|
|
5579
|
+
"px"
|
|
5427
5580
|
]]
|
|
5428
5581
|
]
|
|
5429
5582
|
],
|
|
5430
5583
|
[
|
|
5431
|
-
|
|
5584
|
+
6,
|
|
5432
5585
|
[
|
|
5433
|
-
|
|
5434
|
-
"
|
|
5435
|
-
"
|
|
5586
|
+
7,
|
|
5587
|
+
"std",
|
|
5588
|
+
"atomicAdd"
|
|
5589
|
+
],
|
|
5590
|
+
[[
|
|
5591
|
+
8,
|
|
5436
5592
|
[
|
|
5437
|
-
|
|
5593
|
+
7,
|
|
5438
5594
|
[
|
|
5439
5595
|
7,
|
|
5440
|
-
"
|
|
5441
|
-
"
|
|
5596
|
+
"pfLayout",
|
|
5597
|
+
"$"
|
|
5442
5598
|
],
|
|
5443
|
-
|
|
5444
|
-
]
|
|
5445
|
-
],
|
|
5446
|
-
[0, [
|
|
5447
|
-
[
|
|
5448
|
-
13,
|
|
5449
|
-
"idx",
|
|
5450
|
-
[
|
|
5451
|
-
6,
|
|
5452
|
-
[
|
|
5453
|
-
7,
|
|
5454
|
-
"d",
|
|
5455
|
-
"u32"
|
|
5456
|
-
],
|
|
5457
|
-
[[
|
|
5458
|
-
1,
|
|
5459
|
-
[
|
|
5460
|
-
1,
|
|
5461
|
-
"py",
|
|
5462
|
-
"*",
|
|
5463
|
-
"RES"
|
|
5464
|
-
],
|
|
5465
|
-
"+",
|
|
5466
|
-
"px"
|
|
5467
|
-
]]
|
|
5468
|
-
]
|
|
5599
|
+
"accumE"
|
|
5469
5600
|
],
|
|
5601
|
+
"idx"
|
|
5602
|
+
], "e"]
|
|
5603
|
+
],
|
|
5604
|
+
[
|
|
5605
|
+
6,
|
|
5606
|
+
[
|
|
5607
|
+
7,
|
|
5608
|
+
"std",
|
|
5609
|
+
"atomicAdd"
|
|
5610
|
+
],
|
|
5611
|
+
[[
|
|
5612
|
+
8,
|
|
5470
5613
|
[
|
|
5471
|
-
|
|
5614
|
+
7,
|
|
5472
5615
|
[
|
|
5473
5616
|
7,
|
|
5474
|
-
"
|
|
5475
|
-
"
|
|
5617
|
+
"pfLayout",
|
|
5618
|
+
"$"
|
|
5476
5619
|
],
|
|
5477
|
-
|
|
5478
|
-
8,
|
|
5479
|
-
[
|
|
5480
|
-
7,
|
|
5481
|
-
[
|
|
5482
|
-
7,
|
|
5483
|
-
"pfLayout",
|
|
5484
|
-
"$"
|
|
5485
|
-
],
|
|
5486
|
-
"accumE"
|
|
5487
|
-
],
|
|
5488
|
-
"idx"
|
|
5489
|
-
], "e"]
|
|
5620
|
+
"accumS"
|
|
5490
5621
|
],
|
|
5622
|
+
"idx"
|
|
5623
|
+
], [
|
|
5624
|
+
6,
|
|
5491
5625
|
[
|
|
5492
|
-
|
|
5626
|
+
7,
|
|
5627
|
+
"d",
|
|
5628
|
+
"u32"
|
|
5629
|
+
],
|
|
5630
|
+
[[
|
|
5631
|
+
1,
|
|
5493
5632
|
[
|
|
5494
|
-
|
|
5495
|
-
"
|
|
5496
|
-
"
|
|
5633
|
+
1,
|
|
5634
|
+
"w",
|
|
5635
|
+
"*",
|
|
5636
|
+
"agitI"
|
|
5497
5637
|
],
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
[
|
|
5501
|
-
7,
|
|
5502
|
-
[
|
|
5503
|
-
7,
|
|
5504
|
-
"pfLayout",
|
|
5505
|
-
"$"
|
|
5506
|
-
],
|
|
5507
|
-
"accumS"
|
|
5508
|
-
],
|
|
5509
|
-
"idx"
|
|
5510
|
-
], [
|
|
5638
|
+
"*",
|
|
5639
|
+
[
|
|
5511
5640
|
6,
|
|
5512
5641
|
[
|
|
5513
5642
|
7,
|
|
5514
5643
|
"d",
|
|
5515
|
-
"
|
|
5644
|
+
"f32"
|
|
5516
5645
|
],
|
|
5517
|
-
[
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
1,
|
|
5521
|
-
"w",
|
|
5522
|
-
"*",
|
|
5523
|
-
"agitI"
|
|
5524
|
-
],
|
|
5525
|
-
"*",
|
|
5526
|
-
[
|
|
5527
|
-
6,
|
|
5528
|
-
[
|
|
5529
|
-
7,
|
|
5530
|
-
"d",
|
|
5531
|
-
"f32"
|
|
5532
|
-
],
|
|
5533
|
-
["GAIN"]
|
|
5534
|
-
]
|
|
5535
|
-
]]
|
|
5536
|
-
]]
|
|
5537
|
-
]
|
|
5646
|
+
["GAIN"]
|
|
5647
|
+
]
|
|
5648
|
+
]]
|
|
5538
5649
|
]]
|
|
5539
5650
|
]
|
|
5540
5651
|
]]
|
|
5541
5652
|
]
|
|
5542
5653
|
]]
|
|
5543
|
-
]
|
|
5544
|
-
]
|
|
5545
|
-
]]
|
|
5654
|
+
]]]
|
|
5655
|
+
]
|
|
5656
|
+
]]
|
|
5546
5657
|
]
|
|
5547
5658
|
]],
|
|
5548
5659
|
"externalNames": [
|
|
5549
5660
|
"pfLayout",
|
|
5550
5661
|
"d",
|
|
5551
5662
|
"std",
|
|
5663
|
+
"SPLAT_R",
|
|
5664
|
+
"INV_RES",
|
|
5552
5665
|
"HL",
|
|
5553
5666
|
"EXT",
|
|
5554
5667
|
"AA_W",
|
|
5555
5668
|
"RES",
|
|
5556
|
-
"SPLAT_WIN",
|
|
5557
|
-
"SPLAT_R",
|
|
5558
|
-
"INV_RES",
|
|
5559
5669
|
"SOFT",
|
|
5560
5670
|
"weightFn",
|
|
5561
5671
|
"GAIN"
|
|
@@ -5563,15 +5673,14 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
5563
5673
|
},
|
|
5564
5674
|
externals: () => ({
|
|
5565
5675
|
pfLayout,
|
|
5566
|
-
d,
|
|
5567
|
-
std,
|
|
5676
|
+
d: data_exports,
|
|
5677
|
+
std: std_exports,
|
|
5678
|
+
SPLAT_R,
|
|
5679
|
+
INV_RES,
|
|
5568
5680
|
HL,
|
|
5569
5681
|
EXT,
|
|
5570
5682
|
AA_W,
|
|
5571
5683
|
RES,
|
|
5572
|
-
SPLAT_WIN,
|
|
5573
|
-
SPLAT_R,
|
|
5574
|
-
INV_RES,
|
|
5575
5684
|
SOFT,
|
|
5576
5685
|
weightFn,
|
|
5577
5686
|
GAIN
|
|
@@ -5579,25 +5688,275 @@ function makeParticleFlowSplatKernel(shape) {
|
|
|
5579
5688
|
}) && $.f)({})).$name("particleFlowSplat");
|
|
5580
5689
|
}
|
|
5581
5690
|
const particleFlowSplatKernel = makeParticleFlowSplatKernel("streak");
|
|
5582
|
-
function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
5691
|
+
function makeParticleFlowResolveKernel(colorSpaceMode, trailsOn) {
|
|
5583
5692
|
const mixFn = mixColorsVariants[colorSpaceMode] ?? mixColorsLinear;
|
|
5584
|
-
|
|
5693
|
+
const composite = trailsOn ? src_default.fn([
|
|
5694
|
+
vec4f,
|
|
5695
|
+
f32,
|
|
5696
|
+
u32
|
|
5697
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((col, curA, idx) => {
|
|
5585
5698
|
"use gpu";
|
|
5586
|
-
const prm = pfLayout.$.params;
|
|
5587
|
-
const idx = __tsover_add(__tsover_mul(y, d.u32(RES)), x);
|
|
5588
|
-
const eRaw = d.f32(std.atomicLoad(pfLayout.$.accumE[idx]));
|
|
5589
|
-
const sRaw = d.f32(std.atomicLoad(pfLayout.$.accumS[idx]));
|
|
5590
|
-
const energy = __tsover_mul(eRaw, __tsover_div(1, 255));
|
|
5591
|
-
const agitAvg = __tsover_div(sRaw, std.max(eRaw, 1));
|
|
5592
|
-
const col = mixFn(prm.colA, prm.colB, std.clamp(agitAvg, 0, 1));
|
|
5593
|
-
const curA = __tsover_mul(__tsover_sub(1, std.exp(__tsover_mul(energy, -1.6))), col.w);
|
|
5594
5699
|
const prev = pfLayout.$.trailBuf[idx];
|
|
5595
|
-
const prevA = __tsover_mul(prev.w,
|
|
5700
|
+
const prevA = __tsover_mul(prev.w, pfLayout.$.params.trails);
|
|
5596
5701
|
const win = curA >= prevA;
|
|
5597
|
-
const
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5702
|
+
const rgb = select(vec3f(prev.x, prev.y, prev.z), vec3f(col.x, col.y, col.z), win);
|
|
5703
|
+
return vec4f(rgb.x, rgb.y, rgb.z, max(curA, prevA));
|
|
5704
|
+
}), {
|
|
5705
|
+
v: 1,
|
|
5706
|
+
name: void 0,
|
|
5707
|
+
ast: {
|
|
5708
|
+
"params": [
|
|
5709
|
+
{
|
|
5710
|
+
"type": "i",
|
|
5711
|
+
"name": "col"
|
|
5712
|
+
},
|
|
5713
|
+
{
|
|
5714
|
+
"type": "i",
|
|
5715
|
+
"name": "curA"
|
|
5716
|
+
},
|
|
5717
|
+
{
|
|
5718
|
+
"type": "i",
|
|
5719
|
+
"name": "idx"
|
|
5720
|
+
}
|
|
5721
|
+
],
|
|
5722
|
+
"body": [0, [
|
|
5723
|
+
[
|
|
5724
|
+
13,
|
|
5725
|
+
"prev",
|
|
5726
|
+
[
|
|
5727
|
+
8,
|
|
5728
|
+
[
|
|
5729
|
+
7,
|
|
5730
|
+
[
|
|
5731
|
+
7,
|
|
5732
|
+
"pfLayout",
|
|
5733
|
+
"$"
|
|
5734
|
+
],
|
|
5735
|
+
"trailBuf"
|
|
5736
|
+
],
|
|
5737
|
+
"idx"
|
|
5738
|
+
]
|
|
5739
|
+
],
|
|
5740
|
+
[
|
|
5741
|
+
13,
|
|
5742
|
+
"prevA",
|
|
5743
|
+
[
|
|
5744
|
+
1,
|
|
5745
|
+
[
|
|
5746
|
+
7,
|
|
5747
|
+
"prev",
|
|
5748
|
+
"w"
|
|
5749
|
+
],
|
|
5750
|
+
"*",
|
|
5751
|
+
[
|
|
5752
|
+
7,
|
|
5753
|
+
[
|
|
5754
|
+
7,
|
|
5755
|
+
[
|
|
5756
|
+
7,
|
|
5757
|
+
"pfLayout",
|
|
5758
|
+
"$"
|
|
5759
|
+
],
|
|
5760
|
+
"params"
|
|
5761
|
+
],
|
|
5762
|
+
"trails"
|
|
5763
|
+
]
|
|
5764
|
+
]
|
|
5765
|
+
],
|
|
5766
|
+
[
|
|
5767
|
+
13,
|
|
5768
|
+
"win",
|
|
5769
|
+
[
|
|
5770
|
+
1,
|
|
5771
|
+
"curA",
|
|
5772
|
+
">=",
|
|
5773
|
+
"prevA"
|
|
5774
|
+
]
|
|
5775
|
+
],
|
|
5776
|
+
[
|
|
5777
|
+
13,
|
|
5778
|
+
"rgb",
|
|
5779
|
+
[
|
|
5780
|
+
6,
|
|
5781
|
+
[
|
|
5782
|
+
7,
|
|
5783
|
+
"std",
|
|
5784
|
+
"select"
|
|
5785
|
+
],
|
|
5786
|
+
[
|
|
5787
|
+
[
|
|
5788
|
+
6,
|
|
5789
|
+
[
|
|
5790
|
+
7,
|
|
5791
|
+
"d",
|
|
5792
|
+
"vec3f"
|
|
5793
|
+
],
|
|
5794
|
+
[
|
|
5795
|
+
[
|
|
5796
|
+
7,
|
|
5797
|
+
"prev",
|
|
5798
|
+
"x"
|
|
5799
|
+
],
|
|
5800
|
+
[
|
|
5801
|
+
7,
|
|
5802
|
+
"prev",
|
|
5803
|
+
"y"
|
|
5804
|
+
],
|
|
5805
|
+
[
|
|
5806
|
+
7,
|
|
5807
|
+
"prev",
|
|
5808
|
+
"z"
|
|
5809
|
+
]
|
|
5810
|
+
]
|
|
5811
|
+
],
|
|
5812
|
+
[
|
|
5813
|
+
6,
|
|
5814
|
+
[
|
|
5815
|
+
7,
|
|
5816
|
+
"d",
|
|
5817
|
+
"vec3f"
|
|
5818
|
+
],
|
|
5819
|
+
[
|
|
5820
|
+
[
|
|
5821
|
+
7,
|
|
5822
|
+
"col",
|
|
5823
|
+
"x"
|
|
5824
|
+
],
|
|
5825
|
+
[
|
|
5826
|
+
7,
|
|
5827
|
+
"col",
|
|
5828
|
+
"y"
|
|
5829
|
+
],
|
|
5830
|
+
[
|
|
5831
|
+
7,
|
|
5832
|
+
"col",
|
|
5833
|
+
"z"
|
|
5834
|
+
]
|
|
5835
|
+
]
|
|
5836
|
+
],
|
|
5837
|
+
"win"
|
|
5838
|
+
]
|
|
5839
|
+
]
|
|
5840
|
+
],
|
|
5841
|
+
[10, [
|
|
5842
|
+
6,
|
|
5843
|
+
[
|
|
5844
|
+
7,
|
|
5845
|
+
"d",
|
|
5846
|
+
"vec4f"
|
|
5847
|
+
],
|
|
5848
|
+
[
|
|
5849
|
+
[
|
|
5850
|
+
7,
|
|
5851
|
+
"rgb",
|
|
5852
|
+
"x"
|
|
5853
|
+
],
|
|
5854
|
+
[
|
|
5855
|
+
7,
|
|
5856
|
+
"rgb",
|
|
5857
|
+
"y"
|
|
5858
|
+
],
|
|
5859
|
+
[
|
|
5860
|
+
7,
|
|
5861
|
+
"rgb",
|
|
5862
|
+
"z"
|
|
5863
|
+
],
|
|
5864
|
+
[
|
|
5865
|
+
6,
|
|
5866
|
+
[
|
|
5867
|
+
7,
|
|
5868
|
+
"std",
|
|
5869
|
+
"max"
|
|
5870
|
+
],
|
|
5871
|
+
["curA", "prevA"]
|
|
5872
|
+
]
|
|
5873
|
+
]
|
|
5874
|
+
]]
|
|
5875
|
+
]],
|
|
5876
|
+
"externalNames": [
|
|
5877
|
+
"pfLayout",
|
|
5878
|
+
"std",
|
|
5879
|
+
"d"
|
|
5880
|
+
]
|
|
5881
|
+
},
|
|
5882
|
+
externals: () => ({
|
|
5883
|
+
pfLayout,
|
|
5884
|
+
std: std_exports,
|
|
5885
|
+
d: data_exports
|
|
5886
|
+
})
|
|
5887
|
+
}) && $.f)({})).$name("particleFlowTrailComposite") : src_default.fn([
|
|
5888
|
+
vec4f,
|
|
5889
|
+
f32,
|
|
5890
|
+
u32
|
|
5891
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((col, curA, _idx) => {
|
|
5892
|
+
"use gpu";
|
|
5893
|
+
return vec4f(col.x, col.y, col.z, curA);
|
|
5894
|
+
}), {
|
|
5895
|
+
v: 1,
|
|
5896
|
+
name: void 0,
|
|
5897
|
+
ast: {
|
|
5898
|
+
"params": [
|
|
5899
|
+
{
|
|
5900
|
+
"type": "i",
|
|
5901
|
+
"name": "col"
|
|
5902
|
+
},
|
|
5903
|
+
{
|
|
5904
|
+
"type": "i",
|
|
5905
|
+
"name": "curA"
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
"type": "i",
|
|
5909
|
+
"name": "_idx"
|
|
5910
|
+
}
|
|
5911
|
+
],
|
|
5912
|
+
"body": [0, [[10, [
|
|
5913
|
+
6,
|
|
5914
|
+
[
|
|
5915
|
+
7,
|
|
5916
|
+
"d",
|
|
5917
|
+
"vec4f"
|
|
5918
|
+
],
|
|
5919
|
+
[
|
|
5920
|
+
[
|
|
5921
|
+
7,
|
|
5922
|
+
"col",
|
|
5923
|
+
"x"
|
|
5924
|
+
],
|
|
5925
|
+
[
|
|
5926
|
+
7,
|
|
5927
|
+
"col",
|
|
5928
|
+
"y"
|
|
5929
|
+
],
|
|
5930
|
+
[
|
|
5931
|
+
7,
|
|
5932
|
+
"col",
|
|
5933
|
+
"z"
|
|
5934
|
+
],
|
|
5935
|
+
"curA"
|
|
5936
|
+
]
|
|
5937
|
+
]]]],
|
|
5938
|
+
"externalNames": ["d"]
|
|
5939
|
+
},
|
|
5940
|
+
externals: () => ({ d: data_exports })
|
|
5941
|
+
}) && $.f)({})).$name("particleFlowTrailComposite");
|
|
5942
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
5943
|
+
"use gpu";
|
|
5944
|
+
const prm = pfLayout.$.params;
|
|
5945
|
+
const idx = __tsover_add(__tsover_mul(y, u32(RES)), x);
|
|
5946
|
+
const eRaw = f32(atomicLoad(pfLayout.$.accumE[idx]));
|
|
5947
|
+
atomicStore(pfLayout.$.accumE[idx], u32(0));
|
|
5948
|
+
const sRaw = f32(atomicLoad(pfLayout.$.accumS[idx]));
|
|
5949
|
+
atomicStore(pfLayout.$.accumS[idx], u32(0));
|
|
5950
|
+
const energy = __tsover_mul(eRaw, __tsover_div(1, 255));
|
|
5951
|
+
let col = vec4f(prm.colA);
|
|
5952
|
+
if (eRaw > 0) {
|
|
5953
|
+
const agitAvg = __tsover_div(sRaw, max(eRaw, 1));
|
|
5954
|
+
col = mixFn(prm.colA, prm.colB, clamp(agitAvg, 0, 1));
|
|
5955
|
+
}
|
|
5956
|
+
const curA = __tsover_mul(__tsover_sub(1, exp(__tsover_mul(energy, -1.6))), col.w);
|
|
5957
|
+
const out = composite(col, curA, idx);
|
|
5958
|
+
pfLayout.$.trailBuf[idx] = vec4f(out);
|
|
5959
|
+
textureStore(pfLayout.$.outTex, vec2u(x, y), out);
|
|
5601
5960
|
}), {
|
|
5602
5961
|
v: 1,
|
|
5603
5962
|
name: void 0,
|
|
@@ -5679,6 +6038,35 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
5679
6038
|
]]
|
|
5680
6039
|
]
|
|
5681
6040
|
],
|
|
6041
|
+
[
|
|
6042
|
+
6,
|
|
6043
|
+
[
|
|
6044
|
+
7,
|
|
6045
|
+
"std",
|
|
6046
|
+
"atomicStore"
|
|
6047
|
+
],
|
|
6048
|
+
[[
|
|
6049
|
+
8,
|
|
6050
|
+
[
|
|
6051
|
+
7,
|
|
6052
|
+
[
|
|
6053
|
+
7,
|
|
6054
|
+
"pfLayout",
|
|
6055
|
+
"$"
|
|
6056
|
+
],
|
|
6057
|
+
"accumE"
|
|
6058
|
+
],
|
|
6059
|
+
"idx"
|
|
6060
|
+
], [
|
|
6061
|
+
6,
|
|
6062
|
+
[
|
|
6063
|
+
7,
|
|
6064
|
+
"d",
|
|
6065
|
+
"u32"
|
|
6066
|
+
],
|
|
6067
|
+
[[5, "0"]]
|
|
6068
|
+
]]
|
|
6069
|
+
],
|
|
5682
6070
|
[
|
|
5683
6071
|
13,
|
|
5684
6072
|
"sRaw",
|
|
@@ -5712,6 +6100,35 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
5712
6100
|
]]
|
|
5713
6101
|
]
|
|
5714
6102
|
],
|
|
6103
|
+
[
|
|
6104
|
+
6,
|
|
6105
|
+
[
|
|
6106
|
+
7,
|
|
6107
|
+
"std",
|
|
6108
|
+
"atomicStore"
|
|
6109
|
+
],
|
|
6110
|
+
[[
|
|
6111
|
+
8,
|
|
6112
|
+
[
|
|
6113
|
+
7,
|
|
6114
|
+
[
|
|
6115
|
+
7,
|
|
6116
|
+
"pfLayout",
|
|
6117
|
+
"$"
|
|
6118
|
+
],
|
|
6119
|
+
"accumS"
|
|
6120
|
+
],
|
|
6121
|
+
"idx"
|
|
6122
|
+
], [
|
|
6123
|
+
6,
|
|
6124
|
+
[
|
|
6125
|
+
7,
|
|
6126
|
+
"d",
|
|
6127
|
+
"u32"
|
|
6128
|
+
],
|
|
6129
|
+
[[5, "0"]]
|
|
6130
|
+
]]
|
|
6131
|
+
],
|
|
5715
6132
|
[
|
|
5716
6133
|
13,
|
|
5717
6134
|
"energy",
|
|
@@ -5728,55 +6145,81 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
5728
6145
|
]
|
|
5729
6146
|
],
|
|
5730
6147
|
[
|
|
5731
|
-
|
|
5732
|
-
"
|
|
6148
|
+
12,
|
|
6149
|
+
"col",
|
|
5733
6150
|
[
|
|
5734
|
-
|
|
5735
|
-
"sRaw",
|
|
5736
|
-
"/",
|
|
6151
|
+
6,
|
|
5737
6152
|
[
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
6153
|
+
7,
|
|
6154
|
+
"d",
|
|
6155
|
+
"vec4f"
|
|
6156
|
+
],
|
|
6157
|
+
[[
|
|
6158
|
+
7,
|
|
6159
|
+
"prm",
|
|
6160
|
+
"colA"
|
|
6161
|
+
]]
|
|
5746
6162
|
]
|
|
5747
6163
|
],
|
|
5748
6164
|
[
|
|
5749
|
-
|
|
5750
|
-
"col",
|
|
6165
|
+
11,
|
|
5751
6166
|
[
|
|
5752
|
-
|
|
5753
|
-
"
|
|
6167
|
+
1,
|
|
6168
|
+
"eRaw",
|
|
6169
|
+
">",
|
|
6170
|
+
[5, "0"]
|
|
6171
|
+
],
|
|
6172
|
+
[0, [[
|
|
6173
|
+
13,
|
|
6174
|
+
"agitAvg",
|
|
5754
6175
|
[
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
"colA"
|
|
5759
|
-
],
|
|
5760
|
-
[
|
|
5761
|
-
7,
|
|
5762
|
-
"prm",
|
|
5763
|
-
"colB"
|
|
5764
|
-
],
|
|
6176
|
+
1,
|
|
6177
|
+
"sRaw",
|
|
6178
|
+
"/",
|
|
5765
6179
|
[
|
|
5766
6180
|
6,
|
|
5767
6181
|
[
|
|
5768
6182
|
7,
|
|
5769
6183
|
"std",
|
|
5770
|
-
"
|
|
6184
|
+
"max"
|
|
5771
6185
|
],
|
|
6186
|
+
["eRaw", [5, "1"]]
|
|
6187
|
+
]
|
|
6188
|
+
]
|
|
6189
|
+
], [
|
|
6190
|
+
2,
|
|
6191
|
+
"col",
|
|
6192
|
+
"=",
|
|
6193
|
+
[
|
|
6194
|
+
6,
|
|
6195
|
+
"mixFn",
|
|
6196
|
+
[
|
|
5772
6197
|
[
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
6198
|
+
7,
|
|
6199
|
+
"prm",
|
|
6200
|
+
"colA"
|
|
6201
|
+
],
|
|
6202
|
+
[
|
|
6203
|
+
7,
|
|
6204
|
+
"prm",
|
|
6205
|
+
"colB"
|
|
6206
|
+
],
|
|
6207
|
+
[
|
|
6208
|
+
6,
|
|
6209
|
+
[
|
|
6210
|
+
7,
|
|
6211
|
+
"std",
|
|
6212
|
+
"clamp"
|
|
6213
|
+
],
|
|
6214
|
+
[
|
|
6215
|
+
"agitAvg",
|
|
6216
|
+
[5, "0"],
|
|
6217
|
+
[5, "1"]
|
|
6218
|
+
]
|
|
5776
6219
|
]
|
|
5777
6220
|
]
|
|
5778
6221
|
]
|
|
5779
|
-
]
|
|
6222
|
+
]]]
|
|
5780
6223
|
],
|
|
5781
6224
|
[
|
|
5782
6225
|
13,
|
|
@@ -5816,124 +6259,14 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
5816
6259
|
],
|
|
5817
6260
|
[
|
|
5818
6261
|
13,
|
|
5819
|
-
"
|
|
5820
|
-
[
|
|
5821
|
-
8,
|
|
5822
|
-
[
|
|
5823
|
-
7,
|
|
5824
|
-
[
|
|
5825
|
-
7,
|
|
5826
|
-
"pfLayout",
|
|
5827
|
-
"$"
|
|
5828
|
-
],
|
|
5829
|
-
"trailBuf"
|
|
5830
|
-
],
|
|
5831
|
-
"idx"
|
|
5832
|
-
]
|
|
5833
|
-
],
|
|
5834
|
-
[
|
|
5835
|
-
13,
|
|
5836
|
-
"prevA",
|
|
5837
|
-
[
|
|
5838
|
-
1,
|
|
5839
|
-
[
|
|
5840
|
-
7,
|
|
5841
|
-
"prev",
|
|
5842
|
-
"w"
|
|
5843
|
-
],
|
|
5844
|
-
"*",
|
|
5845
|
-
[
|
|
5846
|
-
7,
|
|
5847
|
-
"prm",
|
|
5848
|
-
"trails"
|
|
5849
|
-
]
|
|
5850
|
-
]
|
|
5851
|
-
],
|
|
5852
|
-
[
|
|
5853
|
-
13,
|
|
5854
|
-
"win",
|
|
5855
|
-
[
|
|
5856
|
-
1,
|
|
5857
|
-
"curA",
|
|
5858
|
-
">=",
|
|
5859
|
-
"prevA"
|
|
5860
|
-
]
|
|
5861
|
-
],
|
|
5862
|
-
[
|
|
5863
|
-
13,
|
|
5864
|
-
"outA",
|
|
5865
|
-
[
|
|
5866
|
-
6,
|
|
5867
|
-
[
|
|
5868
|
-
7,
|
|
5869
|
-
"std",
|
|
5870
|
-
"max"
|
|
5871
|
-
],
|
|
5872
|
-
["curA", "prevA"]
|
|
5873
|
-
]
|
|
5874
|
-
],
|
|
5875
|
-
[
|
|
5876
|
-
13,
|
|
5877
|
-
"outRGB",
|
|
6262
|
+
"out",
|
|
5878
6263
|
[
|
|
5879
6264
|
6,
|
|
6265
|
+
"composite",
|
|
5880
6266
|
[
|
|
5881
|
-
|
|
5882
|
-
"
|
|
5883
|
-
"
|
|
5884
|
-
],
|
|
5885
|
-
[
|
|
5886
|
-
[
|
|
5887
|
-
6,
|
|
5888
|
-
[
|
|
5889
|
-
7,
|
|
5890
|
-
"d",
|
|
5891
|
-
"vec3f"
|
|
5892
|
-
],
|
|
5893
|
-
[
|
|
5894
|
-
[
|
|
5895
|
-
7,
|
|
5896
|
-
"prev",
|
|
5897
|
-
"x"
|
|
5898
|
-
],
|
|
5899
|
-
[
|
|
5900
|
-
7,
|
|
5901
|
-
"prev",
|
|
5902
|
-
"y"
|
|
5903
|
-
],
|
|
5904
|
-
[
|
|
5905
|
-
7,
|
|
5906
|
-
"prev",
|
|
5907
|
-
"z"
|
|
5908
|
-
]
|
|
5909
|
-
]
|
|
5910
|
-
],
|
|
5911
|
-
[
|
|
5912
|
-
6,
|
|
5913
|
-
[
|
|
5914
|
-
7,
|
|
5915
|
-
"d",
|
|
5916
|
-
"vec3f"
|
|
5917
|
-
],
|
|
5918
|
-
[
|
|
5919
|
-
[
|
|
5920
|
-
7,
|
|
5921
|
-
"col",
|
|
5922
|
-
"x"
|
|
5923
|
-
],
|
|
5924
|
-
[
|
|
5925
|
-
7,
|
|
5926
|
-
"col",
|
|
5927
|
-
"y"
|
|
5928
|
-
],
|
|
5929
|
-
[
|
|
5930
|
-
7,
|
|
5931
|
-
"col",
|
|
5932
|
-
"z"
|
|
5933
|
-
]
|
|
5934
|
-
]
|
|
5935
|
-
],
|
|
5936
|
-
"win"
|
|
6267
|
+
"col",
|
|
6268
|
+
"curA",
|
|
6269
|
+
"idx"
|
|
5937
6270
|
]
|
|
5938
6271
|
]
|
|
5939
6272
|
],
|
|
@@ -5960,24 +6293,7 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
5960
6293
|
"d",
|
|
5961
6294
|
"vec4f"
|
|
5962
6295
|
],
|
|
5963
|
-
[
|
|
5964
|
-
[
|
|
5965
|
-
7,
|
|
5966
|
-
"outRGB",
|
|
5967
|
-
"x"
|
|
5968
|
-
],
|
|
5969
|
-
[
|
|
5970
|
-
7,
|
|
5971
|
-
"outRGB",
|
|
5972
|
-
"y"
|
|
5973
|
-
],
|
|
5974
|
-
[
|
|
5975
|
-
7,
|
|
5976
|
-
"outRGB",
|
|
5977
|
-
"z"
|
|
5978
|
-
],
|
|
5979
|
-
"outA"
|
|
5980
|
-
]
|
|
6296
|
+
["out"]
|
|
5981
6297
|
]
|
|
5982
6298
|
],
|
|
5983
6299
|
[
|
|
@@ -6006,32 +6322,7 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
6006
6322
|
],
|
|
6007
6323
|
["x", "y"]
|
|
6008
6324
|
],
|
|
6009
|
-
|
|
6010
|
-
6,
|
|
6011
|
-
[
|
|
6012
|
-
7,
|
|
6013
|
-
"d",
|
|
6014
|
-
"vec4f"
|
|
6015
|
-
],
|
|
6016
|
-
[
|
|
6017
|
-
[
|
|
6018
|
-
7,
|
|
6019
|
-
"outRGB",
|
|
6020
|
-
"x"
|
|
6021
|
-
],
|
|
6022
|
-
[
|
|
6023
|
-
7,
|
|
6024
|
-
"outRGB",
|
|
6025
|
-
"y"
|
|
6026
|
-
],
|
|
6027
|
-
[
|
|
6028
|
-
7,
|
|
6029
|
-
"outRGB",
|
|
6030
|
-
"z"
|
|
6031
|
-
],
|
|
6032
|
-
"outA"
|
|
6033
|
-
]
|
|
6034
|
-
]
|
|
6325
|
+
"out"
|
|
6035
6326
|
]
|
|
6036
6327
|
]
|
|
6037
6328
|
]],
|
|
@@ -6040,19 +6331,21 @@ function makeParticleFlowResolveKernel(colorSpaceMode) {
|
|
|
6040
6331
|
"d",
|
|
6041
6332
|
"RES",
|
|
6042
6333
|
"std",
|
|
6043
|
-
"mixFn"
|
|
6334
|
+
"mixFn",
|
|
6335
|
+
"composite"
|
|
6044
6336
|
]
|
|
6045
6337
|
},
|
|
6046
6338
|
externals: () => ({
|
|
6047
6339
|
pfLayout,
|
|
6048
|
-
d,
|
|
6340
|
+
d: data_exports,
|
|
6049
6341
|
RES,
|
|
6050
|
-
std,
|
|
6051
|
-
mixFn
|
|
6342
|
+
std: std_exports,
|
|
6343
|
+
mixFn,
|
|
6344
|
+
composite
|
|
6052
6345
|
})
|
|
6053
6346
|
}) && $.f)({})).$name("particleFlowResolve");
|
|
6054
6347
|
}
|
|
6055
|
-
const particleFlowResolveKernel = makeParticleFlowResolveKernel(2);
|
|
6348
|
+
const particleFlowResolveKernel = makeParticleFlowResolveKernel(2, false);
|
|
6056
6349
|
const componentDefinition = {
|
|
6057
6350
|
name: "ParticleFlow",
|
|
6058
6351
|
boundingBoxDeclaration: { aspectRatio: null },
|
|
@@ -6131,6 +6424,7 @@ const componentDefinition = {
|
|
|
6131
6424
|
},
|
|
6132
6425
|
trails: {
|
|
6133
6426
|
default: 0,
|
|
6427
|
+
compileTimeWhen: (previousValue, newValue) => previousValue > 0 !== newValue > 0,
|
|
6134
6428
|
description: "How long each particle's motion trail persists — 0 draws crisp dust, 1 leaves long flowing ribbons",
|
|
6135
6429
|
ui: {
|
|
6136
6430
|
type: "range",
|
|
@@ -6206,14 +6500,14 @@ const componentDefinition = {
|
|
|
6206
6500
|
const { gpu, getCpuValue, registerComputeTexture, onCleanup } = params;
|
|
6207
6501
|
const root = gpu?.root;
|
|
6208
6502
|
if (!root) return null;
|
|
6209
|
-
const velA = createStateBuffer(root,
|
|
6210
|
-
const velB = createStateBuffer(root,
|
|
6211
|
-
const pressure = createStateBuffer(root,
|
|
6212
|
-
const divergence = createStateBuffer(root,
|
|
6213
|
-
const particles = createStateBuffer(root,
|
|
6214
|
-
const accumE = createStateBuffer(root,
|
|
6215
|
-
const accumS = createStateBuffer(root,
|
|
6216
|
-
const trailBuf = createStateBuffer(root,
|
|
6503
|
+
const velA = createStateBuffer(root, vec4f, FLUID_COUNT);
|
|
6504
|
+
const velB = createStateBuffer(root, vec4f, FLUID_COUNT);
|
|
6505
|
+
const pressure = createStateBuffer(root, f32, FLUID_COUNT);
|
|
6506
|
+
const divergence = createStateBuffer(root, f32, FLUID_COUNT);
|
|
6507
|
+
const particles = createStateBuffer(root, vec4f, MAX_PARTICLES);
|
|
6508
|
+
const accumE = createStateBuffer(root, atomic(u32), RES * RES);
|
|
6509
|
+
const accumS = createStateBuffer(root, atomic(u32), RES * RES);
|
|
6510
|
+
const trailBuf = createStateBuffer(root, vec4f, RES * RES);
|
|
6217
6511
|
const velTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
6218
6512
|
size: [N, N],
|
|
6219
6513
|
format: VEL_FORMAT
|
|
@@ -6308,8 +6602,9 @@ const componentDefinition = {
|
|
|
6308
6602
|
const gradSubtract = mkFluid(particleFlowGradSubtractKernel);
|
|
6309
6603
|
const advectVel = mkFluid(particleFlowAdvectVelKernel);
|
|
6310
6604
|
const copyVel = mkFluid(particleFlowCopyVelKernel);
|
|
6605
|
+
const trailsCpu = getCpuValue("trails");
|
|
6311
6606
|
const splatKernel = makeParticleFlowSplatKernel(getCpuValue("shape") || "streak");
|
|
6312
|
-
const resolveKernel = makeParticleFlowResolveKernel(getCpuValue("colorSpace") ?? 2);
|
|
6607
|
+
const resolveKernel = makeParticleFlowResolveKernel(getCpuValue("colorSpace") ?? 2, typeof trailsCpu === "number" && trailsCpu > 0);
|
|
6313
6608
|
const init = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
6314
6609
|
"use gpu";
|
|
6315
6610
|
particleFlowInitKernel(i);
|
|
@@ -6330,29 +6625,6 @@ const componentDefinition = {
|
|
|
6330
6625
|
},
|
|
6331
6626
|
externals: () => ({ particleFlowInitKernel })
|
|
6332
6627
|
}) && $.f)({})).with(pfBg);
|
|
6333
|
-
const clearAccum = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
6334
|
-
"use gpu";
|
|
6335
|
-
particleFlowClearKernel(x, y);
|
|
6336
|
-
}), {
|
|
6337
|
-
v: 1,
|
|
6338
|
-
name: void 0,
|
|
6339
|
-
ast: {
|
|
6340
|
-
"params": [{
|
|
6341
|
-
"type": "i",
|
|
6342
|
-
"name": "x"
|
|
6343
|
-
}, {
|
|
6344
|
-
"type": "i",
|
|
6345
|
-
"name": "y"
|
|
6346
|
-
}],
|
|
6347
|
-
"body": [0, [[
|
|
6348
|
-
6,
|
|
6349
|
-
"particleFlowClearKernel",
|
|
6350
|
-
["x", "y"]
|
|
6351
|
-
]]],
|
|
6352
|
-
"externalNames": ["particleFlowClearKernel"]
|
|
6353
|
-
},
|
|
6354
|
-
externals: () => ({ particleFlowClearKernel })
|
|
6355
|
-
}) && $.f)({}), { size: [RES, RES] }).with(pfBg);
|
|
6356
6628
|
const integrate = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
6357
6629
|
"use gpu";
|
|
6358
6630
|
particleFlowIntegrateKernel(i);
|
|
@@ -6423,6 +6695,7 @@ const componentDefinition = {
|
|
|
6423
6695
|
let ambientTime = 0;
|
|
6424
6696
|
let warmup = 0;
|
|
6425
6697
|
let initialized = false;
|
|
6698
|
+
const countCap = isMobileGpuViewport() ? COUNT_MAX_MOBILE : MAX_PARTICLES;
|
|
6426
6699
|
const num = (key, fallback) => {
|
|
6427
6700
|
const v = getCpuValue(key);
|
|
6428
6701
|
return typeof v === "number" ? v : fallback;
|
|
@@ -6443,8 +6716,8 @@ const componentDefinition = {
|
|
|
6443
6716
|
const ambient = Math.min(Math.max(num("ambient", .15), 0), 1);
|
|
6444
6717
|
const momentum = Math.min(Math.max(num("momentum", .6), 0), 1);
|
|
6445
6718
|
const advect = num("speed", 1);
|
|
6446
|
-
const count = Math.min(Math.max(Math.round(num("count", 6e3)), 100),
|
|
6447
|
-
const bodyR = Math.min(Math.max(num("size", 1.2), .3), 3) * 1.3
|
|
6719
|
+
const count = Math.min(Math.max(Math.round(num("count", 6e3)), 100), countCap);
|
|
6720
|
+
const bodyR = Math.min(Math.max(num("size", 1.2), .3), 3) * 1.3 / SIZE_REF_RES;
|
|
6448
6721
|
const oldMx = prevMx;
|
|
6449
6722
|
const oldMy = prevMy;
|
|
6450
6723
|
const mx = fp.pointer?.x ?? prevMx;
|
|
@@ -6474,8 +6747,8 @@ const componentDefinition = {
|
|
|
6474
6747
|
const colA = getCpuValue("colorA");
|
|
6475
6748
|
const colB = getCpuValue("colorB");
|
|
6476
6749
|
simU.write({
|
|
6477
|
-
colA:
|
|
6478
|
-
colB:
|
|
6750
|
+
colA: vec4f(colA?.x ?? .56, colA?.y ?? .77, colA?.z ?? 1, colA?.w ?? 1),
|
|
6751
|
+
colB: vec4f(colB?.x ?? 1, colB?.y ?? .85, colB?.z ?? .56, colB?.w ?? 1),
|
|
6479
6752
|
dt,
|
|
6480
6753
|
aspect: domainX,
|
|
6481
6754
|
trails: Math.min(Math.max(num("trails", 0), 0), 1) * .92,
|
|
@@ -6510,7 +6783,7 @@ const componentDefinition = {
|
|
|
6510
6783
|
nodes.push(curl, vorticity, divergencePass);
|
|
6511
6784
|
for (let iter = 0; iter < JACOBI_ITERS; iter++) nodes.push(jacobi);
|
|
6512
6785
|
nodes.push(gradSubtract, advectVel, copyVel);
|
|
6513
|
-
nodes.push(
|
|
6786
|
+
nodes.push(() => integrate.dispatchThreads(count), () => splat.dispatchThreads(count), resolve);
|
|
6514
6787
|
return nodes;
|
|
6515
6788
|
}
|
|
6516
6789
|
};
|
|
@@ -6522,4 +6795,4 @@ const componentDefinition = {
|
|
|
6522
6795
|
}
|
|
6523
6796
|
};
|
|
6524
6797
|
var ParticleFlow_default = componentDefinition;
|
|
6525
|
-
export {
|
|
6798
|
+
export { particleFlowAdvectVelKernel as a, particleFlowDivergenceKernel as c, particleFlowInitKernel as d, particleFlowIntegrateKernel as f, particleFlowVorticityKernel as g, particleFlowSplatKernel as h, makeParticleFlowSplatKernel as i, particleFlowForceKernel as l, particleFlowResolveKernel as m, componentDefinition as n, particleFlowCopyVelKernel as o, particleFlowJacobiKernel as p, makeParticleFlowResolveKernel as r, particleFlowCurlKernel as s, ParticleFlow_default as t, particleFlowGradSubtractKernel as u };
|