shaders 3.0.448 → 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/index.js +310 -221
- 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/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 { $t as vec2f, At as pow, Ct as floor, Dt as min, Et as max, F as colorMixing_exports, Gt as textureStorage2d, It as sin, Lt as smoothstep, Ot as mix, Ut as arrayOf, Vt as data_exports, Wt as texture2d, Xt as struct, _ as floatE, _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, kt as normalize, nn as vec3f, nt as std_exports, on as i32, p as call, pt as select, rt as textureDimensions, sn as u32, tn as vec2u, vt as cos, 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, i as transformBoolean, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
3
4
|
var cm = colorMixing_exports;
|
|
4
5
|
var N = 512;
|
|
5
6
|
var COUNT = N * N;
|
|
@@ -67,68 +68,68 @@ var CHILD_FEED_MIN = .008;
|
|
|
67
68
|
var CHILD_FEED_MAX = .11;
|
|
68
69
|
var CHILD_KILL_MIN = .03;
|
|
69
70
|
var CHILD_KILL_MAX = .075;
|
|
70
|
-
var RDParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
71
|
-
feed:
|
|
72
|
-
kill:
|
|
73
|
-
dv:
|
|
74
|
-
brushRadSq:
|
|
75
|
-
brushStrength:
|
|
76
|
-
cursorX:
|
|
77
|
-
cursorY:
|
|
78
|
-
cursorActive:
|
|
79
|
-
childInfluence:
|
|
80
|
-
childContrast:
|
|
81
|
-
childThreshold:
|
|
82
|
-
childInvert:
|
|
83
|
-
childMapX:
|
|
84
|
-
childMapY:
|
|
85
|
-
_pad0:
|
|
86
|
-
_pad1:
|
|
71
|
+
var RDParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
72
|
+
feed: f32,
|
|
73
|
+
kill: f32,
|
|
74
|
+
dv: f32,
|
|
75
|
+
brushRadSq: f32,
|
|
76
|
+
brushStrength: f32,
|
|
77
|
+
cursorX: f32,
|
|
78
|
+
cursorY: f32,
|
|
79
|
+
cursorActive: f32,
|
|
80
|
+
childInfluence: f32,
|
|
81
|
+
childContrast: f32,
|
|
82
|
+
childThreshold: f32,
|
|
83
|
+
childInvert: f32,
|
|
84
|
+
childMapX: f32,
|
|
85
|
+
childMapY: f32,
|
|
86
|
+
_pad0: f32,
|
|
87
|
+
_pad1: f32
|
|
87
88
|
}), "RDParams");
|
|
88
|
-
var reactionLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
89
|
+
var reactionLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
89
90
|
readBuf: {
|
|
90
|
-
storage:
|
|
91
|
+
storage: arrayOf(vec2f, COUNT),
|
|
91
92
|
access: "readonly"
|
|
92
93
|
},
|
|
93
94
|
writeBuf: {
|
|
94
|
-
storage:
|
|
95
|
+
storage: arrayOf(vec2f, COUNT),
|
|
95
96
|
access: "mutable"
|
|
96
97
|
},
|
|
97
98
|
params: { uniform: RDParams }
|
|
98
99
|
}), "reactionLayout");
|
|
99
|
-
var seedLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
100
|
-
storage:
|
|
100
|
+
var seedLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({ stateBuf: {
|
|
101
|
+
storage: arrayOf(vec2f, COUNT),
|
|
101
102
|
access: "mutable"
|
|
102
103
|
} }), "seedLayout");
|
|
103
|
-
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
104
|
+
var outputLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
104
105
|
srcBuf: {
|
|
105
|
-
storage:
|
|
106
|
+
storage: arrayOf(vec2f, COUNT),
|
|
106
107
|
access: "readonly"
|
|
107
108
|
},
|
|
108
|
-
outTex: { storageTexture:
|
|
109
|
+
outTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
109
110
|
}), "outputLayout");
|
|
110
|
-
var reactionChildLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
111
|
+
var reactionChildLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
111
112
|
readBuf: {
|
|
112
|
-
storage:
|
|
113
|
+
storage: arrayOf(vec2f, COUNT),
|
|
113
114
|
access: "readonly"
|
|
114
115
|
},
|
|
115
116
|
writeBuf: {
|
|
116
|
-
storage:
|
|
117
|
+
storage: arrayOf(vec2f, COUNT),
|
|
117
118
|
access: "mutable"
|
|
118
119
|
},
|
|
119
120
|
params: { uniform: RDParams },
|
|
120
|
-
childTex: { texture:
|
|
121
|
+
childTex: { texture: texture2d(f32) }
|
|
121
122
|
}), "reactionChildLayout");
|
|
122
|
-
var nbrState =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
],
|
|
123
|
+
var nbrState = src_default.fn([
|
|
124
|
+
i32,
|
|
125
|
+
i32,
|
|
126
|
+
i32,
|
|
127
|
+
i32
|
|
128
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((ii, ji, di, dj) => {
|
|
128
129
|
"use gpu";
|
|
129
|
-
const row =
|
|
130
|
-
const col =
|
|
131
|
-
return reactionLayout.$.readBuf[
|
|
130
|
+
const row = clamp(__tsover_add(ii, di), 0, __tsover_sub(N, 1));
|
|
131
|
+
const col = clamp(__tsover_add(ji, dj), 0, __tsover_sub(N, 1));
|
|
132
|
+
return reactionLayout.$.readBuf[u32(__tsover_add(__tsover_mul(row, N), col))];
|
|
132
133
|
}), {
|
|
133
134
|
v: 1,
|
|
134
135
|
name: void 0,
|
|
@@ -246,19 +247,19 @@ var nbrState = tgpu.fn([
|
|
|
246
247
|
]
|
|
247
248
|
},
|
|
248
249
|
externals: () => ({
|
|
249
|
-
std,
|
|
250
|
+
std: std_exports,
|
|
250
251
|
N,
|
|
251
252
|
reactionLayout,
|
|
252
|
-
d
|
|
253
|
+
d: data_exports
|
|
253
254
|
})
|
|
254
255
|
}) && $.f)({})).$name("reactionDiffusionNbr");
|
|
255
|
-
const reactionKernel =
|
|
256
|
+
const reactionKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
256
257
|
"use gpu";
|
|
257
258
|
const p = reactionLayout.$.params;
|
|
258
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
259
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
259
260
|
const self = reactionLayout.$.readBuf[idx];
|
|
260
|
-
const ii =
|
|
261
|
-
const ji =
|
|
261
|
+
const ii = i32(cy);
|
|
262
|
+
const ji = i32(cx);
|
|
262
263
|
const L = nbrState(ii, ji, 0, -1);
|
|
263
264
|
const R = nbrState(ii, ji, 0, 1);
|
|
264
265
|
const T = nbrState(ii, ji, -1, 0);
|
|
@@ -275,17 +276,17 @@ const reactionKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalTh
|
|
|
275
276
|
let newU = __tsover_add(U, __tsover_add(__tsover_sub(lapU, uvv), __tsover_mul(p.feed, __tsover_sub(1, U))));
|
|
276
277
|
let newV = __tsover_add(V, __tsover_sub(__tsover_add(__tsover_mul(p.dv, lapV), uvv), __tsover_mul(__tsover_add(p.feed, p.kill), V)));
|
|
277
278
|
if (p.cursorActive > 0) {
|
|
278
|
-
const cellX = __tsover_add(
|
|
279
|
-
const cellY = __tsover_add(
|
|
279
|
+
const cellX = __tsover_add(f32(cx), .5);
|
|
280
|
+
const cellY = __tsover_add(f32(cy), .5);
|
|
280
281
|
const dxp = __tsover_sub(cellX, p.cursorX);
|
|
281
282
|
const dyp = __tsover_sub(cellY, p.cursorY);
|
|
282
283
|
const distSq = __tsover_add(__tsover_mul(dxp, dxp), __tsover_mul(dyp, dyp));
|
|
283
|
-
const inf = __tsover_mul(
|
|
284
|
-
newV =
|
|
284
|
+
const inf = __tsover_mul(exp(__tsover_mul(__tsover_div(distSq, max(p.brushRadSq, f32(1))), -1)), p.cursorActive);
|
|
285
|
+
newV = min(__tsover_add(newV, __tsover_mul(inf, p.brushStrength)), f32(1));
|
|
285
286
|
}
|
|
286
|
-
newU =
|
|
287
|
-
newV =
|
|
288
|
-
reactionLayout.$.writeBuf[idx] =
|
|
287
|
+
newU = clamp(newU, 0, 1);
|
|
288
|
+
newV = clamp(newV, 0, 1);
|
|
289
|
+
reactionLayout.$.writeBuf[idx] = vec2f(newU, newV);
|
|
289
290
|
}), {
|
|
290
291
|
v: 1,
|
|
291
292
|
name: void 0,
|
|
@@ -1073,22 +1074,22 @@ const reactionKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalTh
|
|
|
1073
1074
|
},
|
|
1074
1075
|
externals: () => ({
|
|
1075
1076
|
reactionLayout,
|
|
1076
|
-
d,
|
|
1077
|
+
d: data_exports,
|
|
1077
1078
|
N,
|
|
1078
1079
|
nbrState,
|
|
1079
|
-
std
|
|
1080
|
+
std: std_exports
|
|
1080
1081
|
})
|
|
1081
1082
|
}) && $.f)({})).$name("reactionDiffusionReact");
|
|
1082
|
-
var nbrStateChild =
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
],
|
|
1083
|
+
var nbrStateChild = src_default.fn([
|
|
1084
|
+
i32,
|
|
1085
|
+
i32,
|
|
1086
|
+
i32,
|
|
1087
|
+
i32
|
|
1088
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((ii, ji, di, dj) => {
|
|
1088
1089
|
"use gpu";
|
|
1089
|
-
const row =
|
|
1090
|
-
const col =
|
|
1091
|
-
return reactionChildLayout.$.readBuf[
|
|
1090
|
+
const row = clamp(__tsover_add(ii, di), 0, __tsover_sub(N, 1));
|
|
1091
|
+
const col = clamp(__tsover_add(ji, dj), 0, __tsover_sub(N, 1));
|
|
1092
|
+
return reactionChildLayout.$.readBuf[u32(__tsover_add(__tsover_mul(row, N), col))];
|
|
1092
1093
|
}), {
|
|
1093
1094
|
v: 1,
|
|
1094
1095
|
name: void 0,
|
|
@@ -1206,32 +1207,31 @@ var nbrStateChild = tgpu.fn([
|
|
|
1206
1207
|
]
|
|
1207
1208
|
},
|
|
1208
1209
|
externals: () => ({
|
|
1209
|
-
std,
|
|
1210
|
+
std: std_exports,
|
|
1210
1211
|
N,
|
|
1211
1212
|
reactionChildLayout,
|
|
1212
|
-
d
|
|
1213
|
+
d: data_exports
|
|
1213
1214
|
})
|
|
1214
1215
|
}) && $.f)({})).$name("reactionDiffusionNbrChild");
|
|
1215
|
-
const rdChildDrive =
|
|
1216
|
+
const rdChildDrive = src_default.fn([u32, u32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1216
1217
|
"use gpu";
|
|
1217
1218
|
const p = reactionChildLayout.$.params;
|
|
1218
|
-
const dims =
|
|
1219
|
-
const fw =
|
|
1220
|
-
const fh =
|
|
1221
|
-
const fx = __tsover_div(__tsover_add(
|
|
1222
|
-
const fy = __tsover_div(__tsover_add(
|
|
1223
|
-
const cu =
|
|
1224
|
-
const cv =
|
|
1225
|
-
const px =
|
|
1226
|
-
const py =
|
|
1227
|
-
const texel =
|
|
1228
|
-
const cov =
|
|
1229
|
-
const
|
|
1230
|
-
const
|
|
1231
|
-
const
|
|
1232
|
-
const shaped = std.clamp(__tsover_add(__tsover_mul(__tsover_sub(luma, p.childThreshold), gain), .5), d.f32(0), d.f32(1));
|
|
1219
|
+
const dims = textureDimensions(reactionChildLayout.$.childTex);
|
|
1220
|
+
const fw = f32(dims.x);
|
|
1221
|
+
const fh = f32(dims.y);
|
|
1222
|
+
const fx = __tsover_div(__tsover_add(f32(cx), .5), f32(N));
|
|
1223
|
+
const fy = __tsover_div(__tsover_add(f32(cy), .5), f32(N));
|
|
1224
|
+
const cu = clamp(__tsover_add(__tsover_mul(__tsover_sub(fx, .5), p.childMapX), .5), f32(0), f32(1));
|
|
1225
|
+
const cv = clamp(__tsover_add(__tsover_mul(__tsover_sub(fy, .5), p.childMapY), .5), f32(0), f32(1));
|
|
1226
|
+
const px = u32(min(__tsover_mul(cu, fw), __tsover_sub(fw, 1)));
|
|
1227
|
+
const py = u32(min(__tsover_mul(cv, fh), __tsover_sub(fh, 1)));
|
|
1228
|
+
const texel = textureLoad(reactionChildLayout.$.childTex, vec2u(px, py), 0);
|
|
1229
|
+
const cov = clamp(texel.w, f32(0), f32(1));
|
|
1230
|
+
const luma = dot(texel.xyz.div(max(texel.w, f32(.001))), vec3f(.2126, .7152, .0722));
|
|
1231
|
+
const gain = __tsover_add(f32(1), __tsover_mul(p.childContrast, f32(CHILD_CONTRAST_MAX)));
|
|
1232
|
+
const shaped = clamp(__tsover_add(__tsover_mul(__tsover_sub(luma, p.childThreshold), gain), .5), f32(0), f32(1));
|
|
1233
1233
|
let signed = __tsover_mul(__tsover_sub(shaped, .5), 2);
|
|
1234
|
-
signed =
|
|
1234
|
+
signed = select(signed, __tsover_mul(signed, -1), p.childInvert > .5);
|
|
1235
1235
|
return __tsover_mul(signed, cov);
|
|
1236
1236
|
}), {
|
|
1237
1237
|
v: 1,
|
|
@@ -1828,19 +1828,19 @@ const rdChildDrive = tgpu.fn([d.u32, d.u32], d.f32)(/* @__PURE__ */ (($) => (glo
|
|
|
1828
1828
|
},
|
|
1829
1829
|
externals: () => ({
|
|
1830
1830
|
reactionChildLayout,
|
|
1831
|
-
std,
|
|
1832
|
-
d,
|
|
1831
|
+
std: std_exports,
|
|
1832
|
+
d: data_exports,
|
|
1833
1833
|
N,
|
|
1834
1834
|
CHILD_CONTRAST_MAX
|
|
1835
1835
|
})
|
|
1836
1836
|
}) && $.f)({})).$name("reactionDiffusionChildDrive");
|
|
1837
|
-
const reactionKernelChild =
|
|
1837
|
+
const reactionKernelChild = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
1838
1838
|
"use gpu";
|
|
1839
1839
|
const p = reactionChildLayout.$.params;
|
|
1840
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
1840
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
1841
1841
|
const self = reactionChildLayout.$.readBuf[idx];
|
|
1842
|
-
const ii =
|
|
1843
|
-
const ji =
|
|
1842
|
+
const ii = i32(cy);
|
|
1843
|
+
const ji = i32(cx);
|
|
1844
1844
|
const L = nbrStateChild(ii, ji, 0, -1);
|
|
1845
1845
|
const R = nbrStateChild(ii, ji, 0, 1);
|
|
1846
1846
|
const T = nbrStateChild(ii, ji, -1, 0);
|
|
@@ -1852,25 +1852,25 @@ const reactionKernelChild = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (glo
|
|
|
1852
1852
|
const lapU = __tsover_sub(__tsover_add(__tsover_mul(__tsover_add(__tsover_add(__tsover_add(L.x, R.x), T.x), B.x), .2), __tsover_mul(__tsover_add(__tsover_add(__tsover_add(TL.x, TR.x), BL.x), BR.x), .05)), self.x);
|
|
1853
1853
|
const lapV = __tsover_sub(__tsover_add(__tsover_mul(__tsover_add(__tsover_add(__tsover_add(L.y, R.y), T.y), B.y), .2), __tsover_mul(__tsover_add(__tsover_add(__tsover_add(TL.y, TR.y), BL.y), BR.y), .05)), self.y);
|
|
1854
1854
|
const mod = __tsover_mul(rdChildDrive(cx, cy), p.childInfluence);
|
|
1855
|
-
const feedCell =
|
|
1856
|
-
const killCell =
|
|
1855
|
+
const feedCell = clamp(__tsover_add(p.feed, __tsover_mul(mod, f32(CHILD_DFEED))), f32(CHILD_FEED_MIN), f32(CHILD_FEED_MAX));
|
|
1856
|
+
const killCell = clamp(__tsover_sub(p.kill, __tsover_mul(mod, f32(CHILD_DKILL))), f32(CHILD_KILL_MIN), f32(CHILD_KILL_MAX));
|
|
1857
1857
|
const U = self.x;
|
|
1858
1858
|
const V = self.y;
|
|
1859
1859
|
const uvv = __tsover_mul(__tsover_mul(U, V), V);
|
|
1860
1860
|
let newU = __tsover_add(U, __tsover_add(__tsover_sub(lapU, uvv), __tsover_mul(feedCell, __tsover_sub(1, U))));
|
|
1861
1861
|
let newV = __tsover_add(V, __tsover_sub(__tsover_add(__tsover_mul(p.dv, lapV), uvv), __tsover_mul(__tsover_add(feedCell, killCell), V)));
|
|
1862
1862
|
if (p.cursorActive > 0) {
|
|
1863
|
-
const cellX = __tsover_add(
|
|
1864
|
-
const cellY = __tsover_add(
|
|
1863
|
+
const cellX = __tsover_add(f32(cx), .5);
|
|
1864
|
+
const cellY = __tsover_add(f32(cy), .5);
|
|
1865
1865
|
const dxp = __tsover_sub(cellX, p.cursorX);
|
|
1866
1866
|
const dyp = __tsover_sub(cellY, p.cursorY);
|
|
1867
1867
|
const distSq = __tsover_add(__tsover_mul(dxp, dxp), __tsover_mul(dyp, dyp));
|
|
1868
|
-
const inf = __tsover_mul(
|
|
1869
|
-
newV =
|
|
1868
|
+
const inf = __tsover_mul(exp(__tsover_mul(__tsover_div(distSq, max(p.brushRadSq, f32(1))), -1)), p.cursorActive);
|
|
1869
|
+
newV = min(__tsover_add(newV, __tsover_mul(inf, p.brushStrength)), f32(1));
|
|
1870
1870
|
}
|
|
1871
|
-
newU =
|
|
1872
|
-
newV =
|
|
1873
|
-
reactionChildLayout.$.writeBuf[idx] =
|
|
1871
|
+
newU = clamp(newU, 0, 1);
|
|
1872
|
+
newV = clamp(newV, 0, 1);
|
|
1873
|
+
reactionChildLayout.$.writeBuf[idx] = vec2f(newU, newV);
|
|
1874
1874
|
}), {
|
|
1875
1875
|
v: 1,
|
|
1876
1876
|
name: void 0,
|
|
@@ -2781,11 +2781,11 @@ const reactionKernelChild = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (glo
|
|
|
2781
2781
|
},
|
|
2782
2782
|
externals: () => ({
|
|
2783
2783
|
reactionChildLayout,
|
|
2784
|
-
d,
|
|
2784
|
+
d: data_exports,
|
|
2785
2785
|
N,
|
|
2786
2786
|
nbrStateChild,
|
|
2787
2787
|
rdChildDrive,
|
|
2788
|
-
std,
|
|
2788
|
+
std: std_exports,
|
|
2789
2789
|
CHILD_DFEED,
|
|
2790
2790
|
CHILD_FEED_MIN,
|
|
2791
2791
|
CHILD_FEED_MAX,
|
|
@@ -2794,13 +2794,13 @@ const reactionKernelChild = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (glo
|
|
|
2794
2794
|
CHILD_KILL_MAX
|
|
2795
2795
|
})
|
|
2796
2796
|
}) && $.f)({})).$name("reactionDiffusionReactChild");
|
|
2797
|
-
const seedKernel =
|
|
2797
|
+
const seedKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2798
2798
|
"use gpu";
|
|
2799
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2800
|
-
const s = __tsover_mul(
|
|
2801
|
-
const h = __tsover_sub(s,
|
|
2802
|
-
const vSeed =
|
|
2803
|
-
seedLayout.$.stateBuf[idx] =
|
|
2799
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2800
|
+
const s = __tsover_mul(sin(__tsover_add(__tsover_mul(f32(cx), 12.9898), __tsover_mul(f32(cy), 78.233))), 43758.5453);
|
|
2801
|
+
const h = __tsover_sub(s, floor(s));
|
|
2802
|
+
const vSeed = select(f32(0), f32(1), h < SEED_DENSITY);
|
|
2803
|
+
seedLayout.$.stateBuf[idx] = vec2f(1, vSeed);
|
|
2804
2804
|
}), {
|
|
2805
2805
|
v: 1,
|
|
2806
2806
|
name: void 0,
|
|
@@ -2977,18 +2977,18 @@ const seedKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
2977
2977
|
]
|
|
2978
2978
|
},
|
|
2979
2979
|
externals: () => ({
|
|
2980
|
-
d,
|
|
2980
|
+
d: data_exports,
|
|
2981
2981
|
N,
|
|
2982
|
-
std,
|
|
2982
|
+
std: std_exports,
|
|
2983
2983
|
SEED_DENSITY,
|
|
2984
2984
|
seedLayout
|
|
2985
2985
|
})
|
|
2986
2986
|
}) && $.f)({})).$name("reactionDiffusionSeed");
|
|
2987
|
-
const outputKernel =
|
|
2987
|
+
const outputKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
|
|
2988
2988
|
"use gpu";
|
|
2989
|
-
const idx = __tsover_add(__tsover_mul(cy,
|
|
2989
|
+
const idx = __tsover_add(__tsover_mul(cy, u32(N)), cx);
|
|
2990
2990
|
const s = outputLayout.$.srcBuf[idx];
|
|
2991
|
-
|
|
2991
|
+
textureStore(outputLayout.$.outTex, vec2u(cx, cy), vec4f(s.x, s.y, 0, 0));
|
|
2992
2992
|
}), {
|
|
2993
2993
|
v: 1,
|
|
2994
2994
|
name: void 0,
|
|
@@ -3100,24 +3100,22 @@ const outputKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (globalThis
|
|
|
3100
3100
|
]
|
|
3101
3101
|
},
|
|
3102
3102
|
externals: () => ({
|
|
3103
|
-
d,
|
|
3103
|
+
d: data_exports,
|
|
3104
3104
|
N,
|
|
3105
3105
|
outputLayout,
|
|
3106
|
-
std
|
|
3106
|
+
std: std_exports
|
|
3107
3107
|
})
|
|
3108
3108
|
}) && $.f)({})).$name("reactionDiffusionOutput");
|
|
3109
|
-
const rdSampleUV =
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
],
|
|
3109
|
+
const rdSampleUV = src_default.fn([
|
|
3110
|
+
vec2f,
|
|
3111
|
+
f32,
|
|
3112
|
+
f32
|
|
3113
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, aspect, featureSize) => {
|
|
3114
3114
|
"use gpu";
|
|
3115
3115
|
const view = __tsover_div(1, featureSize);
|
|
3116
|
-
const sx =
|
|
3117
|
-
const sy =
|
|
3118
|
-
|
|
3119
|
-
const fy = __tsover_add(__tsover_mul(__tsover_mul(__tsover_sub(uv.y, .5), sy), view), .5);
|
|
3120
|
-
return d.vec2f(fx, fy);
|
|
3116
|
+
const sx = min(aspect, 1);
|
|
3117
|
+
const sy = min(__tsover_div(1, aspect), 1);
|
|
3118
|
+
return vec2f(__tsover_add(__tsover_mul(__tsover_mul(__tsover_sub(uv.x, .5), sx), view), .5), __tsover_add(__tsover_mul(__tsover_mul(__tsover_sub(uv.y, .5), sy), view), .5));
|
|
3121
3119
|
}), {
|
|
3122
3120
|
v: 1,
|
|
3123
3121
|
name: void 0,
|
|
@@ -3249,18 +3247,18 @@ const rdSampleUV = tgpu.fn([
|
|
|
3249
3247
|
"externalNames": ["std", "d"]
|
|
3250
3248
|
},
|
|
3251
3249
|
externals: () => ({
|
|
3252
|
-
std,
|
|
3253
|
-
d
|
|
3250
|
+
std: std_exports,
|
|
3251
|
+
d: data_exports
|
|
3254
3252
|
})
|
|
3255
3253
|
}) && $.f)({})).$name("reactionDiffusionSampleUV");
|
|
3256
|
-
const rdRampT =
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
],
|
|
3254
|
+
const rdRampT = src_default.fn([
|
|
3255
|
+
f32,
|
|
3256
|
+
f32,
|
|
3257
|
+
f32
|
|
3258
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((v, contrast, threshold) => {
|
|
3261
3259
|
"use gpu";
|
|
3262
|
-
const w =
|
|
3263
|
-
return
|
|
3260
|
+
const w = max(__tsover_sub(.6, __tsover_mul(contrast, .55)), .02);
|
|
3261
|
+
return smoothstep(__tsover_sub(threshold, w), __tsover_add(threshold, w), v);
|
|
3264
3262
|
}), {
|
|
3265
3263
|
v: 1,
|
|
3266
3264
|
name: void 0,
|
|
@@ -3326,11 +3324,11 @@ const rdRampT = tgpu.fn([
|
|
|
3326
3324
|
]]]],
|
|
3327
3325
|
"externalNames": ["std"]
|
|
3328
3326
|
},
|
|
3329
|
-
externals: () => ({ std })
|
|
3327
|
+
externals: () => ({ std: std_exports })
|
|
3330
3328
|
}) && $.f)({}));
|
|
3331
|
-
const rdSeg =
|
|
3329
|
+
const rdSeg = src_default.fn([f32, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((t, offset) => {
|
|
3332
3330
|
"use gpu";
|
|
3333
|
-
return
|
|
3331
|
+
return clamp(__tsover_sub(__tsover_mul(t, 2), offset), 0, 1);
|
|
3334
3332
|
}), {
|
|
3335
3333
|
v: 1,
|
|
3336
3334
|
name: void 0,
|
|
@@ -3367,16 +3365,16 @@ const rdSeg = tgpu.fn([d.f32, d.f32], d.f32)(/* @__PURE__ */ (($) => (globalThis
|
|
|
3367
3365
|
]]]],
|
|
3368
3366
|
"externalNames": ["std"]
|
|
3369
3367
|
},
|
|
3370
|
-
externals: () => ({ std })
|
|
3368
|
+
externals: () => ({ std: std_exports })
|
|
3371
3369
|
}) && $.f)({}));
|
|
3372
|
-
const rdPickSeg =
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
],
|
|
3370
|
+
const rdPickSeg = src_default.fn([
|
|
3371
|
+
vec4f,
|
|
3372
|
+
vec4f,
|
|
3373
|
+
f32
|
|
3374
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((lo, hi, t) => {
|
|
3377
3375
|
"use gpu";
|
|
3378
3376
|
const useHi = t > .5;
|
|
3379
|
-
return
|
|
3377
|
+
return vec4f(select(lo.x, hi.x, useHi), select(lo.y, hi.y, useHi), select(lo.z, hi.z, useHi), select(lo.w, hi.w, useHi));
|
|
3380
3378
|
}), {
|
|
3381
3379
|
v: 1,
|
|
3382
3380
|
name: void 0,
|
|
@@ -3501,17 +3499,17 @@ const rdPickSeg = tgpu.fn([
|
|
|
3501
3499
|
"externalNames": ["d", "std"]
|
|
3502
3500
|
},
|
|
3503
3501
|
externals: () => ({
|
|
3504
|
-
d,
|
|
3505
|
-
std
|
|
3502
|
+
d: data_exports,
|
|
3503
|
+
std: std_exports
|
|
3506
3504
|
})
|
|
3507
3505
|
}) && $.f)({}));
|
|
3508
|
-
const rdShiftUV =
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
],
|
|
3506
|
+
const rdShiftUV = src_default.fn([
|
|
3507
|
+
vec2f,
|
|
3508
|
+
f32,
|
|
3509
|
+
f32
|
|
3510
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, ox, oy) => {
|
|
3513
3511
|
"use gpu";
|
|
3514
|
-
return
|
|
3512
|
+
return vec2f(__tsover_add(uv.x, ox), __tsover_add(uv.y, oy));
|
|
3515
3513
|
}), {
|
|
3516
3514
|
v: 1,
|
|
3517
3515
|
name: void 0,
|
|
@@ -3559,30 +3557,30 @@ const rdShiftUV = tgpu.fn([
|
|
|
3559
3557
|
]]]],
|
|
3560
3558
|
"externalNames": ["d"]
|
|
3561
3559
|
},
|
|
3562
|
-
externals: () => ({ d })
|
|
3560
|
+
externals: () => ({ d: data_exports })
|
|
3563
3561
|
}) && $.f)({})).$name("reactionDiffusionShiftUV");
|
|
3564
|
-
const rdShade =
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
],
|
|
3562
|
+
const rdShade = src_default.fn([
|
|
3563
|
+
vec4f,
|
|
3564
|
+
f32,
|
|
3565
|
+
f32,
|
|
3566
|
+
f32,
|
|
3567
|
+
f32,
|
|
3568
|
+
f32,
|
|
3569
|
+
f32
|
|
3570
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((base, vL, vR, vT, vB, relief, lightAngle) => {
|
|
3573
3571
|
"use gpu";
|
|
3574
|
-
const gx = __tsover_mul(__tsover_sub(vR, vL),
|
|
3575
|
-
const gy = __tsover_mul(__tsover_sub(vB, vT),
|
|
3576
|
-
const n =
|
|
3572
|
+
const gx = __tsover_mul(__tsover_sub(vR, vL), f32(RELIEF_STRENGTH));
|
|
3573
|
+
const gy = __tsover_mul(__tsover_sub(vB, vT), f32(RELIEF_STRENGTH));
|
|
3574
|
+
const n = normalize(vec3f(-gx, -gy, f32(1)));
|
|
3577
3575
|
const ang = __tsover_mul(lightAngle, DEG2RAD);
|
|
3578
|
-
const lightDir =
|
|
3579
|
-
const diff =
|
|
3580
|
-
const shade = __tsover_add(RELIEF_AMBIENT, __tsover_mul(__tsover_sub(
|
|
3581
|
-
const halfVec =
|
|
3582
|
-
const spec = __tsover_mul(
|
|
3583
|
-
const litRgb = base.xyz.mul(shade).add(
|
|
3584
|
-
const outRgb =
|
|
3585
|
-
return
|
|
3576
|
+
const lightDir = normalize(vec3f(__tsover_mul(cos(ang), RELIEF_LIGHT_XY), __tsover_mul(sin(ang), RELIEF_LIGHT_XY), RELIEF_LIGHT_Z));
|
|
3577
|
+
const diff = clamp(dot(n, lightDir), f32(0), f32(1));
|
|
3578
|
+
const shade = __tsover_add(RELIEF_AMBIENT, __tsover_mul(__tsover_sub(f32(1), RELIEF_AMBIENT), diff));
|
|
3579
|
+
const halfVec = normalize(lightDir.add(vec3f(f32(0), f32(0), f32(1))));
|
|
3580
|
+
const spec = __tsover_mul(pow(clamp(dot(n, halfVec), f32(0), f32(1)), f32(RELIEF_SHININESS)), RELIEF_SPEC);
|
|
3581
|
+
const litRgb = base.xyz.mul(shade).add(vec3f(spec, spec, spec));
|
|
3582
|
+
const outRgb = mix(base.xyz, litRgb, relief);
|
|
3583
|
+
return vec4f(outRgb.x, outRgb.y, outRgb.z, base.w);
|
|
3586
3584
|
}), {
|
|
3587
3585
|
v: 1,
|
|
3588
3586
|
name: void 0,
|
|
@@ -4056,9 +4054,9 @@ const rdShade = tgpu.fn([
|
|
|
4056
4054
|
]
|
|
4057
4055
|
},
|
|
4058
4056
|
externals: () => ({
|
|
4059
|
-
d,
|
|
4057
|
+
d: data_exports,
|
|
4060
4058
|
RELIEF_STRENGTH,
|
|
4061
|
-
std,
|
|
4059
|
+
std: std_exports,
|
|
4062
4060
|
DEG2RAD,
|
|
4063
4061
|
RELIEF_LIGHT_XY,
|
|
4064
4062
|
RELIEF_LIGHT_Z,
|
|
@@ -4365,8 +4363,8 @@ const componentDefinition = {
|
|
|
4365
4363
|
if (!root) return null;
|
|
4366
4364
|
const hasChild = !!childNode;
|
|
4367
4365
|
const childTexture = hasChild && convertToTexture ? convertToTexture(childNode) : null;
|
|
4368
|
-
const bufferA = createStateBuffer(root,
|
|
4369
|
-
const bufferB = createStateBuffer(root,
|
|
4366
|
+
const bufferA = createStateBuffer(root, vec2f, COUNT);
|
|
4367
|
+
const bufferB = createStateBuffer(root, vec2f, COUNT);
|
|
4370
4368
|
const outTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
4371
4369
|
size: [N, N],
|
|
4372
4370
|
format: STATE_FORMAT
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as transformPosition, s as transformEdges } from "./transformations-
|
|
1
|
+
import { $t as vec2f, 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, v as mixExpr, vt as cos } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { c as transformPosition, s as transformEdges } from "./transformations-CsPUHppB.js";
|
|
3
3
|
var PI = Math.PI;
|
|
4
4
|
var TAU = Math.PI * 2;
|
|
5
|
-
const rectCoordsUV =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
],
|
|
5
|
+
const rectCoordsUV = src_default.fn([
|
|
6
|
+
vec2f,
|
|
7
|
+
f32,
|
|
8
|
+
vec2f,
|
|
9
|
+
f32
|
|
10
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((center, scale, uv, aspect) => {
|
|
11
11
|
"use gpu";
|
|
12
12
|
const theta = __tsover_sub(__tsover_mul(uv.x, TAU), PI);
|
|
13
13
|
const r = __tsover_mul(uv.y, scale);
|
|
14
|
-
const rectX = __tsover_mul(r,
|
|
15
|
-
const rectY = __tsover_mul(r,
|
|
16
|
-
const centerPos =
|
|
17
|
-
return
|
|
14
|
+
const rectX = __tsover_mul(r, cos(theta));
|
|
15
|
+
const rectY = __tsover_mul(r, sin(theta));
|
|
16
|
+
const centerPos = vec2f(center.x, __tsover_sub(1, center.y));
|
|
17
|
+
return vec2f(__tsover_add(__tsover_div(rectX, aspect), centerPos.x), __tsover_add(rectY, centerPos.y));
|
|
18
18
|
}), {
|
|
19
19
|
v: 1,
|
|
20
20
|
name: void 0,
|
|
@@ -176,8 +176,8 @@ const rectCoordsUV = tgpu.fn([
|
|
|
176
176
|
externals: () => ({
|
|
177
177
|
TAU,
|
|
178
178
|
PI,
|
|
179
|
-
std,
|
|
180
|
-
d
|
|
179
|
+
std: std_exports,
|
|
180
|
+
d: data_exports
|
|
181
181
|
})
|
|
182
182
|
}) && $.f)({}));
|
|
183
183
|
const componentDefinition = {
|