shaders 3.0.447 → 3.0.449
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-DU1WmNHt.js} +15 -15
- package/dist/core/{Arc-DYvFxtGy.js → Arc-C8QmYsiZ.js} +13 -12
- package/dist/core/{Ascii-ChE4BP7J.js → Ascii-BaQ6MZTc.js} +51 -53
- package/dist/core/{Aurora-BThE6pbb.js → Aurora-B6lOg6M4.js} +63 -68
- package/dist/core/{BarShift-DdjkPSk3.js → BarShift-CFK-CzF9.js} +31 -32
- package/dist/core/{BarnDoors-B_kxVuec.js → BarnDoors-DWs_0xtH.js} +21 -22
- package/dist/core/{Beam-C7zPHuIU.js → Beam-Cgc4EYnj.js} +32 -39
- package/dist/core/{Bend-CFcEjifF.js → Bend-oof5pE1H.js} +27 -28
- package/dist/core/{Blob-CgUolAhz.js → Blob-cfvDCv0i.js} +54 -60
- package/dist/core/{BlockDissolve-CLSxXB4e.js → BlockDissolve-C7yJzYGZ.js} +21 -20
- package/dist/core/{BlockNoise-BgEJOicU.js → BlockNoise-DaM9YDAH.js} +16 -14
- package/dist/core/{BlueNoise-BqMtBLxM.js → BlueNoise-BMMRTsMw.js} +12 -10
- package/dist/core/{Blur-Xaa6jVPT.js → Blur-Be7sX4v9.js} +27 -27
- package/dist/core/{Boids-B8QUNxRL.js → Boids-C9S69THK.js} +151 -149
- package/dist/core/{BokehBlur-B5fql96U.js → BokehBlur-DSkKZ_yy.js} +104 -104
- package/dist/core/{BrickPattern-EAD5HD4e.js → BrickPattern-BY7h4hyx.js} +34 -38
- package/dist/core/{BrightnessContrast-mbv32DkA.js → BrightnessContrast-DFc0gSUv.js} +9 -10
- package/dist/core/{BrushedMetal-B10fDdGt.js → BrushedMetal-B06tUygH.js} +81 -84
- package/dist/core/{Bulge-C1Pq4DHk.js → Bulge-BpSOQfH0.js} +19 -19
- package/dist/core/{CRTScreen-Ctx0Mxtb.js → CRTScreen-DdGcEvk2.js} +35 -37
- package/dist/core/{CarbonFiber-DSSARe6R.js → CarbonFiber-Dy7Osb3V.js} +81 -84
- package/dist/core/{Chalkboard-C7srb54u.js → Chalkboard-wRYj23wL.js} +59 -61
- package/dist/core/{ChannelBlur-DE3T4-pj.js → ChannelBlur-DKD9GUpc.js} +13 -15
- package/dist/core/{CheckerWipe-Dp49-iaT.js → CheckerWipe-D0WmsSKg.js} +23 -23
- package/dist/core/{Checkerboard-oVWtS0rz.js → Checkerboard-2sQYJks9.js} +31 -31
- package/dist/core/{Chevron-CCD5JTRA.js → Chevron-D3oPw2-i.js} +20 -20
- package/dist/core/{ChromaFlow-BiE9Mes0.js → ChromaFlow-px9KG_h6.js} +32 -33
- package/dist/core/{ChromaticAberration-XEasUrD3.js → ChromaticAberration-DLFROPJV.js} +13 -13
- package/dist/core/{Circle-CvQ9duDU.js → Circle-0CqIPN3a.js} +14 -13
- package/dist/core/{ColorWheel-CXvfWAjN.js → ColorWheel-CMtn8slz.js} +30 -34
- package/dist/core/{CompressionArtifacts-BDaP7XI6.js → CompressionArtifacts-D7dpVg47.js} +64 -66
- package/dist/core/{ConcentricSpin-D06hFXEb.js → ConcentricSpin-BPk-_egF.js} +39 -41
- package/dist/core/{ConicGradient-Cg6vy3gl.js → ConicGradient-B-tEhmfR.js} +17 -18
- package/dist/core/{ContourLines-Cg2Dlmcr.js → ContourLines-BlgCWFSy.js} +29 -30
- package/dist/core/{CornerPin-wtqiMUCa.js → CornerPin-DB3G2i_y.js} +55 -57
- package/dist/core/{Crescent-Co__JqEE.js → Crescent-CFzPQKll.js} +14 -13
- package/dist/core/{Cross-CFytbdrZ.js → Cross-Cstl9nDg.js} +14 -13
- package/dist/core/{Crystal-U7VqhbHy.js → Crystal-CEeqF1Xa.js} +143 -152
- package/dist/core/{CurlNoise-BXWYh1Qi.js → CurlNoise-uvTKk4Wa.js} +16 -14
- package/dist/core/{CursorRipples-APbH7SVR.js → CursorRipples-B46VApbY.js} +59 -58
- package/dist/core/{CursorTrail-D5Fj0wGp.js → CursorTrail-DzYRTzzA.js} +72 -71
- package/dist/core/{DataMosh-CWRLpjU3.js → DataMosh-Ysev5-c_.js} +71 -73
- package/dist/core/{DiamondGradient-C_2VoEiQ.js → DiamondGradient-pTOwPuAl.js} +23 -25
- package/dist/core/{DiamondWipe-BkdNODD1.js → DiamondWipe-D6u1P2xH.js} +22 -22
- package/dist/core/{DiffuseBlur-Dl7S4KBW.js → DiffuseBlur-BX0cfwyh.js} +11 -12
- package/dist/core/{DisplacementMap-lv-qoLem.js → DisplacementMap-DMNivtcV.js} +26 -26
- package/dist/core/{Dither-B33J_gJU.js → Dither-Cxu-hSc_.js} +116 -119
- package/dist/core/{DotGrid-DaOhiRaL.js → DotGrid-CbNHebie.js} +37 -39
- package/dist/core/{DropShadow-C5Z2Rs2C.js → DropShadow-DFyuEA17.js} +37 -37
- package/dist/core/{Duotone-x4cywJbU.js → Duotone-CgueO-jZ.js} +7 -7
- package/dist/core/{Ellipse-CrQ1XYjx.js → Ellipse-DxRnSw__.js} +13 -12
- package/dist/core/{Emboss-DNwO5JcE.js → Emboss-BJxzjZmZ.js} +76 -78
- package/dist/core/{Engraving-FsaRQiyI.js → Engraving-DmQCj8vU.js} +57 -59
- package/dist/core/{ErosionNoise-CloHpdFT.js → ErosionNoise-7ekcAfBb.js} +13 -11
- package/dist/core/{Exposure-mO6KjYvc.js → Exposure-avEereLn.js} +4 -5
- package/dist/core/{FallingLines-D_1wHUkx.js → FallingLines-BINyHi3N.js} +40 -42
- package/dist/core/{FilmGrain-DDhrsw94.js → FilmGrain-B-pZBxiK.js} +17 -18
- package/dist/core/{FilmStock-BaP2aTLu.js → FilmStock-BJfso8f3.js} +74 -74
- package/dist/core/{Flip-DYuqyJva.js → Flip-Dbwe0zh8.js} +10 -12
- package/dist/core/{FloatingParticles-DJwNpHtZ.js → FloatingParticles-CoQ01il5.js} +97 -94
- package/dist/core/{FlowField-D4iGiDic.js → FlowField-CU6S3Jar.js} +24 -23
- package/dist/core/{Flower-D0MqoayS.js → Flower-R7HIopNH.js} +14 -13
- package/dist/core/{FlowingGradient-9Zu0Pu4a.js → FlowingGradient-D66Y9Wgq.js} +38 -39
- package/dist/core/{FlutedGlass-C_clmShu.js → FlutedGlass-WAaeW92l.js} +43 -43
- package/dist/core/{Fog-C_kY5pWB.js → Fog-BChoF6fi.js} +172 -171
- package/dist/core/{Form3D-D4aXZGoJ.js → Form3D-DajWNpAi.js} +259 -267
- package/dist/core/{FractalNoise-mMVLGmIv.js → FractalNoise-DIrQ3eQj.js} +30 -28
- package/dist/core/{Frost-M53tZlcf.js → Frost-B_3JSI2H.js} +70 -73
- package/dist/core/{GaborNoise-BhXywN1d.js → GaborNoise-4FWeA9yr.js} +16 -14
- package/dist/core/{Glass-B9D_52op.js → Glass-wOhmSf3v.js} +6 -4
- package/dist/core/{GlassTiles-DIkGYgVE.js → GlassTiles-DgdAiEuy.js} +23 -26
- package/dist/core/{Glitch-CUOJt5VX.js → Glitch-BOiywFUR.js} +60 -65
- package/dist/core/{Glow-D5AdnLvU.js → Glow-C2cEWdNE.js} +76 -77
- package/dist/core/{Godrays-BeQCWVw7.js → Godrays-DAZB2GSn.js} +52 -56
- package/dist/core/{Goo-C0_0QYne.js → Goo-B_WAqWYW.js} +64 -65
- package/dist/core/{GradientMap-DOVK05_a.js → GradientMap-DxsOInED.js} +47 -50
- package/dist/core/{Grayscale-Uv_6LYA9.js → Grayscale-DSHs9mZd.js} +6 -6
- package/dist/core/{Grid-Dbp4DoXZ.js → Grid-aO3wzf4X.js} +46 -48
- package/dist/core/{GridDistortion-D_21zIrm.js → GridDistortion-DsHsHda7.js} +63 -62
- package/dist/core/{Group-DXiB5Qrx.js → Group-CCcDbysC.js} +1 -1
- package/dist/core/{HTMLInCanvas-xXPLTYIv.js → HTMLInCanvas-B2OooKKr.js} +1 -1
- package/dist/core/{Halftone-DszIQsyx.js → Halftone-3a3rz4ln.js} +59 -62
- package/dist/core/{Heart-COpnSJPD.js → Heart-CzO0_GoB.js} +12 -11
- package/dist/core/{Heatmap-CMm8SD-P.js → Heatmap-DPtUc8YG.js} +57 -55
- package/dist/core/{HexGrid-B6wNW-45.js → HexGrid-CN5A0m5j.js} +32 -35
- package/dist/core/{Hologram-XejRN51V.js → Hologram-DoKRhChe.js} +62 -66
- package/dist/core/{Holographic-D1G_Ou1y.js → Holographic-BWyW5z_h.js} +58 -61
- package/dist/core/{HueShift-BCDgYfJs.js → HueShift-C0p8EGk-.js} +7 -10
- package/dist/core/{ImageTexture-BE2Jlkg6.js → ImageTexture-BnwkbXAW.js} +3 -2
- package/dist/core/{InkFlow-DJaJqula.js → InkFlow-BH86usRX.js} +156 -156
- package/dist/core/{Invert-DDmITZjt.js → Invert-BIjy9ddK.js} +4 -4
- package/dist/core/{IrisWipe-BFs5DDSa.js → IrisWipe-lpU7lucQ.js} +20 -23
- package/dist/core/{IsometricCubes-ChKqYTIw.js → IsometricCubes-CIieztxI.js} +37 -42
- package/dist/core/{Kaleidoscope-C8_-tC6T.js → Kaleidoscope-CUMvqmfN.js} +21 -21
- package/dist/core/{KeyFrames-xR9ZzHKj.js → KeyFrames-mI1J02zX.js} +130 -129
- package/dist/core/{LensFlare-DHGNEDIX.js → LensFlare-ChQK_hJN.js} +82 -84
- package/dist/core/{LightEdge-DYfhB3-7.js → LightEdge-Rg-zMpGb.js} +106 -107
- package/dist/core/{LightLeak-CYjuMURe.js → LightLeak-D1CxVo9A.js} +58 -59
- package/dist/core/{LinearBlur-CV7gKYHV.js → LinearBlur-DJBkHfs8.js} +14 -14
- package/dist/core/{LinearGradient-DAzw65UB.js → LinearGradient-DCRYBS4Q.js} +36 -37
- package/dist/core/{LinearWipe-DoDZF7y0.js → LinearWipe-Cxfs1tIO.js} +20 -21
- package/dist/core/{LiquidMetal-C9OxRyE4.js → LiquidMetal-oscNnbsr.js} +70 -73
- package/dist/core/{Liquify-gNsuR7aA.js → Liquify-CJwl6Wef.js} +67 -66
- package/dist/core/{MagneticFilings-CQ7zHEow.js → MagneticFilings-DAOFLjAQ.js} +125 -125
- package/dist/core/{Marble-BSSMSrv8.js → Marble-Cr4Iaq38.js} +22 -21
- package/dist/core/{Mirror-BZAUA2jk.js → Mirror-BwOuv3TP.js} +18 -18
- package/dist/core/{MultiPointGradient-HSfAYB-u.js → MultiPointGradient-CSowH0-7.js} +30 -31
- package/dist/core/{Neon-D9d6Osal.js → Neon-CPIvbGSB.js} +102 -113
- package/dist/core/{NoiseDissolve-CnELvUG_.js → NoiseDissolve-ByahROgQ.js} +23 -22
- package/dist/core/{ObjectTracker-COh35yTh.js → ObjectTracker-DMCr6kHz.js} +3 -3
- package/dist/core/{PagePeel-B6sjmvZ1.js → PagePeel-Coq0hc8R.js} +54 -58
- package/dist/core/{Paper-LfukraJk.js → Paper-CLlhc3fn.js} +16 -15
- package/dist/core/{Parallelogram-DBi0yAG3.js → Parallelogram-Be8RQBV7.js} +14 -13
- package/dist/core/{ParticleField-q7COY9YT.js → ParticleField-DDO-Tk9X.js} +154 -150
- package/dist/core/{ParticleFlow-DiHWbIon.js → ParticleFlow-B89PWVem.js} +210 -208
- package/dist/core/{Particles-BFsKUAPx.js → Particles-D8rP46SB.js} +207 -209
- package/dist/core/{PerlinNoise-KV2GG0ts.js → PerlinNoise-_whB3Y3m.js} +16 -14
- package/dist/core/{Perspective-CJSrtEy5.js → Perspective-BJuQWHOr.js} +23 -25
- package/dist/core/{PixelSort-WD-Y6ZFu.js → PixelSort-CJfXD6g0.js} +109 -109
- package/dist/core/{PixelThrow-CnOXm7Hv.js → PixelThrow-BaTI5PzH.js} +35 -35
- package/dist/core/{Pixelate-XJI9f1oT.js → Pixelate-D7Dto_8I.js} +19 -19
- package/dist/core/{Plasma-C0dnSaw1.js → Plasma-DWIDcCnn.js} +33 -32
- package/dist/core/{Plastic-DBv_6A7q.js → Plastic-CWAOd2i9.js} +82 -84
- package/dist/core/{PolarCoordinates-B8Cq2bzT.js → PolarCoordinates-DQM3dLK3.js} +16 -18
- package/dist/core/{Polygon-ORM35JKg.js → Polygon-CFmLohBu.js} +16 -17
- package/dist/core/{Posterize-Dn-Vv2S1.js → Posterize-B8PHXwhy.js} +5 -8
- package/dist/core/{Prism-CYLsGJHY.js → Prism-C5VS4TLU.js} +36 -40
- package/dist/core/{ProgressiveBlur-BXUumCm5.js → ProgressiveBlur-BcGcteLH.js} +63 -65
- package/dist/core/{RadialGradient-j6T56q1W.js → RadialGradient-D3UoKiGu.js} +22 -23
- package/dist/core/{RadialWipe-Bz19qvls.js → RadialWipe-DXfAH0Ug.js} +25 -25
- package/dist/core/{RandomBars-3RlhwDYG.js → RandomBars-BVsp1Q7v.js} +23 -23
- package/dist/core/{ReactionDiffusion-DdXavIVw.js → ReactionDiffusion-DknxOF-o.js} +173 -175
- package/dist/core/{RectangularCoordinates-p3250IKV.js → RectangularCoordinates-DFQm4y6H.js} +14 -14
- package/dist/core/{ReflectivePlane-BOl9AEoO.js → ReflectivePlane-BDlGBzo1.js} +35 -37
- package/dist/core/{Repeater-BMXmN95R.js → Repeater-DHW6eDAm.js} +2 -2
- package/dist/core/{Ring-DKcROHDs.js → Ring-3brC5en8.js} +15 -14
- package/dist/core/{RippleWipe-QH8D0Y-2.js → RippleWipe-DQfXGjRv.js} +24 -27
- package/dist/core/{Ripples-8fFdo6aq.js → Ripples-DajR3Cl5.js} +18 -21
- package/dist/core/{RoundedRect-Cr76tP9o.js → RoundedRect-CfkYNmkV.js} +14 -13
- package/dist/core/{Saturation-Dqifs1x7.js → Saturation-BPTssGSs.js} +8 -9
- package/dist/core/{Scratches-sa8JU4Eb.js → Scratches-A-AyASZm.js} +16 -14
- package/dist/core/{Sharpness-IRuPd9nn.js → Sharpness-Di39DpCB.js} +21 -22
- package/dist/core/{Shatter-BYaxMvyd.js → Shatter-CWf3HtjN.js} +73 -72
- package/dist/core/{SimplexNoise-C2vmRzgy.js → SimplexNoise-DpZ2jtdk.js} +19 -17
- package/dist/core/{SineWave-BGAJyGFr.js → SineWave-CZuksvHn.js} +20 -20
- package/dist/core/{SliceWipe-BOcCk5Se.js → SliceWipe-BwL2D3HR.js} +19 -19
- package/dist/core/{Smoke-B1twbhQ4.js → Smoke-BsUkbTI1.js} +156 -155
- package/dist/core/{SmokeFill-CAayneM2.js → SmokeFill-CaDMgNW-.js} +233 -231
- package/dist/core/{SmokeFlow-Ug8difAz.js → SmokeFlow-CLfsAbPS.js} +143 -142
- package/dist/core/{Solarize-205KKROH.js → Solarize-ALjXXAf0.js} +12 -14
- package/dist/core/{SolidColor-B4pj8onb.js → SolidColor-Cu_9b_my.js} +1 -1
- package/dist/core/{Spherize-DUQxwwCL.js → Spherize-SBfCc9Wk.js} +31 -37
- package/dist/core/{Spiral-DY1c-N4F.js → Spiral-iRrT222n.js} +36 -36
- package/dist/core/{Star-DRxNaHHo.js → Star-DL3d_HqY.js} +14 -13
- package/dist/core/{Stone-CUdcvOWd.js → Stone-OTsCM-rr.js} +2 -2
- package/dist/core/{Strands-CFxYJMFu.js → Strands-DjoQgGnd.js} +47 -49
- package/dist/core/{Stretch-DYrVdt8A.js → Stretch-CdzhxnbM.js} +19 -19
- package/dist/core/{Stripes-BvnoWdwn.js → Stripes-CsBgKYdp.js} +39 -39
- package/dist/core/{StudioBackground-srQGUpfZ.js → StudioBackground-D8EdrLg5.js} +67 -68
- package/dist/core/{SunBurst-COsVDZ4e.js → SunBurst-ErBFL-nF.js} +18 -20
- package/dist/core/{Surface3D-TsGPzdGm.js → Surface3D-CLjX61TZ.js} +144 -144
- package/dist/core/{Swirl-nXMWVY2X.js → Swirl-DDQif_lC.js} +18 -21
- package/dist/core/{Teardrop-Bjtkigk4.js → Teardrop-CvpdElTs.js} +13 -12
- package/dist/core/{Text-BGdsqRl5.js → Text-vyzeMvhl.js} +20 -21
- package/dist/core/{ThinFilm-DhMKI5e2.js → ThinFilm-CbkMTbD2.js} +59 -67
- package/dist/core/{TiltShift-BwuYyXB6.js → TiltShift-BVMyB8lF.js} +66 -67
- package/dist/core/{TimeTrail-CE2XumxR.js → TimeTrail-CuFGvzFi.js} +91 -94
- package/dist/core/{Tint-BTmcGjEl.js → Tint-C6zMMsYH.js} +25 -26
- package/dist/core/{Trapezoid-CiZCh8QS.js → Trapezoid-kFuxWONU.js} +14 -13
- package/dist/core/{TriangularGrid-BnQOEljy.js → TriangularGrid-FIrpI_qE.js} +34 -36
- package/dist/core/{Tritone-Ta084wlF.js → Tritone-DyLGtOug.js} +7 -10
- package/dist/core/{Truchet-BxCh_IIp.js → Truchet-B4NI56Zz.js} +31 -33
- package/dist/core/{Twirl-Cw4jm59Q.js → Twirl-CuzhWXfj.js} +16 -16
- package/dist/core/{VHS-Nwk0E-tf.js → VHS-DYbzndAZ.js} +68 -69
- package/dist/core/{VenetianBlinds-BZ0sS97G.js → VenetianBlinds-DVopy3xp.js} +22 -23
- package/dist/core/{Vesica-Cf1KiSzK.js → Vesica-Cd-XyG3F.js} +13 -12
- package/dist/core/{Vibrance-qWGvLkrW.js → Vibrance-CvXatkfO.js} +7 -8
- package/dist/core/{VideoTexture-48ylVDvN.js → VideoTexture-C5PS6Vly.js} +34 -39
- package/dist/core/{Vignette-CK_Li7v2.js → Vignette-DtBpWWxW.js} +20 -22
- package/dist/core/{Voronoi-DMYFDwIS.js → Voronoi-CRH2cGlR.js} +33 -37
- package/dist/core/{Water-D74wbHmn.js → Water-CneenzRZ.js} +101 -108
- package/dist/core/{Watercolor-zo8-4Vqx.js → Watercolor-B343pgM-.js} +63 -64
- package/dist/core/{WaveDistortion-BLrvGOzF.js → WaveDistortion-DHz1FxLT.js} +80 -82
- package/dist/core/{WaveletNoise-a5OpO8-D.js → WaveletNoise-CsLE9gbM.js} +16 -14
- package/dist/core/{Weave-D1D3kuUg.js → Weave-CQEF71nr.js} +28 -31
- package/dist/core/{WebcamTexture-pBETyQYG.js → WebcamTexture-BcsYFM_g.js} +7 -7
- package/dist/core/{Wool-CMnWPdy9.js → Wool-BFSicimy.js} +2 -2
- package/dist/core/{WorleyNoise-BAEo0duh.js → WorleyNoise-BKq3es5v.js} +69 -70
- package/dist/core/{ZoomBlur-CnBNmcfx.js → ZoomBlur-Bu1SlmS2.js} +12 -12
- package/dist/core/agents-Bv3--qPL.js +997 -0
- package/dist/core/blur-tvWOoxKt.js +2247 -0
- package/dist/core/compute-BjeJ0sIA.js +31 -0
- package/dist/core/dataEncoding-CEmpiitu.js +24 -0
- package/dist/core/device-BODv_4aH.js +10 -0
- package/dist/core/edges-BXNBKxSN.js +29857 -0
- package/dist/core/{glass-sOqjtPJD.js → glass-IfoQ8Prf.js} +164 -172
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/index.js +320 -229
- package/dist/core/media-B9BNeMPu.js +757 -0
- package/dist/core/noise-wTSHXgFz.js +12033 -0
- package/dist/core/noiseColor-CPakiKNF.js +103 -0
- package/dist/core/{noiseColor-CRpf22bk.js → noiseColor-DscZM9CO.js} +2 -2
- package/dist/core/noiseStylize-BXpflWPW.js +359 -0
- package/dist/core/porters-DBK1Aipq.js +991 -0
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +208 -199
- package/dist/core/sdf-R0EN3EvS.js +5174 -0
- package/dist/core/shaderRegistry-CcvE7wN0.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.js +7 -4
- 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.js +7 -4
- 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.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.js +7 -4
- 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.js +8 -4
- package/dist/core/shaders/ParticleFlow/index.js +7 -4
- package/dist/core/shaders/Particles/index.js +11 -5
- 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.js +6 -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.js +5 -4
- 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.js +5 -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-CtKwBX8c.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/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,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Ct as floor, Et as max, G as mixPreconvertedLinear, Gt as textureStorage2d, K as mixPreconvertedVariants, L as convertP3ToMixSpaceCPU, Ot as mix, Rt as sqrt, Ut as arrayOf, Vt as data_exports, Xt as struct, _ as floatE, _t as clamp, an as f32, at as textureStore, d as ZERO, et as src_default, in as vec4f, mt as abs, nn as vec3f, nt as std_exports, on as i32, p as call, pt as select, sn as u32, tn as vec2u, xt as exp, y as vec4 } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-BjeJ0sIA.js";
|
|
3
|
+
import { a as transformColor, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
3
4
|
var N = 256;
|
|
4
5
|
var COUNT = N * N;
|
|
5
6
|
var JACOBI_ITERS = 10;
|
|
@@ -12,82 +13,82 @@ var CYCLE_TIME_RATE = .06;
|
|
|
12
13
|
var VEL_FADE_MAX = 4;
|
|
13
14
|
var VEL_FADE_MIN = .05;
|
|
14
15
|
var GAIN = 1.35;
|
|
15
|
-
var FlowParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
16
|
-
dt:
|
|
17
|
-
curlStrength:
|
|
18
|
-
velFade:
|
|
19
|
-
dyeFade:
|
|
16
|
+
var FlowParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
17
|
+
dt: f32,
|
|
18
|
+
curlStrength: f32,
|
|
19
|
+
velFade: f32,
|
|
20
|
+
dyeFade: f32
|
|
20
21
|
}), "FlowParams");
|
|
21
|
-
var SplatParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
22
|
-
posX:
|
|
23
|
-
posY:
|
|
24
|
-
velX:
|
|
25
|
-
velY:
|
|
26
|
-
colR:
|
|
27
|
-
colG:
|
|
28
|
-
colB:
|
|
29
|
-
col2R:
|
|
30
|
-
col2G:
|
|
31
|
-
col2B:
|
|
32
|
-
mixT:
|
|
33
|
-
radius:
|
|
34
|
-
strength:
|
|
22
|
+
var SplatParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
23
|
+
posX: f32,
|
|
24
|
+
posY: f32,
|
|
25
|
+
velX: f32,
|
|
26
|
+
velY: f32,
|
|
27
|
+
colR: f32,
|
|
28
|
+
colG: f32,
|
|
29
|
+
colB: f32,
|
|
30
|
+
col2R: f32,
|
|
31
|
+
col2G: f32,
|
|
32
|
+
col2B: f32,
|
|
33
|
+
mixT: f32,
|
|
34
|
+
radius: f32,
|
|
35
|
+
strength: f32
|
|
35
36
|
}), "SplatParams");
|
|
36
|
-
var fluidLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
37
|
+
var fluidLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
37
38
|
velA: {
|
|
38
|
-
storage:
|
|
39
|
+
storage: arrayOf(vec4f, COUNT),
|
|
39
40
|
access: "mutable"
|
|
40
41
|
},
|
|
41
42
|
velB: {
|
|
42
|
-
storage:
|
|
43
|
+
storage: arrayOf(vec4f, COUNT),
|
|
43
44
|
access: "mutable"
|
|
44
45
|
},
|
|
45
46
|
dyeA: {
|
|
46
|
-
storage:
|
|
47
|
+
storage: arrayOf(vec4f, COUNT),
|
|
47
48
|
access: "mutable"
|
|
48
49
|
},
|
|
49
50
|
dyeB: {
|
|
50
|
-
storage:
|
|
51
|
+
storage: arrayOf(vec4f, COUNT),
|
|
51
52
|
access: "mutable"
|
|
52
53
|
},
|
|
53
54
|
pressure: {
|
|
54
|
-
storage:
|
|
55
|
+
storage: arrayOf(f32, COUNT),
|
|
55
56
|
access: "mutable"
|
|
56
57
|
},
|
|
57
58
|
divergence: {
|
|
58
|
-
storage:
|
|
59
|
+
storage: arrayOf(f32, COUNT),
|
|
59
60
|
access: "mutable"
|
|
60
61
|
},
|
|
61
62
|
params: { uniform: FlowParams }
|
|
62
63
|
}), "fluidLayout");
|
|
63
|
-
var splatLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
64
|
+
var splatLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
64
65
|
velA: {
|
|
65
|
-
storage:
|
|
66
|
+
storage: arrayOf(vec4f, COUNT),
|
|
66
67
|
access: "mutable"
|
|
67
68
|
},
|
|
68
69
|
dyeA: {
|
|
69
|
-
storage:
|
|
70
|
+
storage: arrayOf(vec4f, COUNT),
|
|
70
71
|
access: "mutable"
|
|
71
72
|
},
|
|
72
73
|
sparams: { uniform: SplatParams }
|
|
73
74
|
}), "splatLayout");
|
|
74
|
-
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
75
|
+
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
75
76
|
dyeA: {
|
|
76
|
-
storage:
|
|
77
|
+
storage: arrayOf(vec4f, COUNT),
|
|
77
78
|
access: "readonly"
|
|
78
79
|
},
|
|
79
|
-
outTex: { storageTexture:
|
|
80
|
+
outTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
80
81
|
}), "outputLayout");
|
|
81
|
-
var nidx =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
],
|
|
82
|
+
var nidx = src_default.fn([
|
|
83
|
+
i32,
|
|
84
|
+
i32,
|
|
85
|
+
i32,
|
|
86
|
+
i32
|
|
87
|
+
], u32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((ii, ji, di, dj) => {
|
|
87
88
|
"use gpu";
|
|
88
|
-
const row =
|
|
89
|
-
const col =
|
|
90
|
-
return
|
|
89
|
+
const row = clamp(__tsover_add(ii, di), 0, __tsover_sub(N, 1));
|
|
90
|
+
const col = clamp(__tsover_add(ji, dj), 0, __tsover_sub(N, 1));
|
|
91
|
+
return u32(__tsover_add(__tsover_mul(row, N), col));
|
|
91
92
|
}), {
|
|
92
93
|
v: 1,
|
|
93
94
|
name: void 0,
|
|
@@ -192,30 +193,30 @@ var nidx = tgpu.fn([
|
|
|
192
193
|
]
|
|
193
194
|
},
|
|
194
195
|
externals: () => ({
|
|
195
|
-
std,
|
|
196
|
+
std: std_exports,
|
|
196
197
|
N,
|
|
197
|
-
d
|
|
198
|
+
d: data_exports
|
|
198
199
|
})
|
|
199
200
|
}) && $.f)({}));
|
|
200
201
|
var makeSplatKernel = (colorSpaceMode) => {
|
|
201
202
|
const mixFn = mixPreconvertedVariants[colorSpaceMode] ?? mixPreconvertedLinear;
|
|
202
|
-
return
|
|
203
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
203
204
|
"use gpu";
|
|
204
205
|
const p = splatLayout.$.sparams;
|
|
205
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
206
|
-
const cellX = __tsover_add(
|
|
207
|
-
const cellY = __tsover_add(
|
|
206
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
207
|
+
const cellX = __tsover_add(f32(cx), .5);
|
|
208
|
+
const cellY = __tsover_add(f32(cy), .5);
|
|
208
209
|
const dx = __tsover_sub(cellX, p.posX);
|
|
209
210
|
const dy = __tsover_sub(cellY, p.posY);
|
|
210
211
|
const distSq = __tsover_add(__tsover_mul(dx, dx), __tsover_mul(dy, dy));
|
|
211
|
-
const radSq =
|
|
212
|
-
const inf =
|
|
213
|
-
const w =
|
|
214
|
-
const brush = mixFn(
|
|
212
|
+
const radSq = max(__tsover_mul(p.radius, p.radius), f32(1));
|
|
213
|
+
const inf = exp(__tsover_mul(__tsover_div(distSq, radSq), -1));
|
|
214
|
+
const w = clamp(__tsover_mul(inf, p.strength), f32(0), f32(1));
|
|
215
|
+
const brush = mixFn(vec3f(p.colR, p.colG, p.colB), vec3f(p.col2R, p.col2G, p.col2B), 1, 1, p.mixT);
|
|
215
216
|
const cell = splatLayout.$.dyeA[idx];
|
|
216
|
-
splatLayout.$.dyeA[idx] =
|
|
217
|
+
splatLayout.$.dyeA[idx] = vec4f(mix(cell.x, brush.x, w), mix(cell.y, brush.y, w), mix(cell.z, brush.z, w), 0);
|
|
217
218
|
const vel = splatLayout.$.velA[idx];
|
|
218
|
-
splatLayout.$.velA[idx] =
|
|
219
|
+
splatLayout.$.velA[idx] = vec4f(__tsover_add(vel.x, __tsover_mul(p.velX, inf)), __tsover_add(vel.y, __tsover_mul(p.velY, inf)), vel.z, 0);
|
|
219
220
|
}), {
|
|
220
221
|
v: 1,
|
|
221
222
|
name: void 0,
|
|
@@ -725,9 +726,9 @@ var makeSplatKernel = (colorSpaceMode) => {
|
|
|
725
726
|
},
|
|
726
727
|
externals: () => ({
|
|
727
728
|
splatLayout,
|
|
728
|
-
d,
|
|
729
|
+
d: data_exports,
|
|
729
730
|
N,
|
|
730
|
-
std,
|
|
731
|
+
std: std_exports,
|
|
731
732
|
mixFn
|
|
732
733
|
})
|
|
733
734
|
}) && $.f)({})).$name(`inkFlowSplat${colorSpaceMode}`);
|
|
@@ -741,18 +742,18 @@ var splatKernelVariants = {
|
|
|
741
742
|
5: makeSplatKernel(5)
|
|
742
743
|
};
|
|
743
744
|
const splatKernel = splatKernelVariants[2];
|
|
744
|
-
const curlKernel =
|
|
745
|
+
const curlKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
745
746
|
"use gpu";
|
|
746
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
747
|
-
const ii =
|
|
748
|
-
const ji =
|
|
747
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
748
|
+
const ii = i32(cy);
|
|
749
|
+
const ji = i32(cx);
|
|
749
750
|
const vL = fluidLayout.$.velA[nidx(ii, ji, 0, -1)];
|
|
750
751
|
const vR = fluidLayout.$.velA[nidx(ii, ji, 0, 1)];
|
|
751
752
|
const vU = fluidLayout.$.velA[nidx(ii, ji, -1, 0)];
|
|
752
753
|
const vD = fluidLayout.$.velA[nidx(ii, ji, 1, 0)];
|
|
753
754
|
const curl = __tsover_mul(__tsover_sub(__tsover_sub(vR.y, vL.y), __tsover_sub(vD.x, vU.x)), .5);
|
|
754
755
|
const vel = fluidLayout.$.velA[idx];
|
|
755
|
-
fluidLayout.$.velA[idx] =
|
|
756
|
+
fluidLayout.$.velA[idx] = vec4f(vel.x, vel.y, curl, 0);
|
|
756
757
|
}), {
|
|
757
758
|
v: 1,
|
|
758
759
|
name: void 0,
|
|
@@ -1032,30 +1033,30 @@ const curlKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
1032
1033
|
]
|
|
1033
1034
|
},
|
|
1034
1035
|
externals: () => ({
|
|
1035
|
-
d,
|
|
1036
|
+
d: data_exports,
|
|
1036
1037
|
N,
|
|
1037
1038
|
fluidLayout,
|
|
1038
1039
|
nidx
|
|
1039
1040
|
})
|
|
1040
1041
|
}) && $.f)({})).$name("inkFlowCurl");
|
|
1041
|
-
const vorticityKernel =
|
|
1042
|
+
const vorticityKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1042
1043
|
"use gpu";
|
|
1043
1044
|
const p = fluidLayout.$.params;
|
|
1044
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
1045
|
-
const ii =
|
|
1046
|
-
const ji =
|
|
1047
|
-
const cL =
|
|
1048
|
-
const cR =
|
|
1049
|
-
const cU =
|
|
1050
|
-
const cD =
|
|
1045
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
1046
|
+
const ii = i32(cy);
|
|
1047
|
+
const ji = i32(cx);
|
|
1048
|
+
const cL = abs(fluidLayout.$.velA[nidx(ii, ji, 0, -1)].z);
|
|
1049
|
+
const cR = abs(fluidLayout.$.velA[nidx(ii, ji, 0, 1)].z);
|
|
1050
|
+
const cU = abs(fluidLayout.$.velA[nidx(ii, ji, -1, 0)].z);
|
|
1051
|
+
const cD = abs(fluidLayout.$.velA[nidx(ii, ji, 1, 0)].z);
|
|
1051
1052
|
const cc = fluidLayout.$.velA[idx].z;
|
|
1052
1053
|
const gx = __tsover_mul(__tsover_sub(cR, cL), .5);
|
|
1053
1054
|
const gy = __tsover_mul(__tsover_sub(cD, cU), .5);
|
|
1054
|
-
const gl =
|
|
1055
|
+
const gl = max(sqrt(__tsover_add(__tsover_mul(gx, gx), __tsover_mul(gy, gy))), f32(1e-5));
|
|
1055
1056
|
const fx = __tsover_mul(__tsover_mul(__tsover_mul(__tsover_div(gy, gl), cc), p.curlStrength), p.dt);
|
|
1056
1057
|
const fy = __tsover_mul(__tsover_mul(__tsover_mul(__tsover_mul(__tsover_div(gx, gl), -1), cc), p.curlStrength), p.dt);
|
|
1057
1058
|
const vel = fluidLayout.$.velA[idx];
|
|
1058
|
-
fluidLayout.$.velA[idx] =
|
|
1059
|
+
fluidLayout.$.velA[idx] = vec4f(__tsover_add(vel.x, fx), __tsover_add(vel.y, fy), vel.z, 0);
|
|
1059
1060
|
}), {
|
|
1060
1061
|
v: 1,
|
|
1061
1062
|
name: void 0,
|
|
@@ -1541,28 +1542,28 @@ const vorticityKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalT
|
|
|
1541
1542
|
},
|
|
1542
1543
|
externals: () => ({
|
|
1543
1544
|
fluidLayout,
|
|
1544
|
-
d,
|
|
1545
|
+
d: data_exports,
|
|
1545
1546
|
N,
|
|
1546
|
-
std,
|
|
1547
|
+
std: std_exports,
|
|
1547
1548
|
nidx
|
|
1548
1549
|
})
|
|
1549
1550
|
}) && $.f)({})).$name("inkFlowVorticity");
|
|
1550
|
-
const divergenceKernel =
|
|
1551
|
+
const divergenceKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1551
1552
|
"use gpu";
|
|
1552
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
1553
|
-
const ii =
|
|
1554
|
-
const ji =
|
|
1555
|
-
const jf =
|
|
1556
|
-
const iF =
|
|
1553
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
1554
|
+
const ii = i32(cy);
|
|
1555
|
+
const ji = i32(cx);
|
|
1556
|
+
const jf = f32(cx);
|
|
1557
|
+
const iF = f32(cy);
|
|
1557
1558
|
const selfVel = fluidLayout.$.velA[idx];
|
|
1558
1559
|
const normalL = fluidLayout.$.velA[nidx(ii, ji, 0, -1)].x;
|
|
1559
1560
|
const normalR = fluidLayout.$.velA[nidx(ii, ji, 0, 1)].x;
|
|
1560
1561
|
const normalU = fluidLayout.$.velA[nidx(ii, ji, -1, 0)].y;
|
|
1561
1562
|
const normalD = fluidLayout.$.velA[nidx(ii, ji, 1, 0)].y;
|
|
1562
|
-
const L =
|
|
1563
|
-
const R =
|
|
1564
|
-
const T =
|
|
1565
|
-
const B =
|
|
1563
|
+
const L = select(normalL, __tsover_mul(selfVel.x, -1), jf < .5);
|
|
1564
|
+
const R = select(normalR, __tsover_mul(selfVel.x, -1), jf > f32(__tsover_sub(N, 1.5)));
|
|
1565
|
+
const T = select(normalU, __tsover_mul(selfVel.y, -1), iF < .5);
|
|
1566
|
+
const B = select(normalD, __tsover_mul(selfVel.y, -1), iF > f32(__tsover_sub(N, 1.5)));
|
|
1566
1567
|
const div = __tsover_mul(__tsover_add(__tsover_sub(R, L), __tsover_sub(B, T)), .5);
|
|
1567
1568
|
fluidLayout.$.pressure[idx] = __tsover_mul(fluidLayout.$.pressure[idx], PRESSURE_DISSIPATION);
|
|
1568
1569
|
fluidLayout.$.divergence[idx] = div;
|
|
@@ -2053,19 +2054,19 @@ const divergenceKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (global
|
|
|
2053
2054
|
]
|
|
2054
2055
|
},
|
|
2055
2056
|
externals: () => ({
|
|
2056
|
-
d,
|
|
2057
|
+
d: data_exports,
|
|
2057
2058
|
N,
|
|
2058
2059
|
fluidLayout,
|
|
2059
2060
|
nidx,
|
|
2060
|
-
std,
|
|
2061
|
+
std: std_exports,
|
|
2061
2062
|
PRESSURE_DISSIPATION
|
|
2062
2063
|
})
|
|
2063
2064
|
}) && $.f)({})).$name("inkFlowDivergence");
|
|
2064
|
-
const jacobiKernel =
|
|
2065
|
+
const jacobiKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2065
2066
|
"use gpu";
|
|
2066
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2067
|
-
const ii =
|
|
2068
|
-
const ji =
|
|
2067
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2068
|
+
const ii = i32(cy);
|
|
2069
|
+
const ji = i32(cx);
|
|
2069
2070
|
const pL = fluidLayout.$.pressure[nidx(ii, ji, 0, -1)];
|
|
2070
2071
|
const pR = fluidLayout.$.pressure[nidx(ii, ji, 0, 1)];
|
|
2071
2072
|
const pU = fluidLayout.$.pressure[nidx(ii, ji, -1, 0)];
|
|
@@ -2314,23 +2315,23 @@ const jacobiKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis
|
|
|
2314
2315
|
]
|
|
2315
2316
|
},
|
|
2316
2317
|
externals: () => ({
|
|
2317
|
-
d,
|
|
2318
|
+
d: data_exports,
|
|
2318
2319
|
N,
|
|
2319
2320
|
fluidLayout,
|
|
2320
2321
|
nidx
|
|
2321
2322
|
})
|
|
2322
2323
|
}) && $.f)({})).$name("inkFlowJacobi");
|
|
2323
|
-
const gradSubtractKernel =
|
|
2324
|
+
const gradSubtractKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2324
2325
|
"use gpu";
|
|
2325
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2326
|
-
const ii =
|
|
2327
|
-
const ji =
|
|
2326
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2327
|
+
const ii = i32(cy);
|
|
2328
|
+
const ji = i32(cx);
|
|
2328
2329
|
const pL = fluidLayout.$.pressure[nidx(ii, ji, 0, -1)];
|
|
2329
2330
|
const pR = fluidLayout.$.pressure[nidx(ii, ji, 0, 1)];
|
|
2330
2331
|
const pU = fluidLayout.$.pressure[nidx(ii, ji, -1, 0)];
|
|
2331
2332
|
const pD = fluidLayout.$.pressure[nidx(ii, ji, 1, 0)];
|
|
2332
2333
|
const vel = fluidLayout.$.velA[idx];
|
|
2333
|
-
fluidLayout.$.velA[idx] =
|
|
2334
|
+
fluidLayout.$.velA[idx] = vec4f(__tsover_sub(vel.x, __tsover_mul(__tsover_sub(pR, pL), .5)), __tsover_sub(vel.y, __tsover_mul(__tsover_sub(pD, pU), .5)), vel.z, 0);
|
|
2334
2335
|
}), {
|
|
2335
2336
|
v: 1,
|
|
2336
2337
|
name: void 0,
|
|
@@ -2603,31 +2604,31 @@ const gradSubtractKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (glob
|
|
|
2603
2604
|
]
|
|
2604
2605
|
},
|
|
2605
2606
|
externals: () => ({
|
|
2606
|
-
d,
|
|
2607
|
+
d: data_exports,
|
|
2607
2608
|
N,
|
|
2608
2609
|
fluidLayout,
|
|
2609
2610
|
nidx
|
|
2610
2611
|
})
|
|
2611
2612
|
}) && $.f)({})).$name("inkFlowGradSubtract");
|
|
2612
|
-
const advectVelKernel =
|
|
2613
|
+
const advectVelKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2613
2614
|
"use gpu";
|
|
2614
2615
|
const p = fluidLayout.$.params;
|
|
2615
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2616
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2616
2617
|
const vel = fluidLayout.$.velA[idx];
|
|
2617
|
-
const srcX =
|
|
2618
|
-
const srcY =
|
|
2619
|
-
const x0 =
|
|
2620
|
-
const y0 =
|
|
2618
|
+
const srcX = clamp(__tsover_sub(f32(cx), __tsover_mul(vel.x, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
2619
|
+
const srcY = clamp(__tsover_sub(f32(cy), __tsover_mul(vel.y, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
2620
|
+
const x0 = clamp(floor(srcX), 0, f32(__tsover_sub(N, 2)));
|
|
2621
|
+
const y0 = clamp(floor(srcY), 0, f32(__tsover_sub(N, 2)));
|
|
2621
2622
|
const sx = __tsover_sub(srcX, x0);
|
|
2622
2623
|
const sy = __tsover_sub(srcY, y0);
|
|
2623
|
-
const ix0 =
|
|
2624
|
-
const iy0 =
|
|
2625
|
-
const v00 = fluidLayout.$.velA[
|
|
2626
|
-
const v10 = fluidLayout.$.velA[
|
|
2627
|
-
const v01 = fluidLayout.$.velA[
|
|
2628
|
-
const v11 = fluidLayout.$.velA[
|
|
2624
|
+
const ix0 = i32(x0);
|
|
2625
|
+
const iy0 = i32(y0);
|
|
2626
|
+
const v00 = fluidLayout.$.velA[u32(__tsover_add(__tsover_mul(iy0, N), ix0))];
|
|
2627
|
+
const v10 = fluidLayout.$.velA[u32(__tsover_add(__tsover_add(__tsover_mul(iy0, N), ix0), 1))];
|
|
2628
|
+
const v01 = fluidLayout.$.velA[u32(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0))];
|
|
2629
|
+
const v11 = fluidLayout.$.velA[u32(__tsover_add(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0), 1))];
|
|
2629
2630
|
const decay = __tsover_add(1, __tsover_mul(p.velFade, p.dt));
|
|
2630
|
-
fluidLayout.$.velB[idx] =
|
|
2631
|
+
fluidLayout.$.velB[idx] = vec4f(__tsover_div(mix(mix(v00.x, v10.x, sx), mix(v01.x, v11.x, sx), sy), decay), __tsover_div(mix(mix(v00.y, v10.y, sx), mix(v01.y, v11.y, sx), sy), decay), 0, 0);
|
|
2631
2632
|
}), {
|
|
2632
2633
|
v: 1,
|
|
2633
2634
|
name: void 0,
|
|
@@ -3265,16 +3266,16 @@ const advectVelKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalT
|
|
|
3265
3266
|
},
|
|
3266
3267
|
externals: () => ({
|
|
3267
3268
|
fluidLayout,
|
|
3268
|
-
d,
|
|
3269
|
+
d: data_exports,
|
|
3269
3270
|
N,
|
|
3270
|
-
std
|
|
3271
|
+
std: std_exports
|
|
3271
3272
|
})
|
|
3272
3273
|
}) && $.f)({})).$name("inkFlowAdvectVel");
|
|
3273
|
-
const copyVelKernel =
|
|
3274
|
+
const copyVelKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
3274
3275
|
"use gpu";
|
|
3275
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
3276
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
3276
3277
|
const v = fluidLayout.$.velB[idx];
|
|
3277
|
-
fluidLayout.$.velA[idx] =
|
|
3278
|
+
fluidLayout.$.velA[idx] = vec4f(v.x, v.y, 0, 0);
|
|
3278
3279
|
}), {
|
|
3279
3280
|
v: 1,
|
|
3280
3281
|
name: void 0,
|
|
@@ -3374,33 +3375,33 @@ const copyVelKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThi
|
|
|
3374
3375
|
]
|
|
3375
3376
|
},
|
|
3376
3377
|
externals: () => ({
|
|
3377
|
-
d,
|
|
3378
|
+
d: data_exports,
|
|
3378
3379
|
N,
|
|
3379
3380
|
fluidLayout
|
|
3380
3381
|
})
|
|
3381
3382
|
}) && $.f)({})).$name("inkFlowCopyVel");
|
|
3382
|
-
const advectDyeKernel =
|
|
3383
|
+
const advectDyeKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
3383
3384
|
"use gpu";
|
|
3384
3385
|
const p = fluidLayout.$.params;
|
|
3385
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
3386
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
3386
3387
|
const vel = fluidLayout.$.velA[idx];
|
|
3387
|
-
const srcX =
|
|
3388
|
-
const srcY =
|
|
3389
|
-
const x0 =
|
|
3390
|
-
const y0 =
|
|
3388
|
+
const srcX = clamp(__tsover_sub(f32(cx), __tsover_mul(vel.x, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
3389
|
+
const srcY = clamp(__tsover_sub(f32(cy), __tsover_mul(vel.y, p.dt)), 0, f32(__tsover_sub(N, 1)));
|
|
3390
|
+
const x0 = clamp(floor(srcX), 0, f32(__tsover_sub(N, 2)));
|
|
3391
|
+
const y0 = clamp(floor(srcY), 0, f32(__tsover_sub(N, 2)));
|
|
3391
3392
|
const sx = __tsover_sub(srcX, x0);
|
|
3392
3393
|
const sy = __tsover_sub(srcY, y0);
|
|
3393
|
-
const ix0 =
|
|
3394
|
-
const iy0 =
|
|
3395
|
-
const c00 = fluidLayout.$.dyeA[
|
|
3396
|
-
const c10 = fluidLayout.$.dyeA[
|
|
3397
|
-
const c01 = fluidLayout.$.dyeA[
|
|
3398
|
-
const c11 = fluidLayout.$.dyeA[
|
|
3399
|
-
const r =
|
|
3400
|
-
const g =
|
|
3401
|
-
const b =
|
|
3394
|
+
const ix0 = i32(x0);
|
|
3395
|
+
const iy0 = i32(y0);
|
|
3396
|
+
const c00 = fluidLayout.$.dyeA[u32(__tsover_add(__tsover_mul(iy0, N), ix0))];
|
|
3397
|
+
const c10 = fluidLayout.$.dyeA[u32(__tsover_add(__tsover_add(__tsover_mul(iy0, N), ix0), 1))];
|
|
3398
|
+
const c01 = fluidLayout.$.dyeA[u32(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0))];
|
|
3399
|
+
const c11 = fluidLayout.$.dyeA[u32(__tsover_add(__tsover_add(__tsover_mul(__tsover_add(iy0, 1), N), ix0), 1))];
|
|
3400
|
+
const r = mix(mix(c00.x, c10.x, sx), mix(c01.x, c11.x, sx), sy);
|
|
3401
|
+
const g = mix(mix(c00.y, c10.y, sx), mix(c01.y, c11.y, sx), sy);
|
|
3402
|
+
const b = mix(mix(c00.z, c10.z, sx), mix(c01.z, c11.z, sx), sy);
|
|
3402
3403
|
const decay = __tsover_add(1, __tsover_mul(p.dyeFade, p.dt));
|
|
3403
|
-
fluidLayout.$.dyeB[idx] =
|
|
3404
|
+
fluidLayout.$.dyeB[idx] = vec4f(max(__tsover_div(r, decay), f32(0)), max(__tsover_div(g, decay), f32(0)), max(__tsover_div(b, decay), f32(0)), 0);
|
|
3404
3405
|
}), {
|
|
3405
3406
|
v: 1,
|
|
3406
3407
|
name: void 0,
|
|
@@ -4158,16 +4159,16 @@ const advectDyeKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalT
|
|
|
4158
4159
|
},
|
|
4159
4160
|
externals: () => ({
|
|
4160
4161
|
fluidLayout,
|
|
4161
|
-
d,
|
|
4162
|
+
d: data_exports,
|
|
4162
4163
|
N,
|
|
4163
|
-
std
|
|
4164
|
+
std: std_exports
|
|
4164
4165
|
})
|
|
4165
4166
|
}) && $.f)({})).$name("inkFlowAdvectDye");
|
|
4166
|
-
const copyDyeKernel =
|
|
4167
|
+
const copyDyeKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
4167
4168
|
"use gpu";
|
|
4168
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
4169
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
4169
4170
|
const c = fluidLayout.$.dyeB[idx];
|
|
4170
|
-
fluidLayout.$.dyeA[idx] =
|
|
4171
|
+
fluidLayout.$.dyeA[idx] = vec4f(c.x, c.y, c.z, 0);
|
|
4171
4172
|
}), {
|
|
4172
4173
|
v: 1,
|
|
4173
4174
|
name: void 0,
|
|
@@ -4271,16 +4272,16 @@ const copyDyeKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThi
|
|
|
4271
4272
|
]
|
|
4272
4273
|
},
|
|
4273
4274
|
externals: () => ({
|
|
4274
|
-
d,
|
|
4275
|
+
d: data_exports,
|
|
4275
4276
|
N,
|
|
4276
4277
|
fluidLayout
|
|
4277
4278
|
})
|
|
4278
4279
|
}) && $.f)({})).$name("inkFlowCopyDye");
|
|
4279
|
-
const outputKernel =
|
|
4280
|
+
const outputKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
4280
4281
|
"use gpu";
|
|
4281
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
4282
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
4282
4283
|
const c = outputLayout.$.dyeA[idx];
|
|
4283
|
-
|
|
4284
|
+
textureStore(outputLayout.$.outTex, vec2u(cx, cy), vec4f(c.x, c.y, c.z, 1));
|
|
4284
4285
|
}), {
|
|
4285
4286
|
v: 1,
|
|
4286
4287
|
name: void 0,
|
|
@@ -4396,17 +4397,16 @@ const outputKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis
|
|
|
4396
4397
|
]
|
|
4397
4398
|
},
|
|
4398
4399
|
externals: () => ({
|
|
4399
|
-
d,
|
|
4400
|
+
d: data_exports,
|
|
4400
4401
|
N,
|
|
4401
4402
|
outputLayout,
|
|
4402
|
-
std
|
|
4403
|
+
std: std_exports
|
|
4403
4404
|
})
|
|
4404
4405
|
}) && $.f)({})).$name("inkFlowOutput");
|
|
4405
|
-
const inkFlowComposite =
|
|
4406
|
+
const inkFlowComposite = src_default.fn([vec3f, f32], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((dye, gain) => {
|
|
4406
4407
|
"use gpu";
|
|
4407
|
-
const lum =
|
|
4408
|
-
|
|
4409
|
-
return d.vec4f(dye, coverage);
|
|
4408
|
+
const lum = max(dye.x, max(dye.y, dye.z));
|
|
4409
|
+
return vec4f(dye, clamp(__tsover_mul(lum, gain), f32(0), f32(1)));
|
|
4410
4410
|
}), {
|
|
4411
4411
|
v: 1,
|
|
4412
4412
|
name: void 0,
|
|
@@ -4503,8 +4503,8 @@ const inkFlowComposite = tgpu.fn([d.vec3f, d.f32], d.vec4f)(/* @__PURE__ */ (($)
|
|
|
4503
4503
|
"externalNames": ["std", "d"]
|
|
4504
4504
|
},
|
|
4505
4505
|
externals: () => ({
|
|
4506
|
-
std,
|
|
4507
|
-
d
|
|
4506
|
+
std: std_exports,
|
|
4507
|
+
d: data_exports
|
|
4508
4508
|
})
|
|
4509
4509
|
}) && $.f)({})).$name("inkFlowComposite");
|
|
4510
4510
|
function srgbToLinear(c) {
|
|
@@ -4716,12 +4716,12 @@ const componentDefinition = {
|
|
|
4716
4716
|
const { gpu, getCpuValue, propValues, registerComputeTexture, onCleanup } = params;
|
|
4717
4717
|
const root = gpu?.root;
|
|
4718
4718
|
if (!root) return null;
|
|
4719
|
-
const velA = createStateBuffer(root,
|
|
4720
|
-
const velB = createStateBuffer(root,
|
|
4721
|
-
const dyeA = createStateBuffer(root,
|
|
4722
|
-
const dyeB = createStateBuffer(root,
|
|
4723
|
-
const pressure = createStateBuffer(root,
|
|
4724
|
-
const divergence = createStateBuffer(root,
|
|
4719
|
+
const velA = createStateBuffer(root, vec4f, COUNT);
|
|
4720
|
+
const velB = createStateBuffer(root, vec4f, COUNT);
|
|
4721
|
+
const dyeA = createStateBuffer(root, vec4f, COUNT);
|
|
4722
|
+
const dyeB = createStateBuffer(root, vec4f, COUNT);
|
|
4723
|
+
const pressure = createStateBuffer(root, f32, COUNT);
|
|
4724
|
+
const divergence = createStateBuffer(root, f32, COUNT);
|
|
4725
4725
|
const outTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
4726
4726
|
size: [N, N],
|
|
4727
4727
|
format: STATE_FORMAT
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const invertColor =
|
|
1
|
+
import { Vt as data_exports, d as ZERO, et as src_default, in as vec4f, p as call } from "./edges-BXNBKxSN.js";
|
|
2
|
+
const invertColor = src_default.fn([vec4f], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((color) => {
|
|
3
3
|
"use gpu";
|
|
4
|
-
return
|
|
4
|
+
return vec4f(__tsover_sub(1, color.x), __tsover_sub(1, color.y), __tsover_sub(1, color.z), color.w);
|
|
5
5
|
}), {
|
|
6
6
|
v: 1,
|
|
7
7
|
name: void 0,
|
|
@@ -57,7 +57,7 @@ const invertColor = tgpu.fn([d.vec4f], d.vec4f)(/* @__PURE__ */ (($) => (globalT
|
|
|
57
57
|
]]]],
|
|
58
58
|
"externalNames": ["d"]
|
|
59
59
|
},
|
|
60
|
-
externals: () => ({ d })
|
|
60
|
+
externals: () => ({ d: data_exports })
|
|
61
61
|
}) && $.f)({}));
|
|
62
62
|
const componentDefinition = {
|
|
63
63
|
name: "Invert",
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as transformPosition, i as transformBoolean } from "./transformations-
|
|
3
|
-
const irisWipeMask =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
],
|
|
1
|
+
import { $t as vec2f, Et as max, Lt as smoothstep, Tt as length, Vt as data_exports, an as f32, d as ZERO, et as src_default, in as vec4f, nt as std_exports, p as call, pt as select } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { c as transformPosition, i as transformBoolean } from "./transformations-CsPUHppB.js";
|
|
3
|
+
const irisWipeMask = src_default.fn([
|
|
4
|
+
vec4f,
|
|
5
|
+
vec2f,
|
|
6
|
+
f32,
|
|
7
|
+
vec2f,
|
|
8
|
+
f32,
|
|
9
|
+
f32,
|
|
10
|
+
f32
|
|
11
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((color, uv, aspect, center, progress, feather, invert) => {
|
|
12
12
|
"use gpu";
|
|
13
13
|
const cx = __tsover_mul(center.x, aspect);
|
|
14
14
|
const cy = __tsover_sub(1, center.y);
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
let coord = __tsover_div(dist, std.max(maxDist, 1e-4));
|
|
21
|
-
coord = std.select(coord, __tsover_sub(1, coord), invert > 0);
|
|
22
|
-
const f = std.max(feather, 1e-4);
|
|
15
|
+
const dist = length(vec2f(__tsover_sub(__tsover_mul(uv.x, aspect), cx), __tsover_sub(uv.y, cy)));
|
|
16
|
+
const maxDist = length(vec2f(max(cx, __tsover_sub(aspect, cx)), max(cy, __tsover_sub(1, cy))));
|
|
17
|
+
let coord = __tsover_div(dist, max(maxDist, 1e-4));
|
|
18
|
+
coord = select(coord, __tsover_sub(1, coord), invert > 0);
|
|
19
|
+
const f = max(feather, 1e-4);
|
|
23
20
|
const front = __tsover_sub(__tsover_mul(progress, __tsover_add(1, __tsover_mul(2, f))), f);
|
|
24
|
-
const reveal =
|
|
25
|
-
return
|
|
21
|
+
const reveal = smoothstep(__tsover_sub(front, f), __tsover_add(front, f), coord);
|
|
22
|
+
return vec4f(color.x, color.y, color.z, __tsover_mul(color.w, reveal));
|
|
26
23
|
}), {
|
|
27
24
|
v: 1,
|
|
28
25
|
name: void 0,
|
|
@@ -342,8 +339,8 @@ const irisWipeMask = tgpu.fn([
|
|
|
342
339
|
"externalNames": ["d", "std"]
|
|
343
340
|
},
|
|
344
341
|
externals: () => ({
|
|
345
|
-
d,
|
|
346
|
-
std
|
|
342
|
+
d: data_exports,
|
|
343
|
+
std: std_exports
|
|
347
344
|
})
|
|
348
345
|
}) && $.f)({}));
|
|
349
346
|
const componentDefinition = {
|