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,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as mix, Ct as exp, Dt as length, Gt as arrayOf, Kt as texture2d, Ot as max, Qt as struct, Rt as sin, St as dot, Tt as floor, Ut as data_exports, Wt as atomic, bt as cos, cn as i32, d as ZERO, dt as atomicLoad, et as src_default, ft as atomicStore, 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, rt as textureDimensions, sn as f32, tn as vec2f, ut as atomicAdd, vt as ceil, yt as clamp, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { p as noise_exports, s as hash12 } 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, c as pointShapeOptions, i as cursorMagnet, l as resolveAgentShape, n as agents_exports, r as cursorFalloff, t as AGENT_SHAPES } from "./agents-c-JjGH1b.js";
|
|
2
6
|
var GRID_DIM_MAX = 256;
|
|
3
7
|
var MAX_PARTICLES = GRID_DIM_MAX * GRID_DIM_MAX;
|
|
4
8
|
var COUNT_MAX = 4e4;
|
|
9
|
+
var COUNT_MAX_MOBILE = 12e3;
|
|
5
10
|
var OUT_MAX = isMobileGpuViewport() ? 768 : 1024;
|
|
6
11
|
var OUT_CELLS = OUT_MAX * OUT_MAX;
|
|
7
12
|
var SPLAT_R = 8;
|
|
8
|
-
var
|
|
13
|
+
var AA_W = .75;
|
|
14
|
+
var MIN_ALPHA = .002;
|
|
9
15
|
var STATE_FORMAT = "rgba16float";
|
|
10
16
|
var FP = 2048;
|
|
17
|
+
var MIN_WEIGHT = 1 / FP;
|
|
11
18
|
var WOBBLE_FREQ = 1.15;
|
|
12
19
|
var ALPHA_K = 2.6;
|
|
13
20
|
var TAU = 6.28318530718;
|
|
@@ -17,69 +24,69 @@ var DRAG = 4.2;
|
|
|
17
24
|
var MAX_SPEED = 4;
|
|
18
25
|
var CURSOR_FORCE_K = 10;
|
|
19
26
|
var CURSOR_ZFORCE_K = 4;
|
|
20
|
-
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
21
|
-
rowX:
|
|
22
|
-
rowY:
|
|
23
|
-
rowZ:
|
|
24
|
-
dt:
|
|
25
|
-
time:
|
|
26
|
-
snap:
|
|
27
|
-
gridW:
|
|
28
|
-
gridH:
|
|
29
|
-
outW:
|
|
30
|
-
outH:
|
|
31
|
-
depth:
|
|
32
|
-
dragMul:
|
|
33
|
-
wobbleAmp:
|
|
34
|
-
depthShading:
|
|
35
|
-
spacing:
|
|
36
|
-
particleSize:
|
|
37
|
-
aspect:
|
|
38
|
-
zoom:
|
|
39
|
-
transX:
|
|
40
|
-
transY:
|
|
41
|
-
pointerX:
|
|
42
|
-
pointerY:
|
|
43
|
-
cursorForce:
|
|
44
|
-
cursorZForce:
|
|
45
|
-
cursorRadSq:
|
|
27
|
+
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
28
|
+
rowX: vec4f,
|
|
29
|
+
rowY: vec4f,
|
|
30
|
+
rowZ: vec4f,
|
|
31
|
+
dt: f32,
|
|
32
|
+
time: f32,
|
|
33
|
+
snap: f32,
|
|
34
|
+
gridW: f32,
|
|
35
|
+
gridH: f32,
|
|
36
|
+
outW: f32,
|
|
37
|
+
outH: f32,
|
|
38
|
+
depth: f32,
|
|
39
|
+
dragMul: f32,
|
|
40
|
+
wobbleAmp: f32,
|
|
41
|
+
depthShading: f32,
|
|
42
|
+
spacing: f32,
|
|
43
|
+
particleSize: f32,
|
|
44
|
+
aspect: f32,
|
|
45
|
+
zoom: f32,
|
|
46
|
+
transX: f32,
|
|
47
|
+
transY: f32,
|
|
48
|
+
pointerX: f32,
|
|
49
|
+
pointerY: f32,
|
|
50
|
+
cursorForce: f32,
|
|
51
|
+
cursorZForce: f32,
|
|
52
|
+
cursorRadSq: f32
|
|
46
53
|
}), "SimParams");
|
|
47
|
-
var fieldLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
54
|
+
var fieldLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
48
55
|
pos: {
|
|
49
|
-
storage:
|
|
56
|
+
storage: arrayOf(vec4f, MAX_PARTICLES),
|
|
50
57
|
access: "mutable"
|
|
51
58
|
},
|
|
52
59
|
vel: {
|
|
53
|
-
storage:
|
|
60
|
+
storage: arrayOf(vec4f, MAX_PARTICLES),
|
|
54
61
|
access: "mutable"
|
|
55
62
|
},
|
|
56
63
|
col: {
|
|
57
|
-
storage:
|
|
64
|
+
storage: arrayOf(vec4f, MAX_PARTICLES),
|
|
58
65
|
access: "mutable"
|
|
59
66
|
},
|
|
60
67
|
accumR: {
|
|
61
|
-
storage:
|
|
68
|
+
storage: arrayOf(atomic(u32), OUT_CELLS),
|
|
62
69
|
access: "mutable"
|
|
63
70
|
},
|
|
64
71
|
accumG: {
|
|
65
|
-
storage:
|
|
72
|
+
storage: arrayOf(atomic(u32), OUT_CELLS),
|
|
66
73
|
access: "mutable"
|
|
67
74
|
},
|
|
68
75
|
accumB: {
|
|
69
|
-
storage:
|
|
76
|
+
storage: arrayOf(atomic(u32), OUT_CELLS),
|
|
70
77
|
access: "mutable"
|
|
71
78
|
},
|
|
72
79
|
accumW: {
|
|
73
|
-
storage:
|
|
80
|
+
storage: arrayOf(atomic(u32), OUT_CELLS),
|
|
74
81
|
access: "mutable"
|
|
75
82
|
},
|
|
76
83
|
params: { uniform: SimParams },
|
|
77
|
-
src: { texture:
|
|
78
|
-
outTex: { storageTexture:
|
|
84
|
+
src: { texture: texture2d(f32) },
|
|
85
|
+
outTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
79
86
|
}), "fieldLayout");
|
|
80
|
-
var channelLuminance =
|
|
87
|
+
var channelLuminance = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
81
88
|
"use gpu";
|
|
82
|
-
return
|
|
89
|
+
return dot(rgb, vec3f(.299, .587, .114));
|
|
83
90
|
}), {
|
|
84
91
|
v: 1,
|
|
85
92
|
name: void 0,
|
|
@@ -115,13 +122,13 @@ var channelLuminance = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($) =>
|
|
|
115
122
|
"externalNames": ["std", "d"]
|
|
116
123
|
},
|
|
117
124
|
externals: () => ({
|
|
118
|
-
std,
|
|
119
|
-
d
|
|
125
|
+
std: std_exports,
|
|
126
|
+
d: data_exports
|
|
120
127
|
})
|
|
121
128
|
}) && $.f)({}));
|
|
122
|
-
var channelLuminanceInv =
|
|
129
|
+
var channelLuminanceInv = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
123
130
|
"use gpu";
|
|
124
|
-
return __tsover_sub(1,
|
|
131
|
+
return __tsover_sub(1, dot(rgb, vec3f(.299, .587, .114)));
|
|
125
132
|
}), {
|
|
126
133
|
v: 1,
|
|
127
134
|
name: void 0,
|
|
@@ -162,11 +169,11 @@ var channelLuminanceInv = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($)
|
|
|
162
169
|
"externalNames": ["std", "d"]
|
|
163
170
|
},
|
|
164
171
|
externals: () => ({
|
|
165
|
-
std,
|
|
166
|
-
d
|
|
172
|
+
std: std_exports,
|
|
173
|
+
d: data_exports
|
|
167
174
|
})
|
|
168
175
|
}) && $.f)({}));
|
|
169
|
-
var channelRed =
|
|
176
|
+
var channelRed = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
170
177
|
"use gpu";
|
|
171
178
|
return rgb.x;
|
|
172
179
|
}), {
|
|
@@ -189,7 +196,7 @@ var channelRed = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($) => (globa
|
|
|
189
196
|
},
|
|
190
197
|
externals: () => ({})
|
|
191
198
|
}) && $.f)({}));
|
|
192
|
-
var channelGreen =
|
|
199
|
+
var channelGreen = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
193
200
|
"use gpu";
|
|
194
201
|
return rgb.y;
|
|
195
202
|
}), {
|
|
@@ -212,7 +219,7 @@ var channelGreen = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($) => (glo
|
|
|
212
219
|
},
|
|
213
220
|
externals: () => ({})
|
|
214
221
|
}) && $.f)({}));
|
|
215
|
-
var channelBlue =
|
|
222
|
+
var channelBlue = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
216
223
|
"use gpu";
|
|
217
224
|
return rgb.z;
|
|
218
225
|
}), {
|
|
@@ -235,10 +242,10 @@ var channelBlue = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($) => (glob
|
|
|
235
242
|
},
|
|
236
243
|
externals: () => ({})
|
|
237
244
|
}) && $.f)({}));
|
|
238
|
-
var channelSaturation =
|
|
245
|
+
var channelSaturation = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, _a) => {
|
|
239
246
|
"use gpu";
|
|
240
|
-
const mx =
|
|
241
|
-
const mn =
|
|
247
|
+
const mx = max(max(rgb.x, rgb.y), rgb.z);
|
|
248
|
+
const mn = min(min(rgb.x, rgb.y), rgb.z);
|
|
242
249
|
return __tsover_sub(mx, mn);
|
|
243
250
|
}), {
|
|
244
251
|
v: 1,
|
|
@@ -327,9 +334,9 @@ var channelSaturation = tgpu.fn([d.vec3f, d.f32], d.f32)(/* @__PURE__ */ (($) =>
|
|
|
327
334
|
]],
|
|
328
335
|
"externalNames": ["std"]
|
|
329
336
|
},
|
|
330
|
-
externals: () => ({ std })
|
|
337
|
+
externals: () => ({ std: std_exports })
|
|
331
338
|
}) && $.f)({}));
|
|
332
|
-
var channelAlpha =
|
|
339
|
+
var channelAlpha = src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((_rgb, a) => {
|
|
333
340
|
"use gpu";
|
|
334
341
|
return a;
|
|
335
342
|
}), {
|
|
@@ -366,249 +373,67 @@ var DEPTH_SOURCE_MODES = {
|
|
|
366
373
|
saturation: 5,
|
|
367
374
|
alpha: 6
|
|
368
375
|
};
|
|
369
|
-
const particleFieldClearKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
370
|
-
"use gpu";
|
|
371
|
-
const idx = __tsover_add(__tsover_mul(y, d.u32(fieldLayout.$.params.outW)), x);
|
|
372
|
-
std.atomicStore(fieldLayout.$.accumR[idx], d.u32(0));
|
|
373
|
-
std.atomicStore(fieldLayout.$.accumG[idx], d.u32(0));
|
|
374
|
-
std.atomicStore(fieldLayout.$.accumB[idx], d.u32(0));
|
|
375
|
-
std.atomicStore(fieldLayout.$.accumW[idx], d.u32(0));
|
|
376
|
-
}), {
|
|
377
|
-
v: 1,
|
|
378
|
-
name: void 0,
|
|
379
|
-
ast: {
|
|
380
|
-
"params": [{
|
|
381
|
-
"type": "i",
|
|
382
|
-
"name": "x"
|
|
383
|
-
}, {
|
|
384
|
-
"type": "i",
|
|
385
|
-
"name": "y"
|
|
386
|
-
}],
|
|
387
|
-
"body": [0, [
|
|
388
|
-
[
|
|
389
|
-
13,
|
|
390
|
-
"idx",
|
|
391
|
-
[
|
|
392
|
-
1,
|
|
393
|
-
[
|
|
394
|
-
1,
|
|
395
|
-
"y",
|
|
396
|
-
"*",
|
|
397
|
-
[
|
|
398
|
-
6,
|
|
399
|
-
[
|
|
400
|
-
7,
|
|
401
|
-
"d",
|
|
402
|
-
"u32"
|
|
403
|
-
],
|
|
404
|
-
[[
|
|
405
|
-
7,
|
|
406
|
-
[
|
|
407
|
-
7,
|
|
408
|
-
[
|
|
409
|
-
7,
|
|
410
|
-
"fieldLayout",
|
|
411
|
-
"$"
|
|
412
|
-
],
|
|
413
|
-
"params"
|
|
414
|
-
],
|
|
415
|
-
"outW"
|
|
416
|
-
]]
|
|
417
|
-
]
|
|
418
|
-
],
|
|
419
|
-
"+",
|
|
420
|
-
"x"
|
|
421
|
-
]
|
|
422
|
-
],
|
|
423
|
-
[
|
|
424
|
-
6,
|
|
425
|
-
[
|
|
426
|
-
7,
|
|
427
|
-
"std",
|
|
428
|
-
"atomicStore"
|
|
429
|
-
],
|
|
430
|
-
[[
|
|
431
|
-
8,
|
|
432
|
-
[
|
|
433
|
-
7,
|
|
434
|
-
[
|
|
435
|
-
7,
|
|
436
|
-
"fieldLayout",
|
|
437
|
-
"$"
|
|
438
|
-
],
|
|
439
|
-
"accumR"
|
|
440
|
-
],
|
|
441
|
-
"idx"
|
|
442
|
-
], [
|
|
443
|
-
6,
|
|
444
|
-
[
|
|
445
|
-
7,
|
|
446
|
-
"d",
|
|
447
|
-
"u32"
|
|
448
|
-
],
|
|
449
|
-
[[5, "0"]]
|
|
450
|
-
]]
|
|
451
|
-
],
|
|
452
|
-
[
|
|
453
|
-
6,
|
|
454
|
-
[
|
|
455
|
-
7,
|
|
456
|
-
"std",
|
|
457
|
-
"atomicStore"
|
|
458
|
-
],
|
|
459
|
-
[[
|
|
460
|
-
8,
|
|
461
|
-
[
|
|
462
|
-
7,
|
|
463
|
-
[
|
|
464
|
-
7,
|
|
465
|
-
"fieldLayout",
|
|
466
|
-
"$"
|
|
467
|
-
],
|
|
468
|
-
"accumG"
|
|
469
|
-
],
|
|
470
|
-
"idx"
|
|
471
|
-
], [
|
|
472
|
-
6,
|
|
473
|
-
[
|
|
474
|
-
7,
|
|
475
|
-
"d",
|
|
476
|
-
"u32"
|
|
477
|
-
],
|
|
478
|
-
[[5, "0"]]
|
|
479
|
-
]]
|
|
480
|
-
],
|
|
481
|
-
[
|
|
482
|
-
6,
|
|
483
|
-
[
|
|
484
|
-
7,
|
|
485
|
-
"std",
|
|
486
|
-
"atomicStore"
|
|
487
|
-
],
|
|
488
|
-
[[
|
|
489
|
-
8,
|
|
490
|
-
[
|
|
491
|
-
7,
|
|
492
|
-
[
|
|
493
|
-
7,
|
|
494
|
-
"fieldLayout",
|
|
495
|
-
"$"
|
|
496
|
-
],
|
|
497
|
-
"accumB"
|
|
498
|
-
],
|
|
499
|
-
"idx"
|
|
500
|
-
], [
|
|
501
|
-
6,
|
|
502
|
-
[
|
|
503
|
-
7,
|
|
504
|
-
"d",
|
|
505
|
-
"u32"
|
|
506
|
-
],
|
|
507
|
-
[[5, "0"]]
|
|
508
|
-
]]
|
|
509
|
-
],
|
|
510
|
-
[
|
|
511
|
-
6,
|
|
512
|
-
[
|
|
513
|
-
7,
|
|
514
|
-
"std",
|
|
515
|
-
"atomicStore"
|
|
516
|
-
],
|
|
517
|
-
[[
|
|
518
|
-
8,
|
|
519
|
-
[
|
|
520
|
-
7,
|
|
521
|
-
[
|
|
522
|
-
7,
|
|
523
|
-
"fieldLayout",
|
|
524
|
-
"$"
|
|
525
|
-
],
|
|
526
|
-
"accumW"
|
|
527
|
-
],
|
|
528
|
-
"idx"
|
|
529
|
-
], [
|
|
530
|
-
6,
|
|
531
|
-
[
|
|
532
|
-
7,
|
|
533
|
-
"d",
|
|
534
|
-
"u32"
|
|
535
|
-
],
|
|
536
|
-
[[5, "0"]]
|
|
537
|
-
]]
|
|
538
|
-
]
|
|
539
|
-
]],
|
|
540
|
-
"externalNames": [
|
|
541
|
-
"d",
|
|
542
|
-
"fieldLayout",
|
|
543
|
-
"std"
|
|
544
|
-
]
|
|
545
|
-
},
|
|
546
|
-
externals: () => ({
|
|
547
|
-
d,
|
|
548
|
-
fieldLayout,
|
|
549
|
-
std
|
|
550
|
-
})
|
|
551
|
-
}) && $.f)({})).$name("particleFieldClear");
|
|
552
376
|
function makeParticleFieldSimKernel(channelMode) {
|
|
553
377
|
const channelFn = channelFns[channelMode] ?? channelLuminance;
|
|
554
|
-
return
|
|
378
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((gx, gy) => {
|
|
555
379
|
"use gpu";
|
|
556
380
|
const P = fieldLayout.$.params;
|
|
557
|
-
const i = __tsover_add(__tsover_mul(gy,
|
|
558
|
-
const homeU = __tsover_div(__tsover_add(
|
|
559
|
-
const homeV = __tsover_div(__tsover_add(
|
|
560
|
-
const dims =
|
|
561
|
-
const sw =
|
|
562
|
-
const sh =
|
|
381
|
+
const i = __tsover_add(__tsover_mul(gy, u32(P.gridW)), gx);
|
|
382
|
+
const homeU = __tsover_div(__tsover_add(f32(gx), .5), P.gridW);
|
|
383
|
+
const homeV = __tsover_div(__tsover_add(f32(gy), .5), P.gridH);
|
|
384
|
+
const dims = textureDimensions(fieldLayout.$.src);
|
|
385
|
+
const sw = f32(dims.x);
|
|
386
|
+
const sh = f32(dims.y);
|
|
563
387
|
const cu = __tsover_sub(__tsover_mul(homeU, sw), .5);
|
|
564
388
|
const cv = __tsover_sub(__tsover_mul(homeV, sh), .5);
|
|
565
|
-
const cx0 =
|
|
566
|
-
const cy0 =
|
|
389
|
+
const cx0 = floor(cu);
|
|
390
|
+
const cy0 = floor(cv);
|
|
567
391
|
const fx = __tsover_sub(cu, cx0);
|
|
568
392
|
const fy = __tsover_sub(cv, cy0);
|
|
569
|
-
const ix0 =
|
|
570
|
-
const ix1 =
|
|
571
|
-
const iy0 =
|
|
572
|
-
const iy1 =
|
|
573
|
-
const c00 =
|
|
574
|
-
const c10 =
|
|
575
|
-
const c01 =
|
|
576
|
-
const c11 =
|
|
577
|
-
const prem =
|
|
393
|
+
const ix0 = u32(clamp(cx0, f32(0), __tsover_sub(sw, 1)));
|
|
394
|
+
const ix1 = u32(clamp(__tsover_add(cx0, 1), f32(0), __tsover_sub(sw, 1)));
|
|
395
|
+
const iy0 = u32(clamp(cy0, f32(0), __tsover_sub(sh, 1)));
|
|
396
|
+
const iy1 = u32(clamp(__tsover_add(cy0, 1), f32(0), __tsover_sub(sh, 1)));
|
|
397
|
+
const c00 = textureLoad(fieldLayout.$.src, vec2u(ix0, iy0), 0);
|
|
398
|
+
const c10 = textureLoad(fieldLayout.$.src, vec2u(ix1, iy0), 0);
|
|
399
|
+
const c01 = textureLoad(fieldLayout.$.src, vec2u(ix0, iy1), 0);
|
|
400
|
+
const c11 = textureLoad(fieldLayout.$.src, vec2u(ix1, iy1), 0);
|
|
401
|
+
const prem = mix(mix(c00, c10, fx), mix(c01, c11, fx), fy);
|
|
578
402
|
const a = prem.w;
|
|
579
|
-
const rgb = prem.xyz.div(
|
|
580
|
-
fieldLayout.$.col[i] =
|
|
403
|
+
const rgb = prem.xyz.div(max(a, f32(1e-4)));
|
|
404
|
+
fieldLayout.$.col[i] = vec4f(rgb.x, rgb.y, rgb.z, a);
|
|
581
405
|
const ch = channelFn(rgb, a);
|
|
582
406
|
const targetZ = __tsover_mul(__tsover_sub(ch, .5), P.depth);
|
|
583
407
|
const p4 = fieldLayout.$.pos[i];
|
|
584
408
|
const v4 = fieldLayout.$.vel[i];
|
|
585
409
|
const dt = P.dt;
|
|
586
|
-
const
|
|
587
|
-
const homeW =
|
|
588
|
-
const off =
|
|
589
|
-
const pw =
|
|
410
|
+
const needsSnap = P.snap > .5 || v4.w < .5;
|
|
411
|
+
const homeW = vec2f(__tsover_mul(__tsover_sub(homeU, .5), P.aspect), __tsover_sub(homeV, .5));
|
|
412
|
+
const off = vec2f(p4.x, p4.y);
|
|
413
|
+
const pw = vec3f(__tsover_add(homeW.x, off.x), __tsover_add(homeW.y, off.y), p4.z);
|
|
590
414
|
const rxv = __tsover_add(__tsover_add(__tsover_mul(P.rowX.x, pw.x), __tsover_mul(P.rowX.y, pw.y)), __tsover_mul(P.rowX.z, pw.z));
|
|
591
415
|
const ryv = __tsover_add(__tsover_add(__tsover_mul(P.rowY.x, pw.x), __tsover_mul(P.rowY.y, pw.y)), __tsover_mul(P.rowY.z, pw.z));
|
|
592
416
|
const rzv = __tsover_add(__tsover_add(__tsover_mul(P.rowZ.x, pw.x), __tsover_mul(P.rowZ.y, pw.y)), __tsover_mul(P.rowZ.z, pw.z));
|
|
593
|
-
const persp = __tsover_div(P.zoom,
|
|
417
|
+
const persp = __tsover_div(P.zoom, clamp(__tsover_sub(1, __tsover_mul(rzv, PERSP_K)), .35, 2.6));
|
|
594
418
|
const su = __tsover_add(__tsover_add(.5, __tsover_div(__tsover_mul(rxv, persp), P.aspect)), P.transX);
|
|
595
419
|
const sv = __tsover_add(__tsover_add(.5, __tsover_mul(ryv, persp)), P.transY);
|
|
596
|
-
const deltaS =
|
|
420
|
+
const deltaS = vec2f(__tsover_mul(__tsover_sub(su, P.pointerX), P.aspect), __tsover_sub(sv, P.pointerY));
|
|
597
421
|
const mxy = cursorMagnet(deltaS, P.cursorRadSq, P.cursorForce);
|
|
598
422
|
const mz = __tsover_mul(cursorFalloff(deltaS, P.cursorRadSq), P.cursorZForce);
|
|
599
|
-
const cf =
|
|
600
|
-
const F =
|
|
601
|
-
let v3 =
|
|
602
|
-
const spd =
|
|
603
|
-
v3 = v3.mul(__tsover_div(
|
|
604
|
-
let offN = off.add(
|
|
423
|
+
const cf = vec3f(__tsover_add(__tsover_add(__tsover_mul(P.rowX.x, mxy.x), __tsover_mul(P.rowY.x, mxy.y)), __tsover_mul(P.rowZ.x, mz)), __tsover_add(__tsover_add(__tsover_mul(P.rowX.y, mxy.x), __tsover_mul(P.rowY.y, mxy.y)), __tsover_mul(P.rowZ.y, mz)), __tsover_add(__tsover_add(__tsover_mul(P.rowX.z, mxy.x), __tsover_mul(P.rowY.z, mxy.y)), __tsover_mul(P.rowZ.z, mz)));
|
|
424
|
+
const F = vec3f(__tsover_mul(off.x, -STIFF), __tsover_mul(off.y, -STIFF), __tsover_mul(__tsover_sub(targetZ, p4.z), STIFF)).add(cf);
|
|
425
|
+
let v3 = vec3f(v4.x, v4.y, v4.z).add(F.mul(dt)).mul(P.dragMul);
|
|
426
|
+
const spd = length(v3);
|
|
427
|
+
v3 = v3.mul(__tsover_div(min(spd, f32(MAX_SPEED)), max(spd, 1e-5)));
|
|
428
|
+
let offN = off.add(vec2f(v3.x, v3.y).mul(dt));
|
|
605
429
|
let curZ = __tsover_add(p4.z, __tsover_mul(v3.z, dt));
|
|
606
|
-
offN =
|
|
607
|
-
curZ =
|
|
608
|
-
v3 =
|
|
609
|
-
const seed = hash12(
|
|
610
|
-
|
|
611
|
-
fieldLayout.$.
|
|
430
|
+
offN = select(offN, vec2f(0, 0), needsSnap);
|
|
431
|
+
curZ = select(curZ, targetZ, needsSnap);
|
|
432
|
+
v3 = select(v3, vec3f(0, 0, 0), needsSnap);
|
|
433
|
+
const seed = hash12(vec2f(__tsover_add(f32(gx), .5), __tsover_add(f32(gy), .5)));
|
|
434
|
+
const seenN = select(v4.w, f32(1), a > MIN_ALPHA);
|
|
435
|
+
fieldLayout.$.pos[i] = vec4f(offN.x, offN.y, curZ, seed);
|
|
436
|
+
fieldLayout.$.vel[i] = vec4f(v3.x, v3.y, v3.z, seenN);
|
|
612
437
|
}), {
|
|
613
438
|
v: 1,
|
|
614
439
|
name: void 0,
|
|
@@ -1339,16 +1164,30 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
1339
1164
|
],
|
|
1340
1165
|
[
|
|
1341
1166
|
13,
|
|
1342
|
-
"
|
|
1167
|
+
"needsSnap",
|
|
1343
1168
|
[
|
|
1344
|
-
|
|
1169
|
+
3,
|
|
1345
1170
|
[
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1171
|
+
1,
|
|
1172
|
+
[
|
|
1173
|
+
7,
|
|
1174
|
+
"P",
|
|
1175
|
+
"snap"
|
|
1176
|
+
],
|
|
1177
|
+
">",
|
|
1178
|
+
[5, "0.5"]
|
|
1349
1179
|
],
|
|
1350
|
-
"
|
|
1351
|
-
[
|
|
1180
|
+
"||",
|
|
1181
|
+
[
|
|
1182
|
+
1,
|
|
1183
|
+
[
|
|
1184
|
+
7,
|
|
1185
|
+
"v4",
|
|
1186
|
+
"w"
|
|
1187
|
+
],
|
|
1188
|
+
"<",
|
|
1189
|
+
[5, "0.5"]
|
|
1190
|
+
]
|
|
1352
1191
|
]
|
|
1353
1192
|
],
|
|
1354
1193
|
[
|
|
@@ -2281,7 +2120,7 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2281
2120
|
],
|
|
2282
2121
|
[[5, "0"], [5, "0"]]
|
|
2283
2122
|
],
|
|
2284
|
-
"
|
|
2123
|
+
"needsSnap"
|
|
2285
2124
|
]
|
|
2286
2125
|
]
|
|
2287
2126
|
],
|
|
@@ -2299,7 +2138,7 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2299
2138
|
[
|
|
2300
2139
|
"curZ",
|
|
2301
2140
|
"targetZ",
|
|
2302
|
-
"
|
|
2141
|
+
"needsSnap"
|
|
2303
2142
|
]
|
|
2304
2143
|
]
|
|
2305
2144
|
],
|
|
@@ -2329,7 +2168,7 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2329
2168
|
[5, "0"]
|
|
2330
2169
|
]
|
|
2331
2170
|
],
|
|
2332
|
-
"
|
|
2171
|
+
"needsSnap"
|
|
2333
2172
|
]
|
|
2334
2173
|
]
|
|
2335
2174
|
],
|
|
@@ -2380,6 +2219,40 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2380
2219
|
]]
|
|
2381
2220
|
]
|
|
2382
2221
|
],
|
|
2222
|
+
[
|
|
2223
|
+
13,
|
|
2224
|
+
"seenN",
|
|
2225
|
+
[
|
|
2226
|
+
6,
|
|
2227
|
+
[
|
|
2228
|
+
7,
|
|
2229
|
+
"std",
|
|
2230
|
+
"select"
|
|
2231
|
+
],
|
|
2232
|
+
[
|
|
2233
|
+
[
|
|
2234
|
+
7,
|
|
2235
|
+
"v4",
|
|
2236
|
+
"w"
|
|
2237
|
+
],
|
|
2238
|
+
[
|
|
2239
|
+
6,
|
|
2240
|
+
[
|
|
2241
|
+
7,
|
|
2242
|
+
"d",
|
|
2243
|
+
"f32"
|
|
2244
|
+
],
|
|
2245
|
+
[[5, "1"]]
|
|
2246
|
+
],
|
|
2247
|
+
[
|
|
2248
|
+
1,
|
|
2249
|
+
"a",
|
|
2250
|
+
">",
|
|
2251
|
+
"MIN_ALPHA"
|
|
2252
|
+
]
|
|
2253
|
+
]
|
|
2254
|
+
]
|
|
2255
|
+
],
|
|
2383
2256
|
[
|
|
2384
2257
|
2,
|
|
2385
2258
|
[
|
|
@@ -2458,7 +2331,7 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2458
2331
|
"v3",
|
|
2459
2332
|
"z"
|
|
2460
2333
|
],
|
|
2461
|
-
|
|
2334
|
+
"seenN"
|
|
2462
2335
|
]
|
|
2463
2336
|
]
|
|
2464
2337
|
]
|
|
@@ -2472,77 +2345,87 @@ function makeParticleFieldSimKernel(channelMode) {
|
|
|
2472
2345
|
"agents",
|
|
2473
2346
|
"STIFF",
|
|
2474
2347
|
"MAX_SPEED",
|
|
2475
|
-
"noise"
|
|
2348
|
+
"noise",
|
|
2349
|
+
"MIN_ALPHA"
|
|
2476
2350
|
]
|
|
2477
2351
|
},
|
|
2478
2352
|
externals: () => ({
|
|
2479
2353
|
fieldLayout,
|
|
2480
|
-
d,
|
|
2481
|
-
std,
|
|
2354
|
+
d: data_exports,
|
|
2355
|
+
std: std_exports,
|
|
2482
2356
|
channelFn,
|
|
2483
2357
|
PERSP_K,
|
|
2484
2358
|
agents: agents_exports,
|
|
2485
2359
|
STIFF,
|
|
2486
2360
|
MAX_SPEED,
|
|
2487
|
-
noise: noise_exports
|
|
2361
|
+
noise: noise_exports,
|
|
2362
|
+
MIN_ALPHA
|
|
2488
2363
|
})
|
|
2489
2364
|
}) && $.f)({})).$name("particleFieldSim");
|
|
2490
2365
|
}
|
|
2491
2366
|
function makeParticleFieldSplatKernel(shape) {
|
|
2492
2367
|
const name = resolveAgentShape(shape, "dot");
|
|
2493
2368
|
const s = AGENT_SHAPES[name];
|
|
2494
|
-
const weightFn =
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2497
|
-
return tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((gx, gy) => {
|
|
2369
|
+
const weightFn = makeAgentTexelWeightFn(name);
|
|
2370
|
+
const EXT_SHAPE = s.soft === 1 ? Math.max(s.ext, 2.4) : s.ext;
|
|
2371
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((gx, gy) => {
|
|
2498
2372
|
"use gpu";
|
|
2499
2373
|
const P = fieldLayout.$.params;
|
|
2500
|
-
const i = __tsover_add(__tsover_mul(gy,
|
|
2374
|
+
const i = __tsover_add(__tsover_mul(gy, u32(P.gridW)), gx);
|
|
2501
2375
|
const p4 = fieldLayout.$.pos[i];
|
|
2502
2376
|
const col = fieldLayout.$.col[i];
|
|
2503
2377
|
const childA = col.w;
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
const
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2378
|
+
if (childA > MIN_ALPHA) {
|
|
2379
|
+
const homeU = __tsover_div(__tsover_add(f32(gx), .5), P.gridW);
|
|
2380
|
+
const homeV = __tsover_div(__tsover_add(f32(gy), .5), P.gridH);
|
|
2381
|
+
const ph = __tsover_mul(p4.w, TAU);
|
|
2382
|
+
const wob = P.wobbleAmp;
|
|
2383
|
+
const wx = __tsover_mul(__tsover_mul(sin(__tsover_add(__tsover_mul(P.time, WOBBLE_FREQ), ph)), wob), .012);
|
|
2384
|
+
const wy = __tsover_mul(__tsover_mul(cos(__tsover_add(__tsover_mul(__tsover_mul(P.time, WOBBLE_FREQ), 1.13), __tsover_mul(ph, 1.7))), wob), .012);
|
|
2385
|
+
const wz = __tsover_mul(__tsover_mul(sin(__tsover_add(__tsover_mul(__tsover_mul(P.time, WOBBLE_FREQ), .87), __tsover_mul(ph, 2.3))), wob), .06);
|
|
2386
|
+
const pw = vec3f(__tsover_add(__tsover_add(__tsover_mul(__tsover_sub(homeU, .5), P.aspect), p4.x), wx), __tsover_add(__tsover_add(__tsover_sub(homeV, .5), p4.y), wy), __tsover_add(p4.z, wz));
|
|
2387
|
+
const rx = __tsover_add(__tsover_add(__tsover_mul(P.rowX.x, pw.x), __tsover_mul(P.rowX.y, pw.y)), __tsover_mul(P.rowX.z, pw.z));
|
|
2388
|
+
const ry = __tsover_add(__tsover_add(__tsover_mul(P.rowY.x, pw.x), __tsover_mul(P.rowY.y, pw.y)), __tsover_mul(P.rowY.z, pw.z));
|
|
2389
|
+
const rz = __tsover_add(__tsover_add(__tsover_mul(P.rowZ.x, pw.x), __tsover_mul(P.rowZ.y, pw.y)), __tsover_mul(P.rowZ.z, pw.z));
|
|
2390
|
+
const persp0 = __tsover_div(1, clamp(__tsover_sub(1, __tsover_mul(rz, PERSP_K)), .35, 2.6));
|
|
2391
|
+
const persp = __tsover_mul(persp0, P.zoom);
|
|
2392
|
+
const su = __tsover_add(__tsover_add(.5, __tsover_div(__tsover_mul(rx, persp), P.aspect)), P.transX);
|
|
2393
|
+
const sv = __tsover_add(__tsover_add(.5, __tsover_mul(ry, persp)), P.transY);
|
|
2394
|
+
const tx = __tsover_mul(su, P.outW);
|
|
2395
|
+
const ty = __tsover_mul(sv, P.outH);
|
|
2396
|
+
const dotR = clamp(__tsover_mul(__tsover_mul(__tsover_mul(P.particleSize, P.spacing), .5), persp), .5, f32(SPLAT_R));
|
|
2397
|
+
const dr = max(P.depth, .001);
|
|
2398
|
+
const near = smoothstep(__tsover_mul(dr, -1), dr, rz);
|
|
2399
|
+
const shade = mix(f32(1), __tsover_add(.35, __tsover_mul(.65, near)), P.depthShading);
|
|
2400
|
+
const depthWeight = __tsover_mul(__tsover_mul(persp0, persp0), shade);
|
|
2401
|
+
const cw = __tsover_mul(childA, depthWeight);
|
|
2402
|
+
const extR = __tsover_add(f32(EXT_SHAPE), __tsover_div(f32(AA_W), dotR));
|
|
2403
|
+
const rad = i32(ceil(__tsover_mul(dotR, extR)));
|
|
2404
|
+
const radF = f32(rad);
|
|
2405
|
+
const onTarget = tx > __tsover_mul(radF, -1) && tx < __tsover_add(P.outW, radF) && ty > __tsover_mul(radF, -1) && ty < __tsover_add(P.outH, radF);
|
|
2406
|
+
if (cw > MIN_WEIGHT && onTarget) {
|
|
2407
|
+
const owU = u32(P.outW);
|
|
2408
|
+
const cxi = i32(floor(tx));
|
|
2409
|
+
const cyi = i32(floor(ty));
|
|
2410
|
+
const x0 = max(__tsover_sub(cxi, rad), 0);
|
|
2411
|
+
const x1 = min(__tsover_add(cxi, rad), __tsover_sub(i32(P.outW), 1));
|
|
2412
|
+
const y0 = max(__tsover_sub(cyi, rad), 0);
|
|
2413
|
+
const y1 = min(__tsover_add(cyi, rad), __tsover_sub(i32(P.outH), 1));
|
|
2414
|
+
for (let py = y0; py <= y1; py++) {
|
|
2415
|
+
const ddy = __tsover_sub(__tsover_add(f32(py), .5), ty);
|
|
2416
|
+
for (let px = x0; px <= x1; px++) {
|
|
2417
|
+
const ddx = __tsover_sub(__tsover_add(f32(px), .5), tx);
|
|
2418
|
+
const q = __tsover_div(__tsover_add(__tsover_mul(ddx, ddx), __tsover_mul(ddy, ddy)), max(__tsover_mul(dotR, dotR), .01));
|
|
2419
|
+
if (q < __tsover_mul(extR, extR)) {
|
|
2420
|
+
const wc = __tsover_mul(weightFn(q, ddx, ddy, dotR, f32(AA_W)), cw);
|
|
2421
|
+
if (wc > 0) {
|
|
2422
|
+
const idx = __tsover_add(__tsover_mul(u32(py), owU), u32(px));
|
|
2423
|
+
atomicAdd(fieldLayout.$.accumR[idx], u32(__tsover_mul(__tsover_mul(col.x, wc), FP)));
|
|
2424
|
+
atomicAdd(fieldLayout.$.accumG[idx], u32(__tsover_mul(__tsover_mul(col.y, wc), FP)));
|
|
2425
|
+
atomicAdd(fieldLayout.$.accumB[idx], u32(__tsover_mul(__tsover_mul(col.z, wc), FP)));
|
|
2426
|
+
atomicAdd(fieldLayout.$.accumW[idx], u32(__tsover_mul(wc, FP)));
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2546
2429
|
}
|
|
2547
2430
|
}
|
|
2548
2431
|
}
|
|
@@ -2643,224 +2526,298 @@ function makeParticleFieldSplatKernel(shape) {
|
|
|
2643
2526
|
]
|
|
2644
2527
|
],
|
|
2645
2528
|
[
|
|
2646
|
-
|
|
2647
|
-
"homeU",
|
|
2529
|
+
11,
|
|
2648
2530
|
[
|
|
2649
2531
|
1,
|
|
2532
|
+
"childA",
|
|
2533
|
+
">",
|
|
2534
|
+
"MIN_ALPHA"
|
|
2535
|
+
],
|
|
2536
|
+
[0, [
|
|
2650
2537
|
[
|
|
2651
|
-
|
|
2538
|
+
13,
|
|
2539
|
+
"homeU",
|
|
2652
2540
|
[
|
|
2653
|
-
|
|
2541
|
+
1,
|
|
2654
2542
|
[
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2543
|
+
1,
|
|
2544
|
+
[
|
|
2545
|
+
6,
|
|
2546
|
+
[
|
|
2547
|
+
7,
|
|
2548
|
+
"d",
|
|
2549
|
+
"f32"
|
|
2550
|
+
],
|
|
2551
|
+
["gx"]
|
|
2552
|
+
],
|
|
2553
|
+
"+",
|
|
2554
|
+
[5, "0.5"]
|
|
2658
2555
|
],
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2556
|
+
"/",
|
|
2557
|
+
[
|
|
2558
|
+
7,
|
|
2559
|
+
"P",
|
|
2560
|
+
"gridW"
|
|
2561
|
+
]
|
|
2562
|
+
]
|
|
2663
2563
|
],
|
|
2664
|
-
"/",
|
|
2665
2564
|
[
|
|
2666
|
-
|
|
2667
|
-
"
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2565
|
+
13,
|
|
2566
|
+
"homeV",
|
|
2567
|
+
[
|
|
2568
|
+
1,
|
|
2569
|
+
[
|
|
2570
|
+
1,
|
|
2571
|
+
[
|
|
2572
|
+
6,
|
|
2573
|
+
[
|
|
2574
|
+
7,
|
|
2575
|
+
"d",
|
|
2576
|
+
"f32"
|
|
2577
|
+
],
|
|
2578
|
+
["gy"]
|
|
2579
|
+
],
|
|
2580
|
+
"+",
|
|
2581
|
+
[5, "0.5"]
|
|
2582
|
+
],
|
|
2583
|
+
"/",
|
|
2584
|
+
[
|
|
2585
|
+
7,
|
|
2586
|
+
"P",
|
|
2587
|
+
"gridH"
|
|
2588
|
+
]
|
|
2589
|
+
]
|
|
2590
|
+
],
|
|
2677
2591
|
[
|
|
2678
|
-
|
|
2592
|
+
13,
|
|
2593
|
+
"ph",
|
|
2679
2594
|
[
|
|
2680
|
-
|
|
2595
|
+
1,
|
|
2681
2596
|
[
|
|
2682
2597
|
7,
|
|
2683
|
-
"
|
|
2684
|
-
"
|
|
2598
|
+
"p4",
|
|
2599
|
+
"w"
|
|
2685
2600
|
],
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
[5, "0.5"]
|
|
2601
|
+
"*",
|
|
2602
|
+
"TAU"
|
|
2603
|
+
]
|
|
2690
2604
|
],
|
|
2691
|
-
"/",
|
|
2692
|
-
[
|
|
2693
|
-
7,
|
|
2694
|
-
"P",
|
|
2695
|
-
"gridH"
|
|
2696
|
-
]
|
|
2697
|
-
]
|
|
2698
|
-
],
|
|
2699
|
-
[
|
|
2700
|
-
13,
|
|
2701
|
-
"ph",
|
|
2702
|
-
[
|
|
2703
|
-
1,
|
|
2704
2605
|
[
|
|
2705
|
-
|
|
2706
|
-
"
|
|
2707
|
-
|
|
2606
|
+
13,
|
|
2607
|
+
"wob",
|
|
2608
|
+
[
|
|
2609
|
+
7,
|
|
2610
|
+
"P",
|
|
2611
|
+
"wobbleAmp"
|
|
2612
|
+
]
|
|
2708
2613
|
],
|
|
2709
|
-
"*",
|
|
2710
|
-
"TAU"
|
|
2711
|
-
]
|
|
2712
|
-
],
|
|
2713
|
-
[
|
|
2714
|
-
13,
|
|
2715
|
-
"wob",
|
|
2716
|
-
[
|
|
2717
|
-
7,
|
|
2718
|
-
"P",
|
|
2719
|
-
"wobbleAmp"
|
|
2720
|
-
]
|
|
2721
|
-
],
|
|
2722
|
-
[
|
|
2723
|
-
13,
|
|
2724
|
-
"wx",
|
|
2725
|
-
[
|
|
2726
|
-
1,
|
|
2727
2614
|
[
|
|
2728
|
-
|
|
2615
|
+
13,
|
|
2616
|
+
"wx",
|
|
2729
2617
|
[
|
|
2730
|
-
|
|
2618
|
+
1,
|
|
2731
2619
|
[
|
|
2732
|
-
7,
|
|
2733
|
-
"std",
|
|
2734
|
-
"sin"
|
|
2735
|
-
],
|
|
2736
|
-
[[
|
|
2737
2620
|
1,
|
|
2738
2621
|
[
|
|
2739
|
-
|
|
2622
|
+
6,
|
|
2740
2623
|
[
|
|
2741
2624
|
7,
|
|
2742
|
-
"
|
|
2743
|
-
"
|
|
2625
|
+
"std",
|
|
2626
|
+
"sin"
|
|
2744
2627
|
],
|
|
2745
|
-
|
|
2746
|
-
|
|
2628
|
+
[[
|
|
2629
|
+
1,
|
|
2630
|
+
[
|
|
2631
|
+
1,
|
|
2632
|
+
[
|
|
2633
|
+
7,
|
|
2634
|
+
"P",
|
|
2635
|
+
"time"
|
|
2636
|
+
],
|
|
2637
|
+
"*",
|
|
2638
|
+
"WOBBLE_FREQ"
|
|
2639
|
+
],
|
|
2640
|
+
"+",
|
|
2641
|
+
"ph"
|
|
2642
|
+
]]
|
|
2747
2643
|
],
|
|
2748
|
-
"
|
|
2749
|
-
"
|
|
2750
|
-
]
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2644
|
+
"*",
|
|
2645
|
+
"wob"
|
|
2646
|
+
],
|
|
2647
|
+
"*",
|
|
2648
|
+
[5, "0.012"]
|
|
2649
|
+
]
|
|
2754
2650
|
],
|
|
2755
|
-
"*",
|
|
2756
|
-
[5, "0.012"]
|
|
2757
|
-
]
|
|
2758
|
-
],
|
|
2759
|
-
[
|
|
2760
|
-
13,
|
|
2761
|
-
"wy",
|
|
2762
|
-
[
|
|
2763
|
-
1,
|
|
2764
2651
|
[
|
|
2765
|
-
|
|
2652
|
+
13,
|
|
2653
|
+
"wy",
|
|
2766
2654
|
[
|
|
2767
|
-
|
|
2655
|
+
1,
|
|
2768
2656
|
[
|
|
2769
|
-
7,
|
|
2770
|
-
"std",
|
|
2771
|
-
"cos"
|
|
2772
|
-
],
|
|
2773
|
-
[[
|
|
2774
2657
|
1,
|
|
2775
2658
|
[
|
|
2776
|
-
|
|
2659
|
+
6,
|
|
2777
2660
|
[
|
|
2661
|
+
7,
|
|
2662
|
+
"std",
|
|
2663
|
+
"cos"
|
|
2664
|
+
],
|
|
2665
|
+
[[
|
|
2778
2666
|
1,
|
|
2779
2667
|
[
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2668
|
+
1,
|
|
2669
|
+
[
|
|
2670
|
+
1,
|
|
2671
|
+
[
|
|
2672
|
+
7,
|
|
2673
|
+
"P",
|
|
2674
|
+
"time"
|
|
2675
|
+
],
|
|
2676
|
+
"*",
|
|
2677
|
+
"WOBBLE_FREQ"
|
|
2678
|
+
],
|
|
2679
|
+
"*",
|
|
2680
|
+
[5, "1.13"]
|
|
2783
2681
|
],
|
|
2784
|
-
"
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2682
|
+
"+",
|
|
2683
|
+
[
|
|
2684
|
+
1,
|
|
2685
|
+
"ph",
|
|
2686
|
+
"*",
|
|
2687
|
+
[5, "1.7"]
|
|
2688
|
+
]
|
|
2689
|
+
]]
|
|
2789
2690
|
],
|
|
2790
|
-
"
|
|
2691
|
+
"*",
|
|
2692
|
+
"wob"
|
|
2693
|
+
],
|
|
2694
|
+
"*",
|
|
2695
|
+
[5, "0.012"]
|
|
2696
|
+
]
|
|
2697
|
+
],
|
|
2698
|
+
[
|
|
2699
|
+
13,
|
|
2700
|
+
"wz",
|
|
2701
|
+
[
|
|
2702
|
+
1,
|
|
2703
|
+
[
|
|
2704
|
+
1,
|
|
2791
2705
|
[
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2706
|
+
6,
|
|
2707
|
+
[
|
|
2708
|
+
7,
|
|
2709
|
+
"std",
|
|
2710
|
+
"sin"
|
|
2711
|
+
],
|
|
2712
|
+
[[
|
|
2713
|
+
1,
|
|
2714
|
+
[
|
|
2715
|
+
1,
|
|
2716
|
+
[
|
|
2717
|
+
1,
|
|
2718
|
+
[
|
|
2719
|
+
7,
|
|
2720
|
+
"P",
|
|
2721
|
+
"time"
|
|
2722
|
+
],
|
|
2723
|
+
"*",
|
|
2724
|
+
"WOBBLE_FREQ"
|
|
2725
|
+
],
|
|
2726
|
+
"*",
|
|
2727
|
+
[5, "0.87"]
|
|
2728
|
+
],
|
|
2729
|
+
"+",
|
|
2730
|
+
[
|
|
2731
|
+
1,
|
|
2732
|
+
"ph",
|
|
2733
|
+
"*",
|
|
2734
|
+
[5, "2.3"]
|
|
2735
|
+
]
|
|
2736
|
+
]]
|
|
2737
|
+
],
|
|
2738
|
+
"*",
|
|
2739
|
+
"wob"
|
|
2740
|
+
],
|
|
2741
|
+
"*",
|
|
2742
|
+
[5, "0.06"]
|
|
2743
|
+
]
|
|
2801
2744
|
],
|
|
2802
|
-
"*",
|
|
2803
|
-
[5, "0.012"]
|
|
2804
|
-
]
|
|
2805
|
-
],
|
|
2806
|
-
[
|
|
2807
|
-
13,
|
|
2808
|
-
"wz",
|
|
2809
|
-
[
|
|
2810
|
-
1,
|
|
2811
2745
|
[
|
|
2812
|
-
|
|
2746
|
+
13,
|
|
2747
|
+
"pw",
|
|
2813
2748
|
[
|
|
2814
2749
|
6,
|
|
2815
2750
|
[
|
|
2816
2751
|
7,
|
|
2817
|
-
"
|
|
2818
|
-
"
|
|
2752
|
+
"d",
|
|
2753
|
+
"vec3f"
|
|
2819
2754
|
],
|
|
2820
|
-
[
|
|
2821
|
-
1,
|
|
2755
|
+
[
|
|
2822
2756
|
[
|
|
2823
2757
|
1,
|
|
2824
2758
|
[
|
|
2825
2759
|
1,
|
|
2760
|
+
[
|
|
2761
|
+
1,
|
|
2762
|
+
[
|
|
2763
|
+
1,
|
|
2764
|
+
"homeU",
|
|
2765
|
+
"-",
|
|
2766
|
+
[5, "0.5"]
|
|
2767
|
+
],
|
|
2768
|
+
"*",
|
|
2769
|
+
[
|
|
2770
|
+
7,
|
|
2771
|
+
"P",
|
|
2772
|
+
"aspect"
|
|
2773
|
+
]
|
|
2774
|
+
],
|
|
2775
|
+
"+",
|
|
2826
2776
|
[
|
|
2827
2777
|
7,
|
|
2828
|
-
"
|
|
2829
|
-
"
|
|
2778
|
+
"p4",
|
|
2779
|
+
"x"
|
|
2780
|
+
]
|
|
2781
|
+
],
|
|
2782
|
+
"+",
|
|
2783
|
+
"wx"
|
|
2784
|
+
],
|
|
2785
|
+
[
|
|
2786
|
+
1,
|
|
2787
|
+
[
|
|
2788
|
+
1,
|
|
2789
|
+
[
|
|
2790
|
+
1,
|
|
2791
|
+
"homeV",
|
|
2792
|
+
"-",
|
|
2793
|
+
[5, "0.5"]
|
|
2830
2794
|
],
|
|
2831
|
-
"
|
|
2832
|
-
|
|
2795
|
+
"+",
|
|
2796
|
+
[
|
|
2797
|
+
7,
|
|
2798
|
+
"p4",
|
|
2799
|
+
"y"
|
|
2800
|
+
]
|
|
2833
2801
|
],
|
|
2834
|
-
"
|
|
2835
|
-
|
|
2802
|
+
"+",
|
|
2803
|
+
"wy"
|
|
2836
2804
|
],
|
|
2837
|
-
"+",
|
|
2838
2805
|
[
|
|
2839
2806
|
1,
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2807
|
+
[
|
|
2808
|
+
7,
|
|
2809
|
+
"p4",
|
|
2810
|
+
"z"
|
|
2811
|
+
],
|
|
2812
|
+
"+",
|
|
2813
|
+
"wz"
|
|
2843
2814
|
]
|
|
2844
|
-
]
|
|
2845
|
-
]
|
|
2846
|
-
"*",
|
|
2847
|
-
"wob"
|
|
2848
|
-
],
|
|
2849
|
-
"*",
|
|
2850
|
-
[5, "0.06"]
|
|
2851
|
-
]
|
|
2852
|
-
],
|
|
2853
|
-
[
|
|
2854
|
-
13,
|
|
2855
|
-
"pw",
|
|
2856
|
-
[
|
|
2857
|
-
6,
|
|
2858
|
-
[
|
|
2859
|
-
7,
|
|
2860
|
-
"d",
|
|
2861
|
-
"vec3f"
|
|
2815
|
+
]
|
|
2816
|
+
]
|
|
2862
2817
|
],
|
|
2863
2818
|
[
|
|
2819
|
+
13,
|
|
2820
|
+
"rx",
|
|
2864
2821
|
[
|
|
2865
2822
|
1,
|
|
2866
2823
|
[
|
|
@@ -2868,492 +2825,540 @@ function makeParticleFieldSplatKernel(shape) {
|
|
|
2868
2825
|
[
|
|
2869
2826
|
1,
|
|
2870
2827
|
[
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2828
|
+
7,
|
|
2829
|
+
[
|
|
2830
|
+
7,
|
|
2831
|
+
"P",
|
|
2832
|
+
"rowX"
|
|
2833
|
+
],
|
|
2834
|
+
"x"
|
|
2875
2835
|
],
|
|
2876
2836
|
"*",
|
|
2877
2837
|
[
|
|
2878
2838
|
7,
|
|
2879
|
-
"
|
|
2880
|
-
"
|
|
2839
|
+
"pw",
|
|
2840
|
+
"x"
|
|
2881
2841
|
]
|
|
2882
2842
|
],
|
|
2883
2843
|
"+",
|
|
2884
2844
|
[
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2845
|
+
1,
|
|
2846
|
+
[
|
|
2847
|
+
7,
|
|
2848
|
+
[
|
|
2849
|
+
7,
|
|
2850
|
+
"P",
|
|
2851
|
+
"rowX"
|
|
2852
|
+
],
|
|
2853
|
+
"y"
|
|
2854
|
+
],
|
|
2855
|
+
"*",
|
|
2856
|
+
[
|
|
2857
|
+
7,
|
|
2858
|
+
"pw",
|
|
2859
|
+
"y"
|
|
2860
|
+
]
|
|
2888
2861
|
]
|
|
2889
2862
|
],
|
|
2890
2863
|
"+",
|
|
2891
|
-
|
|
2892
|
-
|
|
2864
|
+
[
|
|
2865
|
+
1,
|
|
2866
|
+
[
|
|
2867
|
+
7,
|
|
2868
|
+
[
|
|
2869
|
+
7,
|
|
2870
|
+
"P",
|
|
2871
|
+
"rowX"
|
|
2872
|
+
],
|
|
2873
|
+
"z"
|
|
2874
|
+
],
|
|
2875
|
+
"*",
|
|
2876
|
+
[
|
|
2877
|
+
7,
|
|
2878
|
+
"pw",
|
|
2879
|
+
"z"
|
|
2880
|
+
]
|
|
2881
|
+
]
|
|
2882
|
+
]
|
|
2883
|
+
],
|
|
2884
|
+
[
|
|
2885
|
+
13,
|
|
2886
|
+
"ry",
|
|
2893
2887
|
[
|
|
2894
2888
|
1,
|
|
2895
2889
|
[
|
|
2896
2890
|
1,
|
|
2897
2891
|
[
|
|
2898
2892
|
1,
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2893
|
+
[
|
|
2894
|
+
7,
|
|
2895
|
+
[
|
|
2896
|
+
7,
|
|
2897
|
+
"P",
|
|
2898
|
+
"rowY"
|
|
2899
|
+
],
|
|
2900
|
+
"x"
|
|
2901
|
+
],
|
|
2902
|
+
"*",
|
|
2903
|
+
[
|
|
2904
|
+
7,
|
|
2905
|
+
"pw",
|
|
2906
|
+
"x"
|
|
2907
|
+
]
|
|
2902
2908
|
],
|
|
2903
2909
|
"+",
|
|
2904
2910
|
[
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2911
|
+
1,
|
|
2912
|
+
[
|
|
2913
|
+
7,
|
|
2914
|
+
[
|
|
2915
|
+
7,
|
|
2916
|
+
"P",
|
|
2917
|
+
"rowY"
|
|
2918
|
+
],
|
|
2919
|
+
"y"
|
|
2920
|
+
],
|
|
2921
|
+
"*",
|
|
2922
|
+
[
|
|
2923
|
+
7,
|
|
2924
|
+
"pw",
|
|
2925
|
+
"y"
|
|
2926
|
+
]
|
|
2908
2927
|
]
|
|
2909
2928
|
],
|
|
2910
2929
|
"+",
|
|
2911
|
-
"wy"
|
|
2912
|
-
],
|
|
2913
|
-
[
|
|
2914
|
-
1,
|
|
2915
2930
|
[
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2931
|
+
1,
|
|
2932
|
+
[
|
|
2933
|
+
7,
|
|
2934
|
+
[
|
|
2935
|
+
7,
|
|
2936
|
+
"P",
|
|
2937
|
+
"rowY"
|
|
2938
|
+
],
|
|
2939
|
+
"z"
|
|
2940
|
+
],
|
|
2941
|
+
"*",
|
|
2942
|
+
[
|
|
2943
|
+
7,
|
|
2944
|
+
"pw",
|
|
2945
|
+
"z"
|
|
2946
|
+
]
|
|
2947
|
+
]
|
|
2922
2948
|
]
|
|
2923
|
-
]
|
|
2924
|
-
]
|
|
2925
|
-
],
|
|
2926
|
-
[
|
|
2927
|
-
13,
|
|
2928
|
-
"rx",
|
|
2929
|
-
[
|
|
2930
|
-
1,
|
|
2949
|
+
],
|
|
2931
2950
|
[
|
|
2932
|
-
|
|
2951
|
+
13,
|
|
2952
|
+
"rz",
|
|
2933
2953
|
[
|
|
2934
2954
|
1,
|
|
2935
2955
|
[
|
|
2936
|
-
|
|
2956
|
+
1,
|
|
2937
2957
|
[
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2958
|
+
1,
|
|
2959
|
+
[
|
|
2960
|
+
7,
|
|
2961
|
+
[
|
|
2962
|
+
7,
|
|
2963
|
+
"P",
|
|
2964
|
+
"rowZ"
|
|
2965
|
+
],
|
|
2966
|
+
"x"
|
|
2967
|
+
],
|
|
2968
|
+
"*",
|
|
2969
|
+
[
|
|
2970
|
+
7,
|
|
2971
|
+
"pw",
|
|
2972
|
+
"x"
|
|
2973
|
+
]
|
|
2941
2974
|
],
|
|
2942
|
-
"
|
|
2975
|
+
"+",
|
|
2976
|
+
[
|
|
2977
|
+
1,
|
|
2978
|
+
[
|
|
2979
|
+
7,
|
|
2980
|
+
[
|
|
2981
|
+
7,
|
|
2982
|
+
"P",
|
|
2983
|
+
"rowZ"
|
|
2984
|
+
],
|
|
2985
|
+
"y"
|
|
2986
|
+
],
|
|
2987
|
+
"*",
|
|
2988
|
+
[
|
|
2989
|
+
7,
|
|
2990
|
+
"pw",
|
|
2991
|
+
"y"
|
|
2992
|
+
]
|
|
2993
|
+
]
|
|
2943
2994
|
],
|
|
2944
|
-
"
|
|
2995
|
+
"+",
|
|
2945
2996
|
[
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2997
|
+
1,
|
|
2998
|
+
[
|
|
2999
|
+
7,
|
|
3000
|
+
[
|
|
3001
|
+
7,
|
|
3002
|
+
"P",
|
|
3003
|
+
"rowZ"
|
|
3004
|
+
],
|
|
3005
|
+
"z"
|
|
3006
|
+
],
|
|
3007
|
+
"*",
|
|
3008
|
+
[
|
|
3009
|
+
7,
|
|
3010
|
+
"pw",
|
|
3011
|
+
"z"
|
|
3012
|
+
]
|
|
2949
3013
|
]
|
|
2950
|
-
]
|
|
2951
|
-
|
|
3014
|
+
]
|
|
3015
|
+
],
|
|
3016
|
+
[
|
|
3017
|
+
13,
|
|
3018
|
+
"persp0",
|
|
2952
3019
|
[
|
|
2953
3020
|
1,
|
|
3021
|
+
[5, "1"],
|
|
3022
|
+
"/",
|
|
2954
3023
|
[
|
|
2955
|
-
|
|
3024
|
+
6,
|
|
2956
3025
|
[
|
|
2957
3026
|
7,
|
|
2958
|
-
"
|
|
2959
|
-
"
|
|
3027
|
+
"std",
|
|
3028
|
+
"clamp"
|
|
2960
3029
|
],
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
3030
|
+
[
|
|
3031
|
+
[
|
|
3032
|
+
1,
|
|
3033
|
+
[5, "1"],
|
|
3034
|
+
"-",
|
|
3035
|
+
[
|
|
3036
|
+
1,
|
|
3037
|
+
"rz",
|
|
3038
|
+
"*",
|
|
3039
|
+
"PERSP_K"
|
|
3040
|
+
]
|
|
3041
|
+
],
|
|
3042
|
+
[5, "0.35"],
|
|
3043
|
+
[5, "2.6"]
|
|
3044
|
+
]
|
|
2968
3045
|
]
|
|
2969
3046
|
]
|
|
2970
3047
|
],
|
|
2971
|
-
"+",
|
|
2972
3048
|
[
|
|
2973
|
-
|
|
3049
|
+
13,
|
|
3050
|
+
"persp",
|
|
2974
3051
|
[
|
|
2975
|
-
|
|
3052
|
+
1,
|
|
3053
|
+
"persp0",
|
|
3054
|
+
"*",
|
|
2976
3055
|
[
|
|
2977
3056
|
7,
|
|
2978
3057
|
"P",
|
|
2979
|
-
"
|
|
2980
|
-
]
|
|
2981
|
-
"z"
|
|
2982
|
-
],
|
|
2983
|
-
"*",
|
|
2984
|
-
[
|
|
2985
|
-
7,
|
|
2986
|
-
"pw",
|
|
2987
|
-
"z"
|
|
3058
|
+
"zoom"
|
|
3059
|
+
]
|
|
2988
3060
|
]
|
|
2989
|
-
]
|
|
2990
|
-
]
|
|
2991
|
-
],
|
|
2992
|
-
[
|
|
2993
|
-
13,
|
|
2994
|
-
"ry",
|
|
2995
|
-
[
|
|
2996
|
-
1,
|
|
3061
|
+
],
|
|
2997
3062
|
[
|
|
2998
|
-
|
|
3063
|
+
13,
|
|
3064
|
+
"su",
|
|
2999
3065
|
[
|
|
3000
3066
|
1,
|
|
3001
3067
|
[
|
|
3002
|
-
|
|
3068
|
+
1,
|
|
3069
|
+
[5, "0.5"],
|
|
3070
|
+
"+",
|
|
3003
3071
|
[
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3072
|
+
1,
|
|
3073
|
+
[
|
|
3074
|
+
1,
|
|
3075
|
+
"rx",
|
|
3076
|
+
"*",
|
|
3077
|
+
"persp"
|
|
3078
|
+
],
|
|
3079
|
+
"/",
|
|
3080
|
+
[
|
|
3081
|
+
7,
|
|
3082
|
+
"P",
|
|
3083
|
+
"aspect"
|
|
3084
|
+
]
|
|
3085
|
+
]
|
|
3009
3086
|
],
|
|
3010
|
-
"
|
|
3087
|
+
"+",
|
|
3011
3088
|
[
|
|
3012
3089
|
7,
|
|
3013
|
-
"
|
|
3014
|
-
"
|
|
3090
|
+
"P",
|
|
3091
|
+
"transX"
|
|
3015
3092
|
]
|
|
3016
|
-
]
|
|
3017
|
-
|
|
3093
|
+
]
|
|
3094
|
+
],
|
|
3095
|
+
[
|
|
3096
|
+
13,
|
|
3097
|
+
"sv",
|
|
3018
3098
|
[
|
|
3019
3099
|
1,
|
|
3020
3100
|
[
|
|
3021
|
-
|
|
3101
|
+
1,
|
|
3102
|
+
[5, "0.5"],
|
|
3103
|
+
"+",
|
|
3022
3104
|
[
|
|
3023
|
-
|
|
3024
|
-
"
|
|
3025
|
-
"
|
|
3026
|
-
|
|
3027
|
-
|
|
3105
|
+
1,
|
|
3106
|
+
"ry",
|
|
3107
|
+
"*",
|
|
3108
|
+
"persp"
|
|
3109
|
+
]
|
|
3028
3110
|
],
|
|
3029
|
-
"
|
|
3111
|
+
"+",
|
|
3030
3112
|
[
|
|
3031
3113
|
7,
|
|
3032
|
-
"
|
|
3033
|
-
"
|
|
3114
|
+
"P",
|
|
3115
|
+
"transY"
|
|
3034
3116
|
]
|
|
3035
3117
|
]
|
|
3036
3118
|
],
|
|
3037
|
-
"+",
|
|
3038
3119
|
[
|
|
3039
|
-
|
|
3120
|
+
13,
|
|
3121
|
+
"tx",
|
|
3040
3122
|
[
|
|
3041
|
-
|
|
3123
|
+
1,
|
|
3124
|
+
"su",
|
|
3125
|
+
"*",
|
|
3042
3126
|
[
|
|
3043
3127
|
7,
|
|
3044
3128
|
"P",
|
|
3045
|
-
"
|
|
3046
|
-
]
|
|
3047
|
-
"z"
|
|
3048
|
-
],
|
|
3049
|
-
"*",
|
|
3050
|
-
[
|
|
3051
|
-
7,
|
|
3052
|
-
"pw",
|
|
3053
|
-
"z"
|
|
3129
|
+
"outW"
|
|
3130
|
+
]
|
|
3054
3131
|
]
|
|
3055
|
-
]
|
|
3056
|
-
]
|
|
3057
|
-
],
|
|
3058
|
-
[
|
|
3059
|
-
13,
|
|
3060
|
-
"rz",
|
|
3061
|
-
[
|
|
3062
|
-
1,
|
|
3132
|
+
],
|
|
3063
3133
|
[
|
|
3064
|
-
|
|
3134
|
+
13,
|
|
3135
|
+
"ty",
|
|
3065
3136
|
[
|
|
3066
3137
|
1,
|
|
3067
|
-
|
|
3068
|
-
7,
|
|
3069
|
-
[
|
|
3070
|
-
7,
|
|
3071
|
-
"P",
|
|
3072
|
-
"rowZ"
|
|
3073
|
-
],
|
|
3074
|
-
"x"
|
|
3075
|
-
],
|
|
3138
|
+
"sv",
|
|
3076
3139
|
"*",
|
|
3077
3140
|
[
|
|
3078
3141
|
7,
|
|
3079
|
-
"
|
|
3080
|
-
"
|
|
3142
|
+
"P",
|
|
3143
|
+
"outH"
|
|
3081
3144
|
]
|
|
3082
|
-
]
|
|
3083
|
-
|
|
3145
|
+
]
|
|
3146
|
+
],
|
|
3147
|
+
[
|
|
3148
|
+
13,
|
|
3149
|
+
"dotR",
|
|
3084
3150
|
[
|
|
3085
|
-
|
|
3151
|
+
6,
|
|
3086
3152
|
[
|
|
3087
3153
|
7,
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
"P",
|
|
3091
|
-
"rowZ"
|
|
3092
|
-
],
|
|
3093
|
-
"y"
|
|
3154
|
+
"std",
|
|
3155
|
+
"clamp"
|
|
3094
3156
|
],
|
|
3095
|
-
"*",
|
|
3096
3157
|
[
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3158
|
+
[
|
|
3159
|
+
1,
|
|
3160
|
+
[
|
|
3161
|
+
1,
|
|
3162
|
+
[
|
|
3163
|
+
1,
|
|
3164
|
+
[
|
|
3165
|
+
7,
|
|
3166
|
+
"P",
|
|
3167
|
+
"particleSize"
|
|
3168
|
+
],
|
|
3169
|
+
"*",
|
|
3170
|
+
[
|
|
3171
|
+
7,
|
|
3172
|
+
"P",
|
|
3173
|
+
"spacing"
|
|
3174
|
+
]
|
|
3175
|
+
],
|
|
3176
|
+
"*",
|
|
3177
|
+
[5, "0.5"]
|
|
3178
|
+
],
|
|
3179
|
+
"*",
|
|
3180
|
+
"persp"
|
|
3181
|
+
],
|
|
3182
|
+
[5, "0.5"],
|
|
3183
|
+
[
|
|
3184
|
+
6,
|
|
3185
|
+
[
|
|
3186
|
+
7,
|
|
3187
|
+
"d",
|
|
3188
|
+
"f32"
|
|
3189
|
+
],
|
|
3190
|
+
["SPLAT_R"]
|
|
3191
|
+
]
|
|
3100
3192
|
]
|
|
3101
3193
|
]
|
|
3102
3194
|
],
|
|
3103
|
-
"+",
|
|
3104
3195
|
[
|
|
3105
|
-
|
|
3196
|
+
13,
|
|
3197
|
+
"dr",
|
|
3106
3198
|
[
|
|
3107
|
-
|
|
3199
|
+
6,
|
|
3108
3200
|
[
|
|
3109
3201
|
7,
|
|
3110
|
-
"
|
|
3111
|
-
"
|
|
3202
|
+
"std",
|
|
3203
|
+
"max"
|
|
3112
3204
|
],
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
"pw",
|
|
3119
|
-
"z"
|
|
3205
|
+
[[
|
|
3206
|
+
7,
|
|
3207
|
+
"P",
|
|
3208
|
+
"depth"
|
|
3209
|
+
], [5, "0.001"]]
|
|
3120
3210
|
]
|
|
3121
|
-
]
|
|
3122
|
-
]
|
|
3123
|
-
],
|
|
3124
|
-
[
|
|
3125
|
-
13,
|
|
3126
|
-
"persp0",
|
|
3127
|
-
[
|
|
3128
|
-
1,
|
|
3129
|
-
[5, "1"],
|
|
3130
|
-
"/",
|
|
3211
|
+
],
|
|
3131
3212
|
[
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
7,
|
|
3135
|
-
"std",
|
|
3136
|
-
"clamp"
|
|
3137
|
-
],
|
|
3213
|
+
13,
|
|
3214
|
+
"near",
|
|
3138
3215
|
[
|
|
3216
|
+
6,
|
|
3217
|
+
[
|
|
3218
|
+
7,
|
|
3219
|
+
"std",
|
|
3220
|
+
"smoothstep"
|
|
3221
|
+
],
|
|
3139
3222
|
[
|
|
3140
|
-
1,
|
|
3141
|
-
[5, "1"],
|
|
3142
|
-
"-",
|
|
3143
3223
|
[
|
|
3144
3224
|
1,
|
|
3145
|
-
"
|
|
3225
|
+
"dr",
|
|
3146
3226
|
"*",
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3227
|
+
[
|
|
3228
|
+
4,
|
|
3229
|
+
"-",
|
|
3230
|
+
[5, "1"]
|
|
3231
|
+
]
|
|
3232
|
+
],
|
|
3233
|
+
"dr",
|
|
3234
|
+
"rz"
|
|
3235
|
+
]
|
|
3152
3236
|
]
|
|
3153
|
-
]
|
|
3154
|
-
]
|
|
3155
|
-
],
|
|
3156
|
-
[
|
|
3157
|
-
13,
|
|
3158
|
-
"persp",
|
|
3159
|
-
[
|
|
3160
|
-
1,
|
|
3161
|
-
"persp0",
|
|
3162
|
-
"*",
|
|
3163
|
-
[
|
|
3164
|
-
7,
|
|
3165
|
-
"P",
|
|
3166
|
-
"zoom"
|
|
3167
|
-
]
|
|
3168
|
-
]
|
|
3169
|
-
],
|
|
3170
|
-
[
|
|
3171
|
-
13,
|
|
3172
|
-
"su",
|
|
3173
|
-
[
|
|
3174
|
-
1,
|
|
3237
|
+
],
|
|
3175
3238
|
[
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
"+",
|
|
3239
|
+
13,
|
|
3240
|
+
"shade",
|
|
3179
3241
|
[
|
|
3180
|
-
|
|
3242
|
+
6,
|
|
3181
3243
|
[
|
|
3182
|
-
|
|
3183
|
-
"
|
|
3184
|
-
"
|
|
3185
|
-
"persp"
|
|
3244
|
+
7,
|
|
3245
|
+
"std",
|
|
3246
|
+
"mix"
|
|
3186
3247
|
],
|
|
3187
|
-
"/",
|
|
3188
3248
|
[
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3249
|
+
[
|
|
3250
|
+
6,
|
|
3251
|
+
[
|
|
3252
|
+
7,
|
|
3253
|
+
"d",
|
|
3254
|
+
"f32"
|
|
3255
|
+
],
|
|
3256
|
+
[[5, "1"]]
|
|
3257
|
+
],
|
|
3258
|
+
[
|
|
3259
|
+
1,
|
|
3260
|
+
[5, "0.35"],
|
|
3261
|
+
"+",
|
|
3262
|
+
[
|
|
3263
|
+
1,
|
|
3264
|
+
[5, "0.65"],
|
|
3265
|
+
"*",
|
|
3266
|
+
"near"
|
|
3267
|
+
]
|
|
3268
|
+
],
|
|
3269
|
+
[
|
|
3270
|
+
7,
|
|
3271
|
+
"P",
|
|
3272
|
+
"depthShading"
|
|
3273
|
+
]
|
|
3192
3274
|
]
|
|
3193
3275
|
]
|
|
3194
3276
|
],
|
|
3195
|
-
"+",
|
|
3196
|
-
[
|
|
3197
|
-
7,
|
|
3198
|
-
"P",
|
|
3199
|
-
"transX"
|
|
3200
|
-
]
|
|
3201
|
-
]
|
|
3202
|
-
],
|
|
3203
|
-
[
|
|
3204
|
-
13,
|
|
3205
|
-
"sv",
|
|
3206
|
-
[
|
|
3207
|
-
1,
|
|
3208
3277
|
[
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
"+",
|
|
3278
|
+
13,
|
|
3279
|
+
"depthWeight",
|
|
3212
3280
|
[
|
|
3213
3281
|
1,
|
|
3214
|
-
|
|
3282
|
+
[
|
|
3283
|
+
1,
|
|
3284
|
+
"persp0",
|
|
3285
|
+
"*",
|
|
3286
|
+
"persp0"
|
|
3287
|
+
],
|
|
3215
3288
|
"*",
|
|
3216
|
-
"
|
|
3289
|
+
"shade"
|
|
3217
3290
|
]
|
|
3218
3291
|
],
|
|
3219
|
-
"+",
|
|
3220
3292
|
[
|
|
3221
|
-
|
|
3222
|
-
"
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
"tx",
|
|
3230
|
-
[
|
|
3231
|
-
1,
|
|
3232
|
-
"su",
|
|
3233
|
-
"*",
|
|
3234
|
-
[
|
|
3235
|
-
7,
|
|
3236
|
-
"P",
|
|
3237
|
-
"outW"
|
|
3238
|
-
]
|
|
3239
|
-
]
|
|
3240
|
-
],
|
|
3241
|
-
[
|
|
3242
|
-
13,
|
|
3243
|
-
"ty",
|
|
3244
|
-
[
|
|
3245
|
-
1,
|
|
3246
|
-
"sv",
|
|
3247
|
-
"*",
|
|
3248
|
-
[
|
|
3249
|
-
7,
|
|
3250
|
-
"P",
|
|
3251
|
-
"outH"
|
|
3252
|
-
]
|
|
3253
|
-
]
|
|
3254
|
-
],
|
|
3255
|
-
[
|
|
3256
|
-
13,
|
|
3257
|
-
"dotR",
|
|
3258
|
-
[
|
|
3259
|
-
6,
|
|
3260
|
-
[
|
|
3261
|
-
7,
|
|
3262
|
-
"std",
|
|
3263
|
-
"clamp"
|
|
3293
|
+
13,
|
|
3294
|
+
"cw",
|
|
3295
|
+
[
|
|
3296
|
+
1,
|
|
3297
|
+
"childA",
|
|
3298
|
+
"*",
|
|
3299
|
+
"depthWeight"
|
|
3300
|
+
]
|
|
3264
3301
|
],
|
|
3265
3302
|
[
|
|
3303
|
+
13,
|
|
3304
|
+
"extR",
|
|
3266
3305
|
[
|
|
3267
3306
|
1,
|
|
3307
|
+
[
|
|
3308
|
+
6,
|
|
3309
|
+
[
|
|
3310
|
+
7,
|
|
3311
|
+
"d",
|
|
3312
|
+
"f32"
|
|
3313
|
+
],
|
|
3314
|
+
["EXT_SHAPE"]
|
|
3315
|
+
],
|
|
3316
|
+
"+",
|
|
3268
3317
|
[
|
|
3269
3318
|
1,
|
|
3270
3319
|
[
|
|
3271
|
-
|
|
3320
|
+
6,
|
|
3272
3321
|
[
|
|
3273
3322
|
7,
|
|
3274
|
-
"
|
|
3275
|
-
"
|
|
3323
|
+
"d",
|
|
3324
|
+
"f32"
|
|
3276
3325
|
],
|
|
3277
|
-
"
|
|
3278
|
-
[
|
|
3279
|
-
7,
|
|
3280
|
-
"P",
|
|
3281
|
-
"spacing"
|
|
3282
|
-
]
|
|
3326
|
+
["AA_W"]
|
|
3283
3327
|
],
|
|
3284
|
-
"
|
|
3285
|
-
|
|
3286
|
-
]
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3328
|
+
"/",
|
|
3329
|
+
"dotR"
|
|
3330
|
+
]
|
|
3331
|
+
]
|
|
3332
|
+
],
|
|
3333
|
+
[
|
|
3334
|
+
13,
|
|
3335
|
+
"rad",
|
|
3291
3336
|
[
|
|
3292
3337
|
6,
|
|
3293
3338
|
[
|
|
3294
3339
|
7,
|
|
3295
3340
|
"d",
|
|
3296
|
-
"
|
|
3341
|
+
"i32"
|
|
3297
3342
|
],
|
|
3298
|
-
[
|
|
3343
|
+
[[
|
|
3344
|
+
6,
|
|
3345
|
+
[
|
|
3346
|
+
7,
|
|
3347
|
+
"std",
|
|
3348
|
+
"ceil"
|
|
3349
|
+
],
|
|
3350
|
+
[[
|
|
3351
|
+
1,
|
|
3352
|
+
"dotR",
|
|
3353
|
+
"*",
|
|
3354
|
+
"extR"
|
|
3355
|
+
]]
|
|
3356
|
+
]]
|
|
3299
3357
|
]
|
|
3300
|
-
]
|
|
3301
|
-
]
|
|
3302
|
-
],
|
|
3303
|
-
[
|
|
3304
|
-
13,
|
|
3305
|
-
"dr",
|
|
3306
|
-
[
|
|
3307
|
-
6,
|
|
3308
|
-
[
|
|
3309
|
-
7,
|
|
3310
|
-
"std",
|
|
3311
|
-
"max"
|
|
3312
|
-
],
|
|
3313
|
-
[[
|
|
3314
|
-
7,
|
|
3315
|
-
"P",
|
|
3316
|
-
"depth"
|
|
3317
|
-
], [5, "0.001"]]
|
|
3318
|
-
]
|
|
3319
|
-
],
|
|
3320
|
-
[
|
|
3321
|
-
13,
|
|
3322
|
-
"near",
|
|
3323
|
-
[
|
|
3324
|
-
6,
|
|
3325
|
-
[
|
|
3326
|
-
7,
|
|
3327
|
-
"std",
|
|
3328
|
-
"smoothstep"
|
|
3329
|
-
],
|
|
3330
|
-
[
|
|
3331
|
-
[
|
|
3332
|
-
1,
|
|
3333
|
-
"dr",
|
|
3334
|
-
"*",
|
|
3335
|
-
[
|
|
3336
|
-
4,
|
|
3337
|
-
"-",
|
|
3338
|
-
[5, "1"]
|
|
3339
|
-
]
|
|
3340
|
-
],
|
|
3341
|
-
"dr",
|
|
3342
|
-
"rz"
|
|
3343
|
-
]
|
|
3344
|
-
]
|
|
3345
|
-
],
|
|
3346
|
-
[
|
|
3347
|
-
13,
|
|
3348
|
-
"shade",
|
|
3349
|
-
[
|
|
3350
|
-
6,
|
|
3351
|
-
[
|
|
3352
|
-
7,
|
|
3353
|
-
"std",
|
|
3354
|
-
"mix"
|
|
3355
3358
|
],
|
|
3356
3359
|
[
|
|
3360
|
+
13,
|
|
3361
|
+
"radF",
|
|
3357
3362
|
[
|
|
3358
3363
|
6,
|
|
3359
3364
|
[
|
|
@@ -3361,265 +3366,283 @@ function makeParticleFieldSplatKernel(shape) {
|
|
|
3361
3366
|
"d",
|
|
3362
3367
|
"f32"
|
|
3363
3368
|
],
|
|
3364
|
-
[
|
|
3365
|
-
],
|
|
3366
|
-
[
|
|
3367
|
-
1,
|
|
3368
|
-
[5, "0.35"],
|
|
3369
|
-
"+",
|
|
3370
|
-
[
|
|
3371
|
-
1,
|
|
3372
|
-
[5, "0.65"],
|
|
3373
|
-
"*",
|
|
3374
|
-
"near"
|
|
3375
|
-
]
|
|
3376
|
-
],
|
|
3377
|
-
[
|
|
3378
|
-
7,
|
|
3379
|
-
"P",
|
|
3380
|
-
"depthShading"
|
|
3369
|
+
["rad"]
|
|
3381
3370
|
]
|
|
3382
|
-
]
|
|
3383
|
-
]
|
|
3384
|
-
],
|
|
3385
|
-
[
|
|
3386
|
-
13,
|
|
3387
|
-
"depthWeight",
|
|
3388
|
-
[
|
|
3389
|
-
1,
|
|
3390
|
-
[
|
|
3391
|
-
1,
|
|
3392
|
-
"persp0",
|
|
3393
|
-
"*",
|
|
3394
|
-
"persp0"
|
|
3395
|
-
],
|
|
3396
|
-
"*",
|
|
3397
|
-
"shade"
|
|
3398
|
-
]
|
|
3399
|
-
],
|
|
3400
|
-
[
|
|
3401
|
-
13,
|
|
3402
|
-
"owI",
|
|
3403
|
-
[
|
|
3404
|
-
6,
|
|
3405
|
-
[
|
|
3406
|
-
7,
|
|
3407
|
-
"d",
|
|
3408
|
-
"i32"
|
|
3409
|
-
],
|
|
3410
|
-
[[
|
|
3411
|
-
7,
|
|
3412
|
-
"P",
|
|
3413
|
-
"outW"
|
|
3414
|
-
]]
|
|
3415
|
-
]
|
|
3416
|
-
],
|
|
3417
|
-
[
|
|
3418
|
-
13,
|
|
3419
|
-
"ohI",
|
|
3420
|
-
[
|
|
3421
|
-
6,
|
|
3422
|
-
[
|
|
3423
|
-
7,
|
|
3424
|
-
"d",
|
|
3425
|
-
"i32"
|
|
3426
|
-
],
|
|
3427
|
-
[[
|
|
3428
|
-
7,
|
|
3429
|
-
"P",
|
|
3430
|
-
"outH"
|
|
3431
|
-
]]
|
|
3432
|
-
]
|
|
3433
|
-
],
|
|
3434
|
-
[
|
|
3435
|
-
13,
|
|
3436
|
-
"owU",
|
|
3437
|
-
[
|
|
3438
|
-
6,
|
|
3439
|
-
[
|
|
3440
|
-
7,
|
|
3441
|
-
"d",
|
|
3442
|
-
"u32"
|
|
3443
3371
|
],
|
|
3444
|
-
[[
|
|
3445
|
-
7,
|
|
3446
|
-
"P",
|
|
3447
|
-
"outW"
|
|
3448
|
-
]]
|
|
3449
|
-
]
|
|
3450
|
-
],
|
|
3451
|
-
[
|
|
3452
|
-
13,
|
|
3453
|
-
"cxi",
|
|
3454
|
-
[
|
|
3455
|
-
6,
|
|
3456
3372
|
[
|
|
3457
|
-
|
|
3458
|
-
"
|
|
3459
|
-
"i32"
|
|
3460
|
-
],
|
|
3461
|
-
[[
|
|
3462
|
-
6,
|
|
3373
|
+
13,
|
|
3374
|
+
"onTarget",
|
|
3463
3375
|
[
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
1,
|
|
3520
|
-
"kx",
|
|
3521
|
-
"<",
|
|
3522
|
-
"SPLAT_WIN"
|
|
3523
|
-
],
|
|
3524
|
-
[
|
|
3525
|
-
102,
|
|
3526
|
-
"++",
|
|
3527
|
-
"kx"
|
|
3528
|
-
],
|
|
3529
|
-
[0, [
|
|
3530
|
-
[
|
|
3531
|
-
13,
|
|
3532
|
-
"px",
|
|
3376
|
+
3,
|
|
3377
|
+
[
|
|
3378
|
+
3,
|
|
3379
|
+
[
|
|
3380
|
+
3,
|
|
3381
|
+
[
|
|
3382
|
+
1,
|
|
3383
|
+
"tx",
|
|
3384
|
+
">",
|
|
3385
|
+
[
|
|
3386
|
+
1,
|
|
3387
|
+
"radF",
|
|
3388
|
+
"*",
|
|
3389
|
+
[
|
|
3390
|
+
4,
|
|
3391
|
+
"-",
|
|
3392
|
+
[5, "1"]
|
|
3393
|
+
]
|
|
3394
|
+
]
|
|
3395
|
+
],
|
|
3396
|
+
"&&",
|
|
3397
|
+
[
|
|
3398
|
+
1,
|
|
3399
|
+
"tx",
|
|
3400
|
+
"<",
|
|
3401
|
+
[
|
|
3402
|
+
1,
|
|
3403
|
+
[
|
|
3404
|
+
7,
|
|
3405
|
+
"P",
|
|
3406
|
+
"outW"
|
|
3407
|
+
],
|
|
3408
|
+
"+",
|
|
3409
|
+
"radF"
|
|
3410
|
+
]
|
|
3411
|
+
]
|
|
3412
|
+
],
|
|
3413
|
+
"&&",
|
|
3414
|
+
[
|
|
3415
|
+
1,
|
|
3416
|
+
"ty",
|
|
3417
|
+
">",
|
|
3418
|
+
[
|
|
3419
|
+
1,
|
|
3420
|
+
"radF",
|
|
3421
|
+
"*",
|
|
3422
|
+
[
|
|
3423
|
+
4,
|
|
3424
|
+
"-",
|
|
3425
|
+
[5, "1"]
|
|
3426
|
+
]
|
|
3427
|
+
]
|
|
3428
|
+
]
|
|
3429
|
+
],
|
|
3430
|
+
"&&",
|
|
3533
3431
|
[
|
|
3534
3432
|
1,
|
|
3433
|
+
"ty",
|
|
3434
|
+
"<",
|
|
3535
3435
|
[
|
|
3536
3436
|
1,
|
|
3537
|
-
|
|
3437
|
+
[
|
|
3438
|
+
7,
|
|
3439
|
+
"P",
|
|
3440
|
+
"outH"
|
|
3441
|
+
],
|
|
3538
3442
|
"+",
|
|
3539
|
-
"
|
|
3540
|
-
]
|
|
3541
|
-
"-",
|
|
3542
|
-
"SPLAT_R"
|
|
3443
|
+
"radF"
|
|
3444
|
+
]
|
|
3543
3445
|
]
|
|
3544
|
-
]
|
|
3446
|
+
]
|
|
3447
|
+
],
|
|
3448
|
+
[
|
|
3449
|
+
11,
|
|
3545
3450
|
[
|
|
3546
|
-
|
|
3547
|
-
"py",
|
|
3451
|
+
3,
|
|
3548
3452
|
[
|
|
3549
3453
|
1,
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
"-",
|
|
3557
|
-
"SPLAT_R"
|
|
3558
|
-
]
|
|
3454
|
+
"cw",
|
|
3455
|
+
">",
|
|
3456
|
+
"MIN_WEIGHT"
|
|
3457
|
+
],
|
|
3458
|
+
"&&",
|
|
3459
|
+
"onTarget"
|
|
3559
3460
|
],
|
|
3560
|
-
[
|
|
3561
|
-
11,
|
|
3461
|
+
[0, [
|
|
3562
3462
|
[
|
|
3563
|
-
|
|
3463
|
+
13,
|
|
3464
|
+
"owU",
|
|
3564
3465
|
[
|
|
3565
|
-
|
|
3466
|
+
6,
|
|
3467
|
+
[
|
|
3468
|
+
7,
|
|
3469
|
+
"d",
|
|
3470
|
+
"u32"
|
|
3471
|
+
],
|
|
3472
|
+
[[
|
|
3473
|
+
7,
|
|
3474
|
+
"P",
|
|
3475
|
+
"outW"
|
|
3476
|
+
]]
|
|
3477
|
+
]
|
|
3478
|
+
],
|
|
3479
|
+
[
|
|
3480
|
+
13,
|
|
3481
|
+
"cxi",
|
|
3482
|
+
[
|
|
3483
|
+
6,
|
|
3566
3484
|
[
|
|
3567
|
-
|
|
3485
|
+
7,
|
|
3486
|
+
"d",
|
|
3487
|
+
"i32"
|
|
3488
|
+
],
|
|
3489
|
+
[[
|
|
3490
|
+
6,
|
|
3568
3491
|
[
|
|
3569
|
-
|
|
3570
|
-
"
|
|
3571
|
-
"
|
|
3572
|
-
[5, "0"]
|
|
3492
|
+
7,
|
|
3493
|
+
"std",
|
|
3494
|
+
"floor"
|
|
3573
3495
|
],
|
|
3574
|
-
"
|
|
3496
|
+
["tx"]
|
|
3497
|
+
]]
|
|
3498
|
+
]
|
|
3499
|
+
],
|
|
3500
|
+
[
|
|
3501
|
+
13,
|
|
3502
|
+
"cyi",
|
|
3503
|
+
[
|
|
3504
|
+
6,
|
|
3505
|
+
[
|
|
3506
|
+
7,
|
|
3507
|
+
"d",
|
|
3508
|
+
"i32"
|
|
3509
|
+
],
|
|
3510
|
+
[[
|
|
3511
|
+
6,
|
|
3575
3512
|
[
|
|
3576
|
-
|
|
3577
|
-
"
|
|
3578
|
-
"
|
|
3579
|
-
|
|
3580
|
-
]
|
|
3513
|
+
7,
|
|
3514
|
+
"std",
|
|
3515
|
+
"floor"
|
|
3516
|
+
],
|
|
3517
|
+
["ty"]
|
|
3518
|
+
]]
|
|
3519
|
+
]
|
|
3520
|
+
],
|
|
3521
|
+
[
|
|
3522
|
+
13,
|
|
3523
|
+
"x0",
|
|
3524
|
+
[
|
|
3525
|
+
6,
|
|
3526
|
+
[
|
|
3527
|
+
7,
|
|
3528
|
+
"std",
|
|
3529
|
+
"max"
|
|
3581
3530
|
],
|
|
3582
|
-
|
|
3531
|
+
[[
|
|
3532
|
+
1,
|
|
3533
|
+
"cxi",
|
|
3534
|
+
"-",
|
|
3535
|
+
"rad"
|
|
3536
|
+
], [5, "0"]]
|
|
3537
|
+
]
|
|
3538
|
+
],
|
|
3539
|
+
[
|
|
3540
|
+
13,
|
|
3541
|
+
"x1",
|
|
3542
|
+
[
|
|
3543
|
+
6,
|
|
3583
3544
|
[
|
|
3545
|
+
7,
|
|
3546
|
+
"std",
|
|
3547
|
+
"min"
|
|
3548
|
+
],
|
|
3549
|
+
[[
|
|
3584
3550
|
1,
|
|
3585
|
-
"
|
|
3586
|
-
"
|
|
3587
|
-
|
|
3588
|
-
]
|
|
3589
|
-
|
|
3590
|
-
|
|
3551
|
+
"cxi",
|
|
3552
|
+
"+",
|
|
3553
|
+
"rad"
|
|
3554
|
+
], [
|
|
3555
|
+
1,
|
|
3556
|
+
[
|
|
3557
|
+
6,
|
|
3558
|
+
[
|
|
3559
|
+
7,
|
|
3560
|
+
"d",
|
|
3561
|
+
"i32"
|
|
3562
|
+
],
|
|
3563
|
+
[[
|
|
3564
|
+
7,
|
|
3565
|
+
"P",
|
|
3566
|
+
"outW"
|
|
3567
|
+
]]
|
|
3568
|
+
],
|
|
3569
|
+
"-",
|
|
3570
|
+
[5, "1"]
|
|
3571
|
+
]]
|
|
3572
|
+
]
|
|
3573
|
+
],
|
|
3574
|
+
[
|
|
3575
|
+
13,
|
|
3576
|
+
"y0",
|
|
3591
3577
|
[
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3578
|
+
6,
|
|
3579
|
+
[
|
|
3580
|
+
7,
|
|
3581
|
+
"std",
|
|
3582
|
+
"max"
|
|
3583
|
+
],
|
|
3584
|
+
[[
|
|
3585
|
+
1,
|
|
3586
|
+
"cyi",
|
|
3587
|
+
"-",
|
|
3588
|
+
"rad"
|
|
3589
|
+
], [5, "0"]]
|
|
3596
3590
|
]
|
|
3597
3591
|
],
|
|
3598
|
-
[
|
|
3592
|
+
[
|
|
3593
|
+
13,
|
|
3594
|
+
"y1",
|
|
3599
3595
|
[
|
|
3600
|
-
|
|
3601
|
-
"ddx",
|
|
3596
|
+
6,
|
|
3602
3597
|
[
|
|
3598
|
+
7,
|
|
3599
|
+
"std",
|
|
3600
|
+
"min"
|
|
3601
|
+
],
|
|
3602
|
+
[[
|
|
3603
|
+
1,
|
|
3604
|
+
"cyi",
|
|
3605
|
+
"+",
|
|
3606
|
+
"rad"
|
|
3607
|
+
], [
|
|
3603
3608
|
1,
|
|
3604
3609
|
[
|
|
3605
|
-
|
|
3610
|
+
6,
|
|
3606
3611
|
[
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
"d",
|
|
3611
|
-
"f32"
|
|
3612
|
-
],
|
|
3613
|
-
["px"]
|
|
3612
|
+
7,
|
|
3613
|
+
"d",
|
|
3614
|
+
"i32"
|
|
3614
3615
|
],
|
|
3615
|
-
|
|
3616
|
-
|
|
3616
|
+
[[
|
|
3617
|
+
7,
|
|
3618
|
+
"P",
|
|
3619
|
+
"outH"
|
|
3620
|
+
]]
|
|
3617
3621
|
],
|
|
3618
3622
|
"-",
|
|
3619
|
-
"
|
|
3620
|
-
]
|
|
3623
|
+
[5, "1"]
|
|
3624
|
+
]]
|
|
3625
|
+
]
|
|
3626
|
+
],
|
|
3627
|
+
[
|
|
3628
|
+
14,
|
|
3629
|
+
[
|
|
3630
|
+
12,
|
|
3631
|
+
"py",
|
|
3632
|
+
"y0"
|
|
3633
|
+
],
|
|
3634
|
+
[
|
|
3635
|
+
1,
|
|
3636
|
+
"py",
|
|
3637
|
+
"<=",
|
|
3638
|
+
"y1"
|
|
3621
3639
|
],
|
|
3622
3640
|
[
|
|
3641
|
+
102,
|
|
3642
|
+
"++",
|
|
3643
|
+
"py"
|
|
3644
|
+
],
|
|
3645
|
+
[0, [[
|
|
3623
3646
|
13,
|
|
3624
3647
|
"ddy",
|
|
3625
3648
|
[
|
|
@@ -3641,73 +3664,32 @@ function makeParticleFieldSplatKernel(shape) {
|
|
|
3641
3664
|
"-",
|
|
3642
3665
|
"ty"
|
|
3643
3666
|
]
|
|
3644
|
-
],
|
|
3645
|
-
|
|
3646
|
-
13,
|
|
3647
|
-
"q",
|
|
3667
|
+
], [
|
|
3668
|
+
14,
|
|
3648
3669
|
[
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
1,
|
|
3654
|
-
"ddx",
|
|
3655
|
-
"*",
|
|
3656
|
-
"ddx"
|
|
3657
|
-
],
|
|
3658
|
-
"+",
|
|
3659
|
-
[
|
|
3660
|
-
1,
|
|
3661
|
-
"ddy",
|
|
3662
|
-
"*",
|
|
3663
|
-
"ddy"
|
|
3664
|
-
]
|
|
3665
|
-
],
|
|
3666
|
-
"/",
|
|
3667
|
-
[
|
|
3668
|
-
6,
|
|
3669
|
-
[
|
|
3670
|
-
7,
|
|
3671
|
-
"std",
|
|
3672
|
-
"max"
|
|
3673
|
-
],
|
|
3674
|
-
[[
|
|
3675
|
-
1,
|
|
3676
|
-
"dotR",
|
|
3677
|
-
"*",
|
|
3678
|
-
"dotR"
|
|
3679
|
-
], [5, "0.01"]]
|
|
3680
|
-
]
|
|
3681
|
-
]
|
|
3682
|
-
],
|
|
3683
|
-
[
|
|
3684
|
-
11,
|
|
3670
|
+
12,
|
|
3671
|
+
"px",
|
|
3672
|
+
"x0"
|
|
3673
|
+
],
|
|
3685
3674
|
[
|
|
3686
3675
|
1,
|
|
3687
|
-
"
|
|
3688
|
-
"
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
],
|
|
3696
|
-
["EXTQ"]
|
|
3697
|
-
]
|
|
3676
|
+
"px",
|
|
3677
|
+
"<=",
|
|
3678
|
+
"x1"
|
|
3679
|
+
],
|
|
3680
|
+
[
|
|
3681
|
+
102,
|
|
3682
|
+
"++",
|
|
3683
|
+
"px"
|
|
3698
3684
|
],
|
|
3699
3685
|
[0, [
|
|
3700
3686
|
[
|
|
3701
3687
|
13,
|
|
3702
|
-
"
|
|
3688
|
+
"ddx",
|
|
3703
3689
|
[
|
|
3704
|
-
|
|
3705
|
-
"weightFn",
|
|
3690
|
+
1,
|
|
3706
3691
|
[
|
|
3707
|
-
|
|
3708
|
-
"ddy",
|
|
3709
|
-
"dotR",
|
|
3710
|
-
[5, "0.75"],
|
|
3692
|
+
1,
|
|
3711
3693
|
[
|
|
3712
3694
|
6,
|
|
3713
3695
|
[
|
|
@@ -3715,285 +3697,359 @@ function makeParticleFieldSplatKernel(shape) {
|
|
|
3715
3697
|
"d",
|
|
3716
3698
|
"f32"
|
|
3717
3699
|
],
|
|
3718
|
-
["
|
|
3719
|
-
]
|
|
3720
|
-
|
|
3700
|
+
["px"]
|
|
3701
|
+
],
|
|
3702
|
+
"+",
|
|
3703
|
+
[5, "0.5"]
|
|
3704
|
+
],
|
|
3705
|
+
"-",
|
|
3706
|
+
"tx"
|
|
3721
3707
|
]
|
|
3722
3708
|
],
|
|
3723
3709
|
[
|
|
3724
3710
|
13,
|
|
3725
|
-
"
|
|
3711
|
+
"q",
|
|
3726
3712
|
[
|
|
3727
3713
|
1,
|
|
3728
3714
|
[
|
|
3729
3715
|
1,
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3716
|
+
[
|
|
3717
|
+
1,
|
|
3718
|
+
"ddx",
|
|
3719
|
+
"*",
|
|
3720
|
+
"ddx"
|
|
3721
|
+
],
|
|
3722
|
+
"+",
|
|
3723
|
+
[
|
|
3724
|
+
1,
|
|
3725
|
+
"ddy",
|
|
3726
|
+
"*",
|
|
3727
|
+
"ddy"
|
|
3728
|
+
]
|
|
3733
3729
|
],
|
|
3734
|
-
"
|
|
3735
|
-
|
|
3730
|
+
"/",
|
|
3731
|
+
[
|
|
3732
|
+
6,
|
|
3733
|
+
[
|
|
3734
|
+
7,
|
|
3735
|
+
"std",
|
|
3736
|
+
"max"
|
|
3737
|
+
],
|
|
3738
|
+
[[
|
|
3739
|
+
1,
|
|
3740
|
+
"dotR",
|
|
3741
|
+
"*",
|
|
3742
|
+
"dotR"
|
|
3743
|
+
], [5, "0.01"]]
|
|
3744
|
+
]
|
|
3736
3745
|
]
|
|
3737
3746
|
],
|
|
3738
3747
|
[
|
|
3739
3748
|
11,
|
|
3740
3749
|
[
|
|
3741
3750
|
1,
|
|
3742
|
-
"
|
|
3743
|
-
"
|
|
3744
|
-
[
|
|
3751
|
+
"q",
|
|
3752
|
+
"<",
|
|
3753
|
+
[
|
|
3754
|
+
1,
|
|
3755
|
+
"extR",
|
|
3756
|
+
"*",
|
|
3757
|
+
"extR"
|
|
3758
|
+
]
|
|
3745
3759
|
],
|
|
3746
|
-
[0, [
|
|
3760
|
+
[0, [[
|
|
3761
|
+
13,
|
|
3762
|
+
"wc",
|
|
3747
3763
|
[
|
|
3748
|
-
|
|
3749
|
-
"idx",
|
|
3764
|
+
1,
|
|
3750
3765
|
[
|
|
3751
|
-
|
|
3766
|
+
6,
|
|
3767
|
+
"weightFn",
|
|
3768
|
+
[
|
|
3769
|
+
"q",
|
|
3770
|
+
"ddx",
|
|
3771
|
+
"ddy",
|
|
3772
|
+
"dotR",
|
|
3773
|
+
[
|
|
3774
|
+
6,
|
|
3775
|
+
[
|
|
3776
|
+
7,
|
|
3777
|
+
"d",
|
|
3778
|
+
"f32"
|
|
3779
|
+
],
|
|
3780
|
+
["AA_W"]
|
|
3781
|
+
]
|
|
3782
|
+
]
|
|
3783
|
+
],
|
|
3784
|
+
"*",
|
|
3785
|
+
"cw"
|
|
3786
|
+
]
|
|
3787
|
+
], [
|
|
3788
|
+
11,
|
|
3789
|
+
[
|
|
3790
|
+
1,
|
|
3791
|
+
"wc",
|
|
3792
|
+
">",
|
|
3793
|
+
[5, "0"]
|
|
3794
|
+
],
|
|
3795
|
+
[0, [
|
|
3796
|
+
[
|
|
3797
|
+
13,
|
|
3798
|
+
"idx",
|
|
3752
3799
|
[
|
|
3753
3800
|
1,
|
|
3754
3801
|
[
|
|
3755
|
-
|
|
3802
|
+
1,
|
|
3803
|
+
[
|
|
3804
|
+
6,
|
|
3805
|
+
[
|
|
3806
|
+
7,
|
|
3807
|
+
"d",
|
|
3808
|
+
"u32"
|
|
3809
|
+
],
|
|
3810
|
+
["py"]
|
|
3811
|
+
],
|
|
3812
|
+
"*",
|
|
3813
|
+
"owU"
|
|
3814
|
+
],
|
|
3815
|
+
"+",
|
|
3816
|
+
[
|
|
3817
|
+
6,
|
|
3818
|
+
[
|
|
3819
|
+
7,
|
|
3820
|
+
"d",
|
|
3821
|
+
"u32"
|
|
3822
|
+
],
|
|
3823
|
+
["px"]
|
|
3824
|
+
]
|
|
3825
|
+
]
|
|
3826
|
+
],
|
|
3827
|
+
[
|
|
3828
|
+
6,
|
|
3829
|
+
[
|
|
3830
|
+
7,
|
|
3831
|
+
"std",
|
|
3832
|
+
"atomicAdd"
|
|
3833
|
+
],
|
|
3834
|
+
[[
|
|
3835
|
+
8,
|
|
3836
|
+
[
|
|
3837
|
+
7,
|
|
3756
3838
|
[
|
|
3757
3839
|
7,
|
|
3758
|
-
"
|
|
3759
|
-
"
|
|
3840
|
+
"fieldLayout",
|
|
3841
|
+
"$"
|
|
3760
3842
|
],
|
|
3761
|
-
|
|
3843
|
+
"accumR"
|
|
3762
3844
|
],
|
|
3763
|
-
"
|
|
3764
|
-
|
|
3765
|
-
],
|
|
3766
|
-
"+",
|
|
3767
|
-
[
|
|
3845
|
+
"idx"
|
|
3846
|
+
], [
|
|
3768
3847
|
6,
|
|
3769
3848
|
[
|
|
3770
3849
|
7,
|
|
3771
3850
|
"d",
|
|
3772
3851
|
"u32"
|
|
3773
3852
|
],
|
|
3774
|
-
[
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3853
|
+
[[
|
|
3854
|
+
1,
|
|
3855
|
+
[
|
|
3856
|
+
1,
|
|
3857
|
+
[
|
|
3858
|
+
7,
|
|
3859
|
+
"col",
|
|
3860
|
+
"x"
|
|
3861
|
+
],
|
|
3862
|
+
"*",
|
|
3863
|
+
"wc"
|
|
3864
|
+
],
|
|
3865
|
+
"*",
|
|
3866
|
+
"FP"
|
|
3867
|
+
]]
|
|
3868
|
+
]]
|
|
3784
3869
|
],
|
|
3785
|
-
[
|
|
3786
|
-
8,
|
|
3787
|
-
[
|
|
3788
|
-
7,
|
|
3789
|
-
[
|
|
3790
|
-
7,
|
|
3791
|
-
"fieldLayout",
|
|
3792
|
-
"$"
|
|
3793
|
-
],
|
|
3794
|
-
"accumR"
|
|
3795
|
-
],
|
|
3796
|
-
"idx"
|
|
3797
|
-
], [
|
|
3870
|
+
[
|
|
3798
3871
|
6,
|
|
3799
3872
|
[
|
|
3800
3873
|
7,
|
|
3801
|
-
"
|
|
3802
|
-
"
|
|
3874
|
+
"std",
|
|
3875
|
+
"atomicAdd"
|
|
3803
3876
|
],
|
|
3804
3877
|
[[
|
|
3805
|
-
|
|
3878
|
+
8,
|
|
3806
3879
|
[
|
|
3807
|
-
|
|
3880
|
+
7,
|
|
3808
3881
|
[
|
|
3809
3882
|
7,
|
|
3810
|
-
"
|
|
3811
|
-
"
|
|
3883
|
+
"fieldLayout",
|
|
3884
|
+
"$"
|
|
3812
3885
|
],
|
|
3813
|
-
"
|
|
3814
|
-
"wc"
|
|
3886
|
+
"accumG"
|
|
3815
3887
|
],
|
|
3816
|
-
"
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
]]
|
|
3820
|
-
],
|
|
3821
|
-
[
|
|
3822
|
-
6,
|
|
3823
|
-
[
|
|
3824
|
-
7,
|
|
3825
|
-
"std",
|
|
3826
|
-
"atomicAdd"
|
|
3827
|
-
],
|
|
3828
|
-
[[
|
|
3829
|
-
8,
|
|
3830
|
-
[
|
|
3831
|
-
7,
|
|
3888
|
+
"idx"
|
|
3889
|
+
], [
|
|
3890
|
+
6,
|
|
3832
3891
|
[
|
|
3833
3892
|
7,
|
|
3834
|
-
"
|
|
3835
|
-
"
|
|
3893
|
+
"d",
|
|
3894
|
+
"u32"
|
|
3836
3895
|
],
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3896
|
+
[[
|
|
3897
|
+
1,
|
|
3898
|
+
[
|
|
3899
|
+
1,
|
|
3900
|
+
[
|
|
3901
|
+
7,
|
|
3902
|
+
"col",
|
|
3903
|
+
"y"
|
|
3904
|
+
],
|
|
3905
|
+
"*",
|
|
3906
|
+
"wc"
|
|
3907
|
+
],
|
|
3908
|
+
"*",
|
|
3909
|
+
"FP"
|
|
3910
|
+
]]
|
|
3911
|
+
]]
|
|
3912
|
+
],
|
|
3913
|
+
[
|
|
3841
3914
|
6,
|
|
3842
3915
|
[
|
|
3843
3916
|
7,
|
|
3844
|
-
"
|
|
3845
|
-
"
|
|
3917
|
+
"std",
|
|
3918
|
+
"atomicAdd"
|
|
3846
3919
|
],
|
|
3847
3920
|
[[
|
|
3848
|
-
|
|
3921
|
+
8,
|
|
3849
3922
|
[
|
|
3850
|
-
|
|
3923
|
+
7,
|
|
3851
3924
|
[
|
|
3852
3925
|
7,
|
|
3853
|
-
"
|
|
3854
|
-
"
|
|
3926
|
+
"fieldLayout",
|
|
3927
|
+
"$"
|
|
3855
3928
|
],
|
|
3856
|
-
"
|
|
3857
|
-
"wc"
|
|
3929
|
+
"accumB"
|
|
3858
3930
|
],
|
|
3859
|
-
"
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
]]
|
|
3863
|
-
],
|
|
3864
|
-
[
|
|
3865
|
-
6,
|
|
3866
|
-
[
|
|
3867
|
-
7,
|
|
3868
|
-
"std",
|
|
3869
|
-
"atomicAdd"
|
|
3870
|
-
],
|
|
3871
|
-
[[
|
|
3872
|
-
8,
|
|
3873
|
-
[
|
|
3874
|
-
7,
|
|
3931
|
+
"idx"
|
|
3932
|
+
], [
|
|
3933
|
+
6,
|
|
3875
3934
|
[
|
|
3876
3935
|
7,
|
|
3877
|
-
"
|
|
3878
|
-
"
|
|
3936
|
+
"d",
|
|
3937
|
+
"u32"
|
|
3879
3938
|
],
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3939
|
+
[[
|
|
3940
|
+
1,
|
|
3941
|
+
[
|
|
3942
|
+
1,
|
|
3943
|
+
[
|
|
3944
|
+
7,
|
|
3945
|
+
"col",
|
|
3946
|
+
"z"
|
|
3947
|
+
],
|
|
3948
|
+
"*",
|
|
3949
|
+
"wc"
|
|
3950
|
+
],
|
|
3951
|
+
"*",
|
|
3952
|
+
"FP"
|
|
3953
|
+
]]
|
|
3954
|
+
]]
|
|
3955
|
+
],
|
|
3956
|
+
[
|
|
3884
3957
|
6,
|
|
3885
3958
|
[
|
|
3886
3959
|
7,
|
|
3887
|
-
"
|
|
3888
|
-
"
|
|
3960
|
+
"std",
|
|
3961
|
+
"atomicAdd"
|
|
3889
3962
|
],
|
|
3890
3963
|
[[
|
|
3891
|
-
|
|
3964
|
+
8,
|
|
3892
3965
|
[
|
|
3893
|
-
|
|
3966
|
+
7,
|
|
3894
3967
|
[
|
|
3895
3968
|
7,
|
|
3896
|
-
"
|
|
3897
|
-
"
|
|
3969
|
+
"fieldLayout",
|
|
3970
|
+
"$"
|
|
3898
3971
|
],
|
|
3899
|
-
"
|
|
3900
|
-
"wc"
|
|
3972
|
+
"accumW"
|
|
3901
3973
|
],
|
|
3902
|
-
"
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
]]
|
|
3906
|
-
],
|
|
3907
|
-
[
|
|
3908
|
-
6,
|
|
3909
|
-
[
|
|
3910
|
-
7,
|
|
3911
|
-
"std",
|
|
3912
|
-
"atomicAdd"
|
|
3913
|
-
],
|
|
3914
|
-
[[
|
|
3915
|
-
8,
|
|
3916
|
-
[
|
|
3917
|
-
7,
|
|
3974
|
+
"idx"
|
|
3975
|
+
], [
|
|
3976
|
+
6,
|
|
3918
3977
|
[
|
|
3919
3978
|
7,
|
|
3920
|
-
"
|
|
3921
|
-
"
|
|
3979
|
+
"d",
|
|
3980
|
+
"u32"
|
|
3922
3981
|
],
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
7,
|
|
3930
|
-
"d",
|
|
3931
|
-
"u32"
|
|
3932
|
-
],
|
|
3933
|
-
[[
|
|
3934
|
-
1,
|
|
3935
|
-
"wc",
|
|
3936
|
-
"*",
|
|
3937
|
-
"FP"
|
|
3982
|
+
[[
|
|
3983
|
+
1,
|
|
3984
|
+
"wc",
|
|
3985
|
+
"*",
|
|
3986
|
+
"FP"
|
|
3987
|
+
]]
|
|
3938
3988
|
]]
|
|
3939
|
-
]
|
|
3940
|
-
]
|
|
3941
|
-
]]
|
|
3989
|
+
]
|
|
3990
|
+
]]
|
|
3991
|
+
]]]
|
|
3942
3992
|
]
|
|
3943
3993
|
]]
|
|
3944
|
-
]
|
|
3945
|
-
]
|
|
3946
|
-
]
|
|
3947
|
-
]
|
|
3948
|
-
]]
|
|
3994
|
+
]]]
|
|
3995
|
+
]
|
|
3996
|
+
]]
|
|
3997
|
+
]
|
|
3998
|
+
]]
|
|
3949
3999
|
]
|
|
3950
4000
|
]],
|
|
3951
4001
|
"externalNames": [
|
|
3952
4002
|
"fieldLayout",
|
|
3953
4003
|
"d",
|
|
4004
|
+
"MIN_ALPHA",
|
|
3954
4005
|
"TAU",
|
|
3955
4006
|
"std",
|
|
3956
4007
|
"WOBBLE_FREQ",
|
|
3957
4008
|
"PERSP_K",
|
|
3958
4009
|
"SPLAT_R",
|
|
3959
|
-
"
|
|
3960
|
-
"
|
|
4010
|
+
"EXT_SHAPE",
|
|
4011
|
+
"AA_W",
|
|
4012
|
+
"MIN_WEIGHT",
|
|
3961
4013
|
"weightFn",
|
|
3962
|
-
"SOFT",
|
|
3963
4014
|
"FP"
|
|
3964
4015
|
]
|
|
3965
4016
|
},
|
|
3966
4017
|
externals: () => ({
|
|
3967
4018
|
fieldLayout,
|
|
3968
|
-
d,
|
|
4019
|
+
d: data_exports,
|
|
4020
|
+
MIN_ALPHA,
|
|
3969
4021
|
TAU,
|
|
3970
|
-
std,
|
|
4022
|
+
std: std_exports,
|
|
3971
4023
|
WOBBLE_FREQ,
|
|
3972
4024
|
PERSP_K,
|
|
3973
4025
|
SPLAT_R,
|
|
3974
|
-
|
|
3975
|
-
|
|
4026
|
+
EXT_SHAPE,
|
|
4027
|
+
AA_W,
|
|
4028
|
+
MIN_WEIGHT,
|
|
3976
4029
|
weightFn,
|
|
3977
|
-
SOFT,
|
|
3978
4030
|
FP
|
|
3979
4031
|
})
|
|
3980
4032
|
}) && $.f)({})).$name("particleFieldSplat");
|
|
3981
4033
|
}
|
|
3982
4034
|
const particleFieldSplatKernel = makeParticleFieldSplatKernel("dot");
|
|
3983
|
-
const particleFieldResolveKernel =
|
|
4035
|
+
const particleFieldResolveKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
3984
4036
|
"use gpu";
|
|
3985
4037
|
const P = fieldLayout.$.params;
|
|
3986
|
-
const idx = __tsover_add(__tsover_mul(y,
|
|
3987
|
-
const wRaw =
|
|
3988
|
-
const rRaw =
|
|
3989
|
-
const gRaw =
|
|
3990
|
-
const bRaw =
|
|
3991
|
-
|
|
4038
|
+
const idx = __tsover_add(__tsover_mul(y, u32(P.outW)), x);
|
|
4039
|
+
const wRaw = f32(atomicLoad(fieldLayout.$.accumW[idx]));
|
|
4040
|
+
const rRaw = f32(atomicLoad(fieldLayout.$.accumR[idx]));
|
|
4041
|
+
const gRaw = f32(atomicLoad(fieldLayout.$.accumG[idx]));
|
|
4042
|
+
const bRaw = f32(atomicLoad(fieldLayout.$.accumB[idx]));
|
|
4043
|
+
atomicStore(fieldLayout.$.accumR[idx], u32(0));
|
|
4044
|
+
atomicStore(fieldLayout.$.accumG[idx], u32(0));
|
|
4045
|
+
atomicStore(fieldLayout.$.accumB[idx], u32(0));
|
|
4046
|
+
atomicStore(fieldLayout.$.accumW[idx], u32(0));
|
|
4047
|
+
const denom = max(wRaw, f32(1));
|
|
3992
4048
|
const r = __tsover_div(rRaw, denom);
|
|
3993
4049
|
const g = __tsover_div(gRaw, denom);
|
|
3994
4050
|
const b = __tsover_div(bRaw, denom);
|
|
3995
|
-
const alpha = __tsover_sub(1,
|
|
3996
|
-
|
|
4051
|
+
const alpha = __tsover_sub(1, exp(__tsover_mul(__tsover_mul(wRaw, __tsover_div(1, FP)), -ALPHA_K)));
|
|
4052
|
+
textureStore(fieldLayout.$.outTex, vec2u(x, y), vec4f(r, g, b, alpha));
|
|
3997
4053
|
}), {
|
|
3998
4054
|
v: 1,
|
|
3999
4055
|
name: void 0,
|
|
@@ -4178,6 +4234,122 @@ const particleFieldResolveKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
4178
4234
|
]]
|
|
4179
4235
|
]
|
|
4180
4236
|
],
|
|
4237
|
+
[
|
|
4238
|
+
6,
|
|
4239
|
+
[
|
|
4240
|
+
7,
|
|
4241
|
+
"std",
|
|
4242
|
+
"atomicStore"
|
|
4243
|
+
],
|
|
4244
|
+
[[
|
|
4245
|
+
8,
|
|
4246
|
+
[
|
|
4247
|
+
7,
|
|
4248
|
+
[
|
|
4249
|
+
7,
|
|
4250
|
+
"fieldLayout",
|
|
4251
|
+
"$"
|
|
4252
|
+
],
|
|
4253
|
+
"accumR"
|
|
4254
|
+
],
|
|
4255
|
+
"idx"
|
|
4256
|
+
], [
|
|
4257
|
+
6,
|
|
4258
|
+
[
|
|
4259
|
+
7,
|
|
4260
|
+
"d",
|
|
4261
|
+
"u32"
|
|
4262
|
+
],
|
|
4263
|
+
[[5, "0"]]
|
|
4264
|
+
]]
|
|
4265
|
+
],
|
|
4266
|
+
[
|
|
4267
|
+
6,
|
|
4268
|
+
[
|
|
4269
|
+
7,
|
|
4270
|
+
"std",
|
|
4271
|
+
"atomicStore"
|
|
4272
|
+
],
|
|
4273
|
+
[[
|
|
4274
|
+
8,
|
|
4275
|
+
[
|
|
4276
|
+
7,
|
|
4277
|
+
[
|
|
4278
|
+
7,
|
|
4279
|
+
"fieldLayout",
|
|
4280
|
+
"$"
|
|
4281
|
+
],
|
|
4282
|
+
"accumG"
|
|
4283
|
+
],
|
|
4284
|
+
"idx"
|
|
4285
|
+
], [
|
|
4286
|
+
6,
|
|
4287
|
+
[
|
|
4288
|
+
7,
|
|
4289
|
+
"d",
|
|
4290
|
+
"u32"
|
|
4291
|
+
],
|
|
4292
|
+
[[5, "0"]]
|
|
4293
|
+
]]
|
|
4294
|
+
],
|
|
4295
|
+
[
|
|
4296
|
+
6,
|
|
4297
|
+
[
|
|
4298
|
+
7,
|
|
4299
|
+
"std",
|
|
4300
|
+
"atomicStore"
|
|
4301
|
+
],
|
|
4302
|
+
[[
|
|
4303
|
+
8,
|
|
4304
|
+
[
|
|
4305
|
+
7,
|
|
4306
|
+
[
|
|
4307
|
+
7,
|
|
4308
|
+
"fieldLayout",
|
|
4309
|
+
"$"
|
|
4310
|
+
],
|
|
4311
|
+
"accumB"
|
|
4312
|
+
],
|
|
4313
|
+
"idx"
|
|
4314
|
+
], [
|
|
4315
|
+
6,
|
|
4316
|
+
[
|
|
4317
|
+
7,
|
|
4318
|
+
"d",
|
|
4319
|
+
"u32"
|
|
4320
|
+
],
|
|
4321
|
+
[[5, "0"]]
|
|
4322
|
+
]]
|
|
4323
|
+
],
|
|
4324
|
+
[
|
|
4325
|
+
6,
|
|
4326
|
+
[
|
|
4327
|
+
7,
|
|
4328
|
+
"std",
|
|
4329
|
+
"atomicStore"
|
|
4330
|
+
],
|
|
4331
|
+
[[
|
|
4332
|
+
8,
|
|
4333
|
+
[
|
|
4334
|
+
7,
|
|
4335
|
+
[
|
|
4336
|
+
7,
|
|
4337
|
+
"fieldLayout",
|
|
4338
|
+
"$"
|
|
4339
|
+
],
|
|
4340
|
+
"accumW"
|
|
4341
|
+
],
|
|
4342
|
+
"idx"
|
|
4343
|
+
], [
|
|
4344
|
+
6,
|
|
4345
|
+
[
|
|
4346
|
+
7,
|
|
4347
|
+
"d",
|
|
4348
|
+
"u32"
|
|
4349
|
+
],
|
|
4350
|
+
[[5, "0"]]
|
|
4351
|
+
]]
|
|
4352
|
+
],
|
|
4181
4353
|
[
|
|
4182
4354
|
13,
|
|
4183
4355
|
"denom",
|
|
@@ -4319,8 +4491,8 @@ const particleFieldResolveKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($)
|
|
|
4319
4491
|
},
|
|
4320
4492
|
externals: () => ({
|
|
4321
4493
|
fieldLayout,
|
|
4322
|
-
d,
|
|
4323
|
-
std,
|
|
4494
|
+
d: data_exports,
|
|
4495
|
+
std: std_exports,
|
|
4324
4496
|
FP,
|
|
4325
4497
|
ALPHA_K
|
|
4326
4498
|
})
|
|
@@ -4576,13 +4748,13 @@ const componentDefinition = {
|
|
|
4576
4748
|
let OUT_H = OUT_MAX;
|
|
4577
4749
|
if (aspect0 >= 1) OUT_H = Math.max(Math.round(OUT_MAX / aspect0), 1);
|
|
4578
4750
|
else OUT_W = Math.max(Math.round(OUT_MAX * aspect0), 1);
|
|
4579
|
-
const posBuf = createStateBuffer(root,
|
|
4580
|
-
const velBuf = createStateBuffer(root,
|
|
4581
|
-
const colBuf = createStateBuffer(root,
|
|
4582
|
-
const accumR = createStateBuffer(root,
|
|
4583
|
-
const accumG = createStateBuffer(root,
|
|
4584
|
-
const accumB = createStateBuffer(root,
|
|
4585
|
-
const accumW = createStateBuffer(root,
|
|
4751
|
+
const posBuf = createStateBuffer(root, vec4f, MAX_PARTICLES);
|
|
4752
|
+
const velBuf = createStateBuffer(root, vec4f, MAX_PARTICLES);
|
|
4753
|
+
const colBuf = createStateBuffer(root, vec4f, MAX_PARTICLES);
|
|
4754
|
+
const accumR = createStateBuffer(root, atomic(u32), OUT_CELLS);
|
|
4755
|
+
const accumG = createStateBuffer(root, atomic(u32), OUT_CELLS);
|
|
4756
|
+
const accumB = createStateBuffer(root, atomic(u32), OUT_CELLS);
|
|
4757
|
+
const accumW = createStateBuffer(root, atomic(u32), OUT_CELLS);
|
|
4586
4758
|
const outTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
4587
4759
|
size: [OUT_W, OUT_H],
|
|
4588
4760
|
format: STATE_FORMAT
|
|
@@ -4592,29 +4764,6 @@ const componentDefinition = {
|
|
|
4592
4764
|
const paramsU = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(SimParams), "paramsU");
|
|
4593
4765
|
const simKernel = makeParticleFieldSimKernel(DEPTH_SOURCE_MODES[getCpuValue("depthSource") || "luminance"] ?? 0);
|
|
4594
4766
|
const splatKernel = makeParticleFieldSplatKernel(getCpuValue("particleShape") || "dot");
|
|
4595
|
-
const clearPipe = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
4596
|
-
"use gpu";
|
|
4597
|
-
particleFieldClearKernel(x, y);
|
|
4598
|
-
}), {
|
|
4599
|
-
v: 1,
|
|
4600
|
-
name: void 0,
|
|
4601
|
-
ast: {
|
|
4602
|
-
"params": [{
|
|
4603
|
-
"type": "i",
|
|
4604
|
-
"name": "x"
|
|
4605
|
-
}, {
|
|
4606
|
-
"type": "i",
|
|
4607
|
-
"name": "y"
|
|
4608
|
-
}],
|
|
4609
|
-
"body": [0, [[
|
|
4610
|
-
6,
|
|
4611
|
-
"particleFieldClearKernel",
|
|
4612
|
-
["x", "y"]
|
|
4613
|
-
]]],
|
|
4614
|
-
"externalNames": ["particleFieldClearKernel"]
|
|
4615
|
-
},
|
|
4616
|
-
externals: () => ({ particleFieldClearKernel })
|
|
4617
|
-
}) && $.f)({}), { size: [OUT_W, OUT_H] });
|
|
4618
4767
|
const simPipe = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((gx, gy) => {
|
|
4619
4768
|
"use gpu";
|
|
4620
4769
|
simKernel(gx, gy);
|
|
@@ -4688,6 +4837,7 @@ const componentDefinition = {
|
|
|
4688
4837
|
let localTime = 0;
|
|
4689
4838
|
let frameIdx = 0;
|
|
4690
4839
|
const DEG_TO_RAD = .017453292519943295;
|
|
4840
|
+
const countCap = isMobileGpuViewport() ? COUNT_MAX_MOBILE : COUNT_MAX;
|
|
4691
4841
|
return {
|
|
4692
4842
|
outputs: {
|
|
4693
4843
|
childTexture,
|
|
@@ -4720,7 +4870,7 @@ const componentDefinition = {
|
|
|
4720
4870
|
};
|
|
4721
4871
|
const h = fp.dimensions?.height ?? dimensions.height;
|
|
4722
4872
|
const aspect = h > 0 ? (fp.dimensions?.width ?? dimensions.width) / h : 1;
|
|
4723
|
-
const count = Math.min(Math.max(Math.round(g("count", 15e3)), 500),
|
|
4873
|
+
const count = Math.min(Math.max(Math.round(g("count", 15e3)), 500), countCap);
|
|
4724
4874
|
let GW = Math.round(Math.sqrt(count * aspect));
|
|
4725
4875
|
GW = Math.min(Math.max(GW, 8), GRID_DIM_MAX);
|
|
4726
4876
|
let GH = Math.round(count / GW);
|
|
@@ -4739,9 +4889,9 @@ const componentDefinition = {
|
|
|
4739
4889
|
const m10 = sz * cy, m11 = sz * sy * sx + cz * cx, m12 = sz * sy * cx - cz * sx;
|
|
4740
4890
|
const m20 = -sy, m21 = cy * sx, m22 = cy * cx;
|
|
4741
4891
|
paramsU.write({
|
|
4742
|
-
rowX:
|
|
4743
|
-
rowY:
|
|
4744
|
-
rowZ:
|
|
4892
|
+
rowX: vec4f(m00, -m01, m02, 0),
|
|
4893
|
+
rowY: vec4f(-m10, m11, -m12, 0),
|
|
4894
|
+
rowZ: vec4f(m20, -m21, m22, 0),
|
|
4745
4895
|
dt,
|
|
4746
4896
|
time: localTime,
|
|
4747
4897
|
snap: frameIdx === 0 ? 1 : 0,
|
|
@@ -4753,7 +4903,7 @@ const componentDefinition = {
|
|
|
4753
4903
|
dragMul: Math.exp(-DRAG * dt),
|
|
4754
4904
|
wobbleAmp: g("wobble", .35),
|
|
4755
4905
|
depthShading: Math.min(Math.max(g("depthShading", .6), 0), 1),
|
|
4756
|
-
spacing: OUT_W / GW,
|
|
4906
|
+
spacing: Math.min(OUT_W / GW, OUT_H / GH),
|
|
4757
4907
|
particleSize: g("particleSize", 1.3),
|
|
4758
4908
|
aspect,
|
|
4759
4909
|
zoom: Math.min(Math.max(g("zoom", 1), .05), 10),
|
|
@@ -4767,7 +4917,6 @@ const componentDefinition = {
|
|
|
4767
4917
|
});
|
|
4768
4918
|
frameIdx++;
|
|
4769
4919
|
return [
|
|
4770
|
-
() => clearPipe.with(bg).dispatch(),
|
|
4771
4920
|
() => simPipe.with(bg).dispatchThreads(GW, GH),
|
|
4772
4921
|
() => splatPipe.with(bg).dispatchThreads(GW, GH),
|
|
4773
4922
|
() => resolvePipe.with(bg).dispatch()
|
|
@@ -4783,4 +4932,4 @@ const componentDefinition = {
|
|
|
4783
4932
|
}
|
|
4784
4933
|
};
|
|
4785
4934
|
var ParticleField_default = componentDefinition;
|
|
4786
|
-
export {
|
|
4935
|
+
export { particleFieldResolveKernel as a, makeParticleFieldSplatKernel as i, componentDefinition as n, particleFieldSplatKernel as o, makeParticleFieldSimKernel as r, ParticleField_default as t };
|