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,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as animatedTime } from "./porters-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { $t as vec2f, Vt as data_exports, an as f32, et as src_default, nn as vec3f, nt as std_exports, p as call, xt as exp } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { t as animatedTime } from "./porters-DBK1Aipq.js";
|
|
3
|
+
import { g as perlin13, p as noise_exports } from "./noise-wTSHXgFz.js";
|
|
4
|
+
import { n as toneAndColorExpr } from "./noiseColor-CPakiKNF.js";
|
|
5
|
+
import { i as noiseToneProps, r as noiseSpeedProp, t as noiseColorProps } from "./noiseColor-DscZM9CO.js";
|
|
6
|
+
const perlinNoiseField = src_default.fn([
|
|
7
|
+
vec2f,
|
|
8
|
+
vec2f,
|
|
9
|
+
f32,
|
|
10
|
+
f32,
|
|
11
|
+
f32
|
|
12
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, viewport, scale, seed, animTime) => {
|
|
11
13
|
"use gpu";
|
|
12
14
|
const aspect = __tsover_div(viewport.x, viewport.y);
|
|
13
|
-
const pos =
|
|
14
|
-
return perlin13(
|
|
15
|
+
const pos = vec2f(__tsover_mul(uv.x, aspect), uv.y).mul(exp(scale)).add(seed);
|
|
16
|
+
return perlin13(vec3f(pos.x, pos.y, __tsover_mul(animTime, .3)));
|
|
15
17
|
}), {
|
|
16
18
|
v: 1,
|
|
17
19
|
name: void 0,
|
|
@@ -154,8 +156,8 @@ const perlinNoiseField = tgpu.fn([
|
|
|
154
156
|
]
|
|
155
157
|
},
|
|
156
158
|
externals: () => ({
|
|
157
|
-
d,
|
|
158
|
-
std,
|
|
159
|
+
d: data_exports,
|
|
160
|
+
std: std_exports,
|
|
159
161
|
noise: noise_exports
|
|
160
162
|
})
|
|
161
163
|
}) && $.f)({}));
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import { Bt as
|
|
2
|
-
import { c as transformPosition, s as transformEdges } from "./transformations-
|
|
1
|
+
import { $t as vec2f, Bt as tan, Et as max, It as sin, N as unpremultiplyAlpha, Vt as data_exports, an as f32, c as sampleRemappedExpr, d as ZERO, et as src_default, n as composeEdgeRemapExpr, nt as std_exports, p as call, vt as cos } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { c as transformPosition, s as transformEdges } from "./transformations-CsPUHppB.js";
|
|
3
3
|
var DEG_TO_RAD = Math.PI / 180;
|
|
4
|
-
const perspectiveUV =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
],
|
|
4
|
+
const perspectiveUV = src_default.fn([
|
|
5
|
+
vec2f,
|
|
6
|
+
f32,
|
|
7
|
+
f32,
|
|
8
|
+
f32,
|
|
9
|
+
f32,
|
|
10
|
+
vec2f,
|
|
11
|
+
vec2f
|
|
12
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((center, pan, tilt, fov, zoom, offset, uv) => {
|
|
13
13
|
"use gpu";
|
|
14
|
-
const centerPos =
|
|
14
|
+
const centerPos = vec2f(center.x, __tsover_sub(1, center.y));
|
|
15
15
|
const x = __tsover_div(__tsover_sub(uv.x, centerPos.x), zoom);
|
|
16
16
|
const y = __tsover_div(__tsover_sub(uv.y, centerPos.y), zoom);
|
|
17
17
|
const panRad = __tsover_mul(pan, DEG_TO_RAD);
|
|
18
18
|
const tiltRad = __tsover_mul(tilt, DEG_TO_RAD);
|
|
19
19
|
const fovRad = __tsover_mul(fov, DEG_TO_RAD);
|
|
20
|
-
const cosPan =
|
|
21
|
-
const sinPan =
|
|
22
|
-
const cosTilt =
|
|
23
|
-
const sinTilt =
|
|
24
|
-
const perspectiveFactor = __tsover_mul(
|
|
25
|
-
const
|
|
26
|
-
const safePanDivisor = std.max(panDivisor, .001);
|
|
20
|
+
const cosPan = cos(panRad);
|
|
21
|
+
const sinPan = sin(panRad);
|
|
22
|
+
const cosTilt = cos(tiltRad);
|
|
23
|
+
const sinTilt = sin(tiltRad);
|
|
24
|
+
const perspectiveFactor = __tsover_mul(tan(__tsover_mul(fovRad, .5)), 2);
|
|
25
|
+
const safePanDivisor = max(__tsover_add(cosPan, __tsover_mul(__tsover_mul(sinPan, x), perspectiveFactor)), .001);
|
|
27
26
|
const afterPanX = __tsover_div(x, safePanDivisor);
|
|
28
27
|
const afterPanY = __tsover_div(__tsover_mul(y, cosPan), safePanDivisor);
|
|
29
|
-
const
|
|
30
|
-
const safeTiltDivisor = std.max(tiltDivisor, .001);
|
|
28
|
+
const safeTiltDivisor = max(__tsover_add(cosTilt, __tsover_mul(__tsover_mul(sinTilt, afterPanY), perspectiveFactor)), .001);
|
|
31
29
|
const finalX = __tsover_div(__tsover_mul(afterPanX, cosTilt), safeTiltDivisor);
|
|
32
30
|
const finalY = __tsover_div(afterPanY, safeTiltDivisor);
|
|
33
|
-
const offsetPos =
|
|
34
|
-
return
|
|
31
|
+
const offsetPos = vec2f(offset.x, __tsover_sub(1, offset.y));
|
|
32
|
+
return vec2f(finalX, finalY).add(centerPos).sub(offsetPos).add(vec2f(.5, .5));
|
|
35
33
|
}), {
|
|
36
34
|
v: 1,
|
|
37
35
|
name: void 0,
|
|
@@ -435,9 +433,9 @@ const perspectiveUV = tgpu.fn([
|
|
|
435
433
|
]
|
|
436
434
|
},
|
|
437
435
|
externals: () => ({
|
|
438
|
-
d,
|
|
436
|
+
d: data_exports,
|
|
439
437
|
DEG_TO_RAD,
|
|
440
|
-
std
|
|
438
|
+
std: std_exports
|
|
441
439
|
})
|
|
442
440
|
}) && $.f)({}));
|
|
443
441
|
const componentDefinition = {
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as vec2f, Ct as floor, Dt as min, Gt as textureStorage2d, It as sin, Lt as smoothstep, M as blend_exports, N as unpremultiplyAlpha, Ot as mix, Pt as round, Rt as sqrt, Ut as arrayOf, Vt as data_exports, Wt as texture2d, Xt as struct, _t as clamp, an as f32, at as textureStore, bt as dot, d as ZERO, et as src_default, in as vec4f, it as textureLoad, nn as vec3f, nt as std_exports, on as i32, p as call, pt as select, sn as u32, tn as vec2u, wt as fract } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-BjeJ0sIA.js";
|
|
2
3
|
var WORK = 512;
|
|
3
4
|
var CELL_COUNT = WORK * WORK;
|
|
4
5
|
var WORK_F = WORK;
|
|
5
6
|
var MAX_COL = WORK - 1;
|
|
6
7
|
var STATE_FORMAT = "rgba16float";
|
|
7
|
-
const brushWeight =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
],
|
|
8
|
+
const brushWeight = src_default.fn([
|
|
9
|
+
f32,
|
|
10
|
+
f32,
|
|
11
|
+
f32,
|
|
12
|
+
f32,
|
|
13
|
+
f32,
|
|
14
|
+
f32,
|
|
15
|
+
f32
|
|
16
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cxf, cyf, mouseX, mouseY, radius, falloff, aspect) => {
|
|
16
17
|
"use gpu";
|
|
17
18
|
const dx = __tsover_sub(__tsover_div(cxf, WORK_F), mouseX);
|
|
18
19
|
const dy = __tsover_sub(__tsover_div(cyf, WORK_F), mouseY);
|
|
19
|
-
const ddx =
|
|
20
|
-
const ddy =
|
|
21
|
-
const dist =
|
|
20
|
+
const ddx = select(dx, __tsover_mul(dx, aspect), aspect >= 1);
|
|
21
|
+
const ddy = select(__tsover_div(dy, aspect), dy, aspect >= 1);
|
|
22
|
+
const dist = sqrt(__tsover_add(__tsover_mul(ddx, ddx), __tsover_mul(ddy, ddy)));
|
|
22
23
|
const inner = __tsover_mul(radius, __tsover_sub(1, falloff));
|
|
23
|
-
return __tsover_sub(1,
|
|
24
|
+
return __tsover_sub(1, smoothstep(inner, radius, dist));
|
|
24
25
|
}), {
|
|
25
26
|
v: 1,
|
|
26
27
|
name: void 0,
|
|
@@ -206,16 +207,16 @@ const brushWeight = tgpu.fn([
|
|
|
206
207
|
},
|
|
207
208
|
externals: () => ({
|
|
208
209
|
WORK_F,
|
|
209
|
-
std
|
|
210
|
+
std: std_exports
|
|
210
211
|
})
|
|
211
212
|
}) && $.f)({}));
|
|
212
|
-
const cellRand =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
],
|
|
213
|
+
const cellRand = src_default.fn([
|
|
214
|
+
f32,
|
|
215
|
+
f32,
|
|
216
|
+
f32
|
|
217
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((xf, yf, seed) => {
|
|
217
218
|
"use gpu";
|
|
218
|
-
return
|
|
219
|
+
return fract(__tsover_mul(sin(__tsover_add(__tsover_add(__tsover_mul(xf, 12.9898), __tsover_mul(yf, 78.233)), __tsover_mul(seed, .137))), 43758.5453));
|
|
219
220
|
}), {
|
|
220
221
|
v: 1,
|
|
221
222
|
name: void 0,
|
|
@@ -283,59 +284,59 @@ const cellRand = tgpu.fn([
|
|
|
283
284
|
]]]],
|
|
284
285
|
"externalNames": ["std"]
|
|
285
286
|
},
|
|
286
|
-
externals: () => ({ std })
|
|
287
|
+
externals: () => ({ std: std_exports })
|
|
287
288
|
}) && $.f)({}));
|
|
288
|
-
var lumaLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
289
|
-
input: { texture:
|
|
289
|
+
var lumaLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
290
|
+
input: { texture: texture2d(f32) },
|
|
290
291
|
lumaBuf: {
|
|
291
|
-
storage:
|
|
292
|
+
storage: arrayOf(f32, CELL_COUNT),
|
|
292
293
|
access: "mutable"
|
|
293
294
|
},
|
|
294
|
-
params: { uniform: /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
295
|
-
inputWidth:
|
|
296
|
-
inputHeight:
|
|
295
|
+
params: { uniform: /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
296
|
+
inputWidth: f32,
|
|
297
|
+
inputHeight: f32
|
|
297
298
|
}), "uniform") }
|
|
298
299
|
}), "lumaLayout");
|
|
299
|
-
var swapLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
300
|
+
var swapLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
300
301
|
readBuf: {
|
|
301
|
-
storage:
|
|
302
|
+
storage: arrayOf(f32, CELL_COUNT),
|
|
302
303
|
access: "readonly"
|
|
303
304
|
},
|
|
304
305
|
writeBuf: {
|
|
305
|
-
storage:
|
|
306
|
+
storage: arrayOf(f32, CELL_COUNT),
|
|
306
307
|
access: "mutable"
|
|
307
308
|
},
|
|
308
309
|
lumaBuf: {
|
|
309
|
-
storage:
|
|
310
|
+
storage: arrayOf(f32, CELL_COUNT),
|
|
310
311
|
access: "readonly"
|
|
311
312
|
},
|
|
312
|
-
params: { uniform: /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
313
|
-
mouseX:
|
|
314
|
-
mouseY:
|
|
315
|
-
radius:
|
|
316
|
-
falloff:
|
|
317
|
-
decay:
|
|
318
|
-
aspect:
|
|
319
|
-
seed:
|
|
313
|
+
params: { uniform: /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
314
|
+
mouseX: f32,
|
|
315
|
+
mouseY: f32,
|
|
316
|
+
radius: f32,
|
|
317
|
+
falloff: f32,
|
|
318
|
+
decay: f32,
|
|
319
|
+
aspect: f32,
|
|
320
|
+
seed: f32
|
|
320
321
|
}), "uniform") }
|
|
321
322
|
}), "swapLayout");
|
|
322
|
-
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
323
|
+
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
323
324
|
srcBuf: {
|
|
324
|
-
storage:
|
|
325
|
+
storage: arrayOf(f32, CELL_COUNT),
|
|
325
326
|
access: "readonly"
|
|
326
327
|
},
|
|
327
|
-
stateTex: { storageTexture:
|
|
328
|
+
stateTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
328
329
|
}), "outputLayout");
|
|
329
|
-
const lumaKernel =
|
|
330
|
+
const lumaKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
330
331
|
"use gpu";
|
|
331
332
|
const p = lumaLayout.$.params;
|
|
332
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
333
|
-
const u = __tsover_div(__tsover_add(
|
|
334
|
-
const v = __tsover_div(__tsover_add(
|
|
335
|
-
const ix =
|
|
336
|
-
const iy =
|
|
337
|
-
const rgb = unpremultiplyAlpha(
|
|
338
|
-
lumaLayout.$.lumaBuf[idx] =
|
|
333
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(WORK)), cx);
|
|
334
|
+
const u = __tsover_div(__tsover_add(f32(cx), .5), WORK_F);
|
|
335
|
+
const v = __tsover_div(__tsover_add(f32(cy), .5), WORK_F);
|
|
336
|
+
const ix = clamp(i32(round(__tsover_mul(u, p.inputWidth))), 0, i32(__tsover_sub(p.inputWidth, 1)));
|
|
337
|
+
const iy = clamp(i32(round(__tsover_mul(v, p.inputHeight))), 0, i32(__tsover_sub(p.inputHeight, 1)));
|
|
338
|
+
const rgb = unpremultiplyAlpha(textureLoad(lumaLayout.$.input, vec2u(u32(ix), u32(iy)), 0)).xyz;
|
|
339
|
+
lumaLayout.$.lumaBuf[idx] = dot(rgb, vec3f(.299, .587, .114));
|
|
339
340
|
}), {
|
|
340
341
|
v: 1,
|
|
341
342
|
name: void 0,
|
|
@@ -664,54 +665,53 @@ const lumaKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
664
665
|
},
|
|
665
666
|
externals: () => ({
|
|
666
667
|
lumaLayout,
|
|
667
|
-
d,
|
|
668
|
+
d: data_exports,
|
|
668
669
|
WORK,
|
|
669
670
|
WORK_F,
|
|
670
|
-
std,
|
|
671
|
+
std: std_exports,
|
|
671
672
|
blend: blend_exports
|
|
672
673
|
})
|
|
673
674
|
}) && $.f)({})).$name("pixelSortLuma");
|
|
674
675
|
function makeSwapKernel(vertical, dir, parity) {
|
|
675
|
-
return
|
|
676
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
676
677
|
"use gpu";
|
|
677
678
|
const p = swapLayout.$.params;
|
|
678
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
679
|
-
const xf =
|
|
680
|
-
const yf =
|
|
679
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(WORK)), cx);
|
|
680
|
+
const xf = f32(cx);
|
|
681
|
+
const yf = f32(cy);
|
|
681
682
|
const lineC = vertical ? cy : cx;
|
|
682
683
|
const fixedC = vertical ? cx : cy;
|
|
683
|
-
const lineCf =
|
|
684
|
-
const lineCi =
|
|
684
|
+
const lineCf = f32(lineC);
|
|
685
|
+
const lineCi = i32(lineC);
|
|
685
686
|
const myOff = swapLayout.$.readBuf[idx];
|
|
686
|
-
const myCol =
|
|
687
|
-
const isLeft = __tsover_mod(__tsover_add(lineC,
|
|
688
|
-
const partnerLineI =
|
|
687
|
+
const myCol = clamp(__tsover_add(lineCf, myOff), 0, MAX_COL);
|
|
688
|
+
const isLeft = __tsover_mod(__tsover_add(lineC, u32(parity)), u32(2)) === u32(0);
|
|
689
|
+
const partnerLineI = select(__tsover_sub(lineCi, 1), __tsover_add(lineCi, 1), isLeft);
|
|
689
690
|
const valid = partnerLineI >= 0 && partnerLineI < WORK;
|
|
690
|
-
const pClamped =
|
|
691
|
-
const pClampedU =
|
|
691
|
+
const pClamped = clamp(partnerLineI, 0, __tsover_sub(WORK, 1));
|
|
692
|
+
const pClampedU = u32(pClamped);
|
|
692
693
|
const partnerX = vertical ? fixedC : pClampedU;
|
|
693
694
|
const partnerY = vertical ? pClampedU : fixedC;
|
|
694
|
-
const partnerIdx = __tsover_add(__tsover_mul(partnerY,
|
|
695
|
+
const partnerIdx = __tsover_add(__tsover_mul(partnerY, u32(WORK)), partnerX);
|
|
695
696
|
const partnerOff = swapLayout.$.readBuf[partnerIdx];
|
|
696
|
-
const partnerCol =
|
|
697
|
-
const myC0 =
|
|
698
|
-
const myC1 =
|
|
699
|
-
const myIdx0 = vertical ? __tsover_add(__tsover_mul(
|
|
700
|
-
const myIdx1 = vertical ? __tsover_add(__tsover_mul(
|
|
701
|
-
const myKey =
|
|
702
|
-
const pC0 =
|
|
703
|
-
const pC1 =
|
|
704
|
-
const pIdx0 = vertical ? __tsover_add(__tsover_mul(
|
|
705
|
-
const pIdx1 = vertical ? __tsover_add(__tsover_mul(
|
|
706
|
-
const partnerKey =
|
|
697
|
+
const partnerCol = clamp(__tsover_add(f32(pClamped), partnerOff), 0, MAX_COL);
|
|
698
|
+
const myC0 = clamp(floor(myCol), 0, MAX_COL);
|
|
699
|
+
const myC1 = min(__tsover_add(myC0, 1), MAX_COL);
|
|
700
|
+
const myIdx0 = vertical ? __tsover_add(__tsover_mul(u32(myC0), u32(WORK)), fixedC) : __tsover_add(__tsover_mul(fixedC, u32(WORK)), u32(myC0));
|
|
701
|
+
const myIdx1 = vertical ? __tsover_add(__tsover_mul(u32(myC1), u32(WORK)), fixedC) : __tsover_add(__tsover_mul(fixedC, u32(WORK)), u32(myC1));
|
|
702
|
+
const myKey = mix(swapLayout.$.lumaBuf[myIdx0], swapLayout.$.lumaBuf[myIdx1], __tsover_sub(myCol, myC0));
|
|
703
|
+
const pC0 = clamp(floor(partnerCol), 0, MAX_COL);
|
|
704
|
+
const pC1 = min(__tsover_add(pC0, 1), MAX_COL);
|
|
705
|
+
const pIdx0 = vertical ? __tsover_add(__tsover_mul(u32(pC0), u32(WORK)), fixedC) : __tsover_add(__tsover_mul(fixedC, u32(WORK)), u32(pC0));
|
|
706
|
+
const pIdx1 = vertical ? __tsover_add(__tsover_mul(u32(pC1), u32(WORK)), fixedC) : __tsover_add(__tsover_mul(fixedC, u32(WORK)), u32(pC1));
|
|
707
|
+
const partnerKey = mix(swapLayout.$.lumaBuf[pIdx0], swapLayout.$.lumaBuf[pIdx1], __tsover_sub(partnerCol, pC0));
|
|
707
708
|
const wMy = brushWeight(xf, yf, p.mouseX, p.mouseY, p.radius, p.falloff, p.aspect);
|
|
708
|
-
const wP = brushWeight(
|
|
709
|
+
const wP = brushWeight(f32(partnerX), f32(partnerY), p.mouseX, p.mouseY, p.radius, p.falloff, p.aspect);
|
|
709
710
|
const rnd = cellRand(xf, yf, p.seed);
|
|
710
|
-
const gate = valid &&
|
|
711
|
+
const gate = valid && min(wMy, wP) > rnd;
|
|
711
712
|
const keyDiff = __tsover_mul(__tsover_sub(myKey, partnerKey), dir);
|
|
712
|
-
const takePartner =
|
|
713
|
-
const
|
|
714
|
-
const decayed = std.mix(newCol, lineCf, p.decay);
|
|
713
|
+
const takePartner = select(keyDiff < 0, keyDiff > 0, isLeft);
|
|
714
|
+
const decayed = mix(select(myCol, partnerCol, gate && takePartner), lineCf, p.decay);
|
|
715
715
|
swapLayout.$.writeBuf[idx] = __tsover_sub(decayed, lineCf);
|
|
716
716
|
}), {
|
|
717
717
|
v: 1,
|
|
@@ -1768,10 +1768,10 @@ function makeSwapKernel(vertical, dir, parity) {
|
|
|
1768
1768
|
},
|
|
1769
1769
|
externals: () => ({
|
|
1770
1770
|
swapLayout,
|
|
1771
|
-
d,
|
|
1771
|
+
d: data_exports,
|
|
1772
1772
|
WORK,
|
|
1773
1773
|
vertical,
|
|
1774
|
-
std,
|
|
1774
|
+
std: std_exports,
|
|
1775
1775
|
MAX_COL,
|
|
1776
1776
|
parity,
|
|
1777
1777
|
brushWeight,
|
|
@@ -1781,13 +1781,13 @@ function makeSwapKernel(vertical, dir, parity) {
|
|
|
1781
1781
|
}) && $.f)({})).$name("pixelSortSwap");
|
|
1782
1782
|
}
|
|
1783
1783
|
function makeOutputKernel(vertical) {
|
|
1784
|
-
return
|
|
1784
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1785
1785
|
"use gpu";
|
|
1786
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
1786
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(WORK)), cx);
|
|
1787
1787
|
const lineC = vertical ? cy : cx;
|
|
1788
|
-
const col =
|
|
1788
|
+
const col = clamp(__tsover_add(f32(lineC), outputLayout.$.srcBuf[idx]), 0, MAX_COL);
|
|
1789
1789
|
const u = __tsover_div(__tsover_add(col, .5), WORK_F);
|
|
1790
|
-
|
|
1790
|
+
textureStore(outputLayout.$.stateTex, vec2u(cx, cy), vec4f(u, 0, 0, 1));
|
|
1791
1791
|
}), {
|
|
1792
1792
|
v: 1,
|
|
1793
1793
|
name: void 0,
|
|
@@ -1944,19 +1944,19 @@ function makeOutputKernel(vertical) {
|
|
|
1944
1944
|
]
|
|
1945
1945
|
},
|
|
1946
1946
|
externals: () => ({
|
|
1947
|
-
d,
|
|
1947
|
+
d: data_exports,
|
|
1948
1948
|
WORK,
|
|
1949
1949
|
vertical,
|
|
1950
|
-
std,
|
|
1950
|
+
std: std_exports,
|
|
1951
1951
|
outputLayout,
|
|
1952
1952
|
MAX_COL,
|
|
1953
1953
|
WORK_F
|
|
1954
1954
|
})
|
|
1955
1955
|
}) && $.f)({})).$name("pixelSortOutput");
|
|
1956
1956
|
}
|
|
1957
|
-
const pixelSortUVVertical =
|
|
1957
|
+
const pixelSortUVVertical = src_default.fn([vec2f, f32], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, srcCoord) => {
|
|
1958
1958
|
"use gpu";
|
|
1959
|
-
return
|
|
1959
|
+
return vec2f(uv.x, srcCoord);
|
|
1960
1960
|
}), {
|
|
1961
1961
|
v: 1,
|
|
1962
1962
|
name: void 0,
|
|
@@ -1983,11 +1983,11 @@ const pixelSortUVVertical = tgpu.fn([d.vec2f, d.f32], d.vec2f)(/* @__PURE__ */ (
|
|
|
1983
1983
|
]]]],
|
|
1984
1984
|
"externalNames": ["d"]
|
|
1985
1985
|
},
|
|
1986
|
-
externals: () => ({ d })
|
|
1986
|
+
externals: () => ({ d: data_exports })
|
|
1987
1987
|
}) && $.f)({}));
|
|
1988
|
-
const pixelSortUVHorizontal =
|
|
1988
|
+
const pixelSortUVHorizontal = src_default.fn([vec2f, f32], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, srcCoord) => {
|
|
1989
1989
|
"use gpu";
|
|
1990
|
-
return
|
|
1990
|
+
return vec2f(srcCoord, uv.y);
|
|
1991
1991
|
}), {
|
|
1992
1992
|
v: 1,
|
|
1993
1993
|
name: void 0,
|
|
@@ -2014,7 +2014,7 @@ const pixelSortUVHorizontal = tgpu.fn([d.vec2f, d.f32], d.vec2f)(/* @__PURE__ */
|
|
|
2014
2014
|
]]]],
|
|
2015
2015
|
"externalNames": ["d"]
|
|
2016
2016
|
},
|
|
2017
|
-
externals: () => ({ d })
|
|
2017
|
+
externals: () => ({ d: data_exports })
|
|
2018
2018
|
}) && $.f)({}));
|
|
2019
2019
|
const componentDefinition = {
|
|
2020
2020
|
name: "PixelSort",
|
|
@@ -2116,27 +2116,27 @@ const componentDefinition = {
|
|
|
2116
2116
|
const vertical = propValues.axis === "vertical";
|
|
2117
2117
|
const dir = propValues.direction === "descending" ? -1 : 1;
|
|
2118
2118
|
const childTexture = convertToTexture(childNode);
|
|
2119
|
-
const bufferA = createStateBuffer(root,
|
|
2120
|
-
const bufferB = createStateBuffer(root,
|
|
2121
|
-
const lumaBuf = createStateBuffer(root,
|
|
2119
|
+
const bufferA = createStateBuffer(root, f32, CELL_COUNT);
|
|
2120
|
+
const bufferB = createStateBuffer(root, f32, CELL_COUNT);
|
|
2121
|
+
const lumaBuf = createStateBuffer(root, f32, CELL_COUNT);
|
|
2122
2122
|
const stateTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
2123
2123
|
size: [WORK, WORK],
|
|
2124
2124
|
format: STATE_FORMAT
|
|
2125
2125
|
}).$usage("storage", "sampled"), "stateTex");
|
|
2126
2126
|
onCleanup(() => stateTex.destroy());
|
|
2127
2127
|
const state = registerComputeTexture(stateTex);
|
|
2128
|
-
const lumaParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(
|
|
2129
|
-
inputWidth:
|
|
2130
|
-
inputHeight:
|
|
2128
|
+
const lumaParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(struct({
|
|
2129
|
+
inputWidth: f32,
|
|
2130
|
+
inputHeight: f32
|
|
2131
2131
|
})), "lumaParams");
|
|
2132
|
-
const swapParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(
|
|
2133
|
-
mouseX:
|
|
2134
|
-
mouseY:
|
|
2135
|
-
radius:
|
|
2136
|
-
falloff:
|
|
2137
|
-
decay:
|
|
2138
|
-
aspect:
|
|
2139
|
-
seed:
|
|
2132
|
+
const swapParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(struct({
|
|
2133
|
+
mouseX: f32,
|
|
2134
|
+
mouseY: f32,
|
|
2135
|
+
radius: f32,
|
|
2136
|
+
falloff: f32,
|
|
2137
|
+
decay: f32,
|
|
2138
|
+
aspect: f32,
|
|
2139
|
+
seed: f32
|
|
2140
2140
|
})), "swapParams");
|
|
2141
2141
|
let curW = Math.max(1, Math.round(dimensions.width));
|
|
2142
2142
|
let curH = Math.max(1, Math.round(dimensions.height));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $t as vec2f, Ct as floor, N as unpremultiplyAlpha, Ot as mix, Vt as data_exports, Xt as struct, _ as floatE, _t as clamp, an as f32, bt as dot, d as ZERO, et as src_default, in as vec4f, nn as vec3f, nt as std_exports, p as call, t as applyEdgeHandlingExpr } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { t as toHalfFloat } from "./dataEncoding-CEmpiitu.js";
|
|
3
|
+
import { s as transformEdges } from "./transformations-CsPUHppB.js";
|
|
3
4
|
var transformThrowKey = (value) => {
|
|
4
5
|
return {
|
|
5
6
|
luminance: 0,
|
|
@@ -11,13 +12,13 @@ var transformThrowKey = (value) => {
|
|
|
11
12
|
};
|
|
12
13
|
var GRID = 128;
|
|
13
14
|
var num = (v, f) => typeof v === "number" ? v : f;
|
|
14
|
-
const pixelThrowOffsetUV =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
],
|
|
15
|
+
const pixelThrowOffsetUV = src_default.fn([
|
|
16
|
+
vec2f,
|
|
17
|
+
vec2f,
|
|
18
|
+
f32
|
|
19
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, flowVec, scale) => {
|
|
19
20
|
"use gpu";
|
|
20
|
-
return
|
|
21
|
+
return vec2f(__tsover_sub(uv.x, __tsover_mul(flowVec.x, scale)), __tsover_sub(uv.y, __tsover_mul(flowVec.y, scale)));
|
|
21
22
|
}), {
|
|
22
23
|
v: 1,
|
|
23
24
|
name: void 0,
|
|
@@ -83,22 +84,22 @@ const pixelThrowOffsetUV = tgpu.fn([
|
|
|
83
84
|
]]]],
|
|
84
85
|
"externalNames": ["d"]
|
|
85
86
|
},
|
|
86
|
-
externals: () => ({ d })
|
|
87
|
+
externals: () => ({ d: data_exports })
|
|
87
88
|
}) && $.f)({})).$name("pixelThrowOffsetUV");
|
|
88
|
-
const PixelThrowBicubicTaps = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
89
|
-
uvA:
|
|
90
|
-
uvB:
|
|
91
|
-
uvC:
|
|
92
|
-
uvD:
|
|
93
|
-
w:
|
|
89
|
+
const PixelThrowBicubicTaps = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
90
|
+
uvA: vec2f,
|
|
91
|
+
uvB: vec2f,
|
|
92
|
+
uvC: vec2f,
|
|
93
|
+
uvD: vec2f,
|
|
94
|
+
w: vec4f
|
|
94
95
|
}), "PixelThrowBicubicTaps");
|
|
95
|
-
const pixelThrowBicubicSetup =
|
|
96
|
+
const pixelThrowBicubicSetup = src_default.fn([vec2f], PixelThrowBicubicTaps)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv) => {
|
|
96
97
|
"use gpu";
|
|
97
|
-
const gf =
|
|
98
|
+
const gf = f32(GRID);
|
|
98
99
|
const tx = __tsover_sub(__tsover_mul(uv.x, gf), .5);
|
|
99
100
|
const ty = __tsover_sub(__tsover_mul(uv.y, gf), .5);
|
|
100
|
-
const pxf =
|
|
101
|
-
const pyf =
|
|
101
|
+
const pxf = floor(tx);
|
|
102
|
+
const pyf = floor(ty);
|
|
102
103
|
const fx = __tsover_sub(tx, pxf);
|
|
103
104
|
const fy = __tsover_sub(ty, pyf);
|
|
104
105
|
const ofx = __tsover_sub(1, fx);
|
|
@@ -120,11 +121,11 @@ const pixelThrowBicubicSetup = tgpu.fn([d.vec2f], PixelThrowBicubicTaps)(/* @__P
|
|
|
120
121
|
const h0y = __tsover_add(__tsover_sub(pyf, 1), __tsover_div(wy1, g0y));
|
|
121
122
|
const h1y = __tsover_add(__tsover_add(pyf, 1), __tsover_div(wy3, g1y));
|
|
122
123
|
return PixelThrowBicubicTaps({
|
|
123
|
-
uvA:
|
|
124
|
-
uvB:
|
|
125
|
-
uvC:
|
|
126
|
-
uvD:
|
|
127
|
-
w:
|
|
124
|
+
uvA: vec2f(__tsover_div(__tsover_add(h0x, .5), gf), __tsover_div(__tsover_add(h0y, .5), gf)),
|
|
125
|
+
uvB: vec2f(__tsover_div(__tsover_add(h1x, .5), gf), __tsover_div(__tsover_add(h0y, .5), gf)),
|
|
126
|
+
uvC: vec2f(__tsover_div(__tsover_add(h0x, .5), gf), __tsover_div(__tsover_add(h1y, .5), gf)),
|
|
127
|
+
uvD: vec2f(__tsover_div(__tsover_add(h1x, .5), gf), __tsover_div(__tsover_add(h1y, .5), gf)),
|
|
128
|
+
w: vec4f(__tsover_mul(g0x, g0y), __tsover_mul(g1x, g0y), __tsover_mul(g0x, g1y), __tsover_mul(g1x, g1y))
|
|
128
129
|
});
|
|
129
130
|
}), {
|
|
130
131
|
v: 1,
|
|
@@ -727,24 +728,23 @@ const pixelThrowBicubicSetup = tgpu.fn([d.vec2f], PixelThrowBicubicTaps)(/* @__P
|
|
|
727
728
|
]
|
|
728
729
|
},
|
|
729
730
|
externals: () => ({
|
|
730
|
-
d,
|
|
731
|
+
d: data_exports,
|
|
731
732
|
GRID,
|
|
732
|
-
std,
|
|
733
|
+
std: std_exports,
|
|
733
734
|
PixelThrowBicubicTaps
|
|
734
735
|
})
|
|
735
736
|
}) && $.f)({})).$name("pixelThrowBicubicSetup");
|
|
736
737
|
function buildKeyScale(keyMode) {
|
|
737
|
-
return
|
|
738
|
+
return src_default.fn([vec3f, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rgb, keyInfluence) => {
|
|
738
739
|
"use gpu";
|
|
739
|
-
const lum =
|
|
740
|
-
let key =
|
|
741
|
-
if (keyMode === 1) key = __tsover_sub(1,
|
|
740
|
+
const lum = vec3f(.299, .587, .114);
|
|
741
|
+
let key = f32(0);
|
|
742
|
+
if (keyMode === 1) key = __tsover_sub(1, dot(rgb, lum));
|
|
742
743
|
else if (keyMode === 2) key = rgb.x;
|
|
743
744
|
else if (keyMode === 3) key = rgb.y;
|
|
744
745
|
else if (keyMode === 4) key = rgb.z;
|
|
745
|
-
else key =
|
|
746
|
-
|
|
747
|
-
return std.mix(1, keyClamped, keyInfluence);
|
|
746
|
+
else key = dot(rgb, lum);
|
|
747
|
+
return mix(1, clamp(key, 0, 1), keyInfluence);
|
|
748
748
|
}), {
|
|
749
749
|
v: 1,
|
|
750
750
|
name: void 0,
|
|
@@ -924,9 +924,9 @@ function buildKeyScale(keyMode) {
|
|
|
924
924
|
]
|
|
925
925
|
},
|
|
926
926
|
externals: () => ({
|
|
927
|
-
d,
|
|
927
|
+
d: data_exports,
|
|
928
928
|
keyMode,
|
|
929
|
-
std
|
|
929
|
+
std: std_exports
|
|
930
930
|
})
|
|
931
931
|
}) && $.f)({})).$name(`pixelThrowKeyScale_${keyMode}`);
|
|
932
932
|
}
|