shaders 3.2.474 → 4.0.0

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.
Files changed (812) hide show
  1. package/LICENSE +21 -142
  2. package/README.md +192 -19
  3. package/dist/cli.js +2 -2
  4. package/dist/core/{AngularBlur-g4-fDx1N.js → AngularBlur-BEBs-lRR.js} +2 -3
  5. package/dist/core/{Arc-B4VGPOtO.js → Arc-D-WnjM7T.js} +1 -3
  6. package/dist/core/{Ascii-DxiduEzP.js → Ascii-BGPIwMc3.js} +2 -5
  7. package/dist/core/{Aurora-FgWLcSkh.js → Aurora-DqJBPdMQ.js} +2 -11
  8. package/dist/core/{BarShift-BukEd3jr.js → BarShift-BcCOweUh.js} +2 -3
  9. package/dist/core/{BarnDoors-BC0LM0aD.js → BarnDoors-B9B-AmCV.js} +2 -3
  10. package/dist/core/{Beam-CxAXVlAf.js → Beam-QG_9OS8I.js} +2 -3
  11. package/dist/core/{Bend-BfVVIo2C.js → Bend-Cy9VAowL.js} +1 -2
  12. package/dist/core/{Blob-D_IbcUCc.js → Blob-C3txJeW0.js} +2 -10
  13. package/dist/core/{BlockDissolve-C9nsgIz9.js → BlockDissolve-C1SFUys7.js} +2 -3
  14. package/dist/core/{BlockNoise-BgwbD0rx.js → BlockNoise-Cm3y8hce.js} +2 -4
  15. package/dist/core/{BlueNoise-BdwOaq4G.js → BlueNoise-BCLObOMm.js} +2 -4
  16. package/dist/core/{Blur-ceuv7ZTm.js → Blur-Dg29SnXd.js} +1 -2
  17. package/dist/core/{Boids-DEHsYo46.js → Boids-rsGsPN5h.js} +2 -5
  18. package/dist/core/{BokehBlur-C8xJ0xA8.js → BokehBlur-rFSFEnb0.js} +3 -4
  19. package/dist/core/{BrickPattern-C-6QFzp6.js → BrickPattern-DqN6JKEN.js} +2 -3
  20. package/dist/core/{BrightnessContrast-CMUaNvo0.js → BrightnessContrast-J9fCSBiC.js} +1 -3
  21. package/dist/core/{BrushedMetal-CQsu_96R.js → BrushedMetal-74wSZKjG.js} +3 -8
  22. package/dist/core/{Bulge-CgO7_0fe.js → Bulge-BIk0oq8j.js} +1 -2
  23. package/dist/core/{CRTScreen-DNqe2klB.js → CRTScreen-hEH-JNRd.js} +2 -3
  24. package/dist/core/{CarbonFiber-D0vgwlrV.js → CarbonFiber-CZdUDvRU.js} +4 -8
  25. package/dist/core/{Chalkboard-CDUJz_Ae.js → Chalkboard-CClJHqvs.js} +2 -3
  26. package/dist/core/{ChannelBlur-Z8ZvN6W3.js → ChannelBlur-BEuEwQOC.js} +1 -2
  27. package/dist/core/{CheckerWipe-DXm9kDaS.js → CheckerWipe-KuAWj2qg.js} +2 -3
  28. package/dist/core/{Checkerboard-DZAABNKo.js → Checkerboard-Rq9ze1W3.js} +2 -3
  29. package/dist/core/{Chevron-Dn1iHSiS.js → Chevron-C1j6X2Ye.js} +2 -3
  30. package/dist/core/{ChromaFlow-lnaJ4o1Y.js → ChromaFlow-BgsCUYIl.js} +2 -5
  31. package/dist/core/{ChromaticAberration-CGOQe4Pp.js → ChromaticAberration-2_4tjQ0u.js} +2 -4
  32. package/dist/core/{Chrome-DPAmErfN.js → Chrome-Be3z6C5i.js} +5 -11
  33. package/dist/core/{Circle-DVPhvXdr.js → Circle-e_qQI3tU.js} +1 -3
  34. package/dist/core/{ColorWheel-DXkVOQl2.js → ColorWheel-s5ep1H7d.js} +2 -3
  35. package/dist/core/{CompressionArtifacts-CEw9gfTu.js → CompressionArtifacts-OE9U9Qrq.js} +1 -3
  36. package/dist/core/{ConcentricSpin-GtNEq1T1.js → ConcentricSpin-CLE_5yCJ.js} +1 -2
  37. package/dist/core/{ConicGradient-DYPNJAOg.js → ConicGradient-Cji2SgVO.js} +2 -4
  38. package/dist/core/{ContourLines-DEmEepvT.js → ContourLines-wpPK00cF.js} +2 -3
  39. package/dist/core/{CornerPin-CJJeGyVf.js → CornerPin-gYU0Uf2m.js} +2 -3
  40. package/dist/core/{Crescent-C7yy9-xf.js → Crescent-viNc7Unp.js} +1 -2
  41. package/dist/core/{Cross-DyYrdTVw.js → Cross-DyQSsw_k.js} +1 -2
  42. package/dist/core/{Crystal-DQJd5oAd.js → Crystal-Vjj8azWg.js} +4 -9
  43. package/dist/core/{CurlNoise-Bjc6hhjR.js → CurlNoise-C7PHjDht.js} +2 -4
  44. package/dist/core/{CursorRipples-C1PNyYcB.js → CursorRipples-BzPPNkA3.js} +3 -39
  45. package/dist/core/{CursorTrail-C6v97bId.js → CursorTrail-cBj0AuQA.js} +2 -4
  46. package/dist/core/{DataMosh-AX4kIi4R.js → DataMosh-5Yr9TyVx.js} +1 -3
  47. package/dist/core/{DiamondGradient-Bj6mUxOy.js → DiamondGradient-DZM7HwF5.js} +2 -4
  48. package/dist/core/{DiamondWipe-BNSkpUn9.js → DiamondWipe-CqeT7lCt.js} +2 -3
  49. package/dist/core/{DiffuseBlur-C7l-5Dw3.js → DiffuseBlur-Y5hSDTZF.js} +2 -3
  50. package/dist/core/{DisplacementMap-DGpLSlxs.js → DisplacementMap-FobRx5Ie.js} +2 -3
  51. package/dist/core/{Dither-C9KDpqgP.js → Dither-50rqHpt9.js} +2 -3
  52. package/dist/core/{DotGrid-CkAtf-j_.js → DotGrid-B6AGLUbR.js} +3 -4
  53. package/dist/core/{DropShadow-BxI_a7dC.js → DropShadow-CEPpgatB.js} +2 -3
  54. package/dist/core/{Duotone-CrJ0P0SL.js → Duotone-D76Kp7Pb.js} +2 -3
  55. package/dist/core/{Ellipse-C2Tie_19.js → Ellipse-BGod1LeG.js} +1 -2
  56. package/dist/core/{Emboss-BjOlYydL.js → Emboss-DMNFb_ww.js} +3 -6
  57. package/dist/core/{Engraving-RpxXPqQq.js → Engraving-Dj7bCATQ.js} +2 -3
  58. package/dist/core/{ErosionNoise-D0qefxhq.js → ErosionNoise-4O68wJQZ.js} +2 -4
  59. package/dist/core/{Exposure-B7W7AVbY.js → Exposure-h-vapOpj.js} +1 -3
  60. package/dist/core/{FallingLines-Cxhmtqf4.js → FallingLines-Dzop_89k.js} +2 -3
  61. package/dist/core/{FilmGrain-CghUJIeK.js → FilmGrain-Bs8PCfdf.js} +1 -3
  62. package/dist/core/{FilmStock-DmOaROtC.js → FilmStock-DBjVo6rL.js} +1 -4
  63. package/dist/core/{Flip-BuOdbWjK.js → Flip-CfrS4KfZ.js} +2 -3
  64. package/dist/core/{FloatingParticles-BfFlt06Y.js → FloatingParticles-D1R2tD2J.js} +2 -5
  65. package/dist/core/{FlowField-A2njOtGx.js → FlowField-Slirm5AI.js} +2 -3
  66. package/dist/core/{Flower-CwdJOVR1.js → Flower-Ddlut7QZ.js} +1 -2
  67. package/dist/core/{FlowingGradient-D3BG2FW9.js → FlowingGradient-CwIgTtbj.js} +2 -7
  68. package/dist/core/{FlutedGlass-BWlTrLF-.js → FlutedGlass-CMMy2GJ5.js} +2 -4
  69. package/dist/core/{Fog-CpmIyRtJ.js → Fog-DjjUkcTZ.js} +2 -4
  70. package/dist/core/{Form3D-D-eUD4_k.js → Form3D-DQDOHWpC.js} +2 -4
  71. package/dist/core/{FractalNoise-DsESU8cP.js → FractalNoise-BjI3IOIj.js} +2 -4
  72. package/dist/core/{Frost-B1s1W_Qm.js → Frost-CK12HnL1.js} +4 -9
  73. package/dist/core/{GaborNoise-D3U1iz9E.js → GaborNoise-DKEIvvRJ.js} +3 -5
  74. package/dist/core/{Glass-O5o5OxlN.js → Glass-CzcOVD5Y.js} +3 -8
  75. package/dist/core/{GlassTiles-BxdT6Ee8.js → GlassTiles-gjhc563g.js} +1 -2
  76. package/dist/core/{Glitch-DQeLaNdU.js → Glitch-C_XAWltC.js} +1 -2
  77. package/dist/core/{Glow-DksG7wdu.js → Glow-CrYCanBI.js} +1 -3
  78. package/dist/core/{Godrays-D2Pzd9K9.js → Godrays-BBTMOVLP.js} +2 -3
  79. package/dist/core/{Goo-BL_ifIPI.js → Goo-Brhjk8aS.js} +3 -8
  80. package/dist/core/{GradientMap-B-5yUYjX.js → GradientMap-C5325QWw.js} +2 -4
  81. package/dist/core/{Grayscale-g7jQsxgi.js → Grayscale-dPjs-wvf.js} +1 -2
  82. package/dist/core/{Grid-DAglpJFP.js → Grid-UjEd3O76.js} +3 -4
  83. package/dist/core/{GridDistortion-CNlIESbs.js → GridDistortion-vVgYya1U.js} +1 -5
  84. package/dist/core/{Group-CeOfFv2K.js → Group-KVdmAi5g.js} +1 -1
  85. package/dist/core/{HTMLInCanvas-BgwCnbYn.js → HTMLInCanvas-CKr2u76R.js} +1 -2
  86. package/dist/core/{Halftone-DCiP4EDq.js → Halftone-pRV3TRUW.js} +4 -5
  87. package/dist/core/{Heart-CQhtzwFu.js → Heart-CX7MvvHZ.js} +1 -2
  88. package/dist/core/{Heatmap-e-lF_uZu.js → Heatmap-Dn6qyd2e.js} +3 -8
  89. package/dist/core/{HexGrid-BY_BPH8J.js → HexGrid-BIfYhkfV.js} +3 -4
  90. package/dist/core/{Hologram-BA_LJPm0.js → Hologram-ou27baPQ.js} +4 -8
  91. package/dist/core/{Holographic-CX8OG-Wa.js → Holographic-CiHdBSMg.js} +3 -7
  92. package/dist/core/{HueShift-BnwOshrg.js → HueShift-CG7pcXfg.js} +1 -3
  93. package/dist/core/{ImageTexture-Cd6vH2Z0.js → ImageTexture-BiZuU58C.js} +1 -2
  94. package/dist/core/{InkFlow-B7F9i3Kd.js → InkFlow-D9_L7opB.js} +9 -12
  95. package/dist/core/{Invert-6Q5kX8vd.js → Invert-CHEaiQZO.js} +1 -2
  96. package/dist/core/{IrisWipe-Cl5yYdEi.js → IrisWipe-x22vOQHm.js} +2 -3
  97. package/dist/core/Irradiance-7yq2K87_.js +389 -0
  98. package/dist/core/{IsometricCubes-BhK9MhCy.js → IsometricCubes-CkPGWr7M.js} +2 -3
  99. package/dist/core/{Kaleidoscope-D4X5N_qk.js → Kaleidoscope-CEC5m1Ww.js} +1 -2
  100. package/dist/core/{KeyFrames-Dv1vFfMa.js → KeyFrames-BMGEZsAZ.js} +2 -3
  101. package/dist/core/{LensDistortion-BqVp5WBS.js → LensDistortion-DKo8PiO5.js} +2 -3
  102. package/dist/core/{LensFlare-z0k68uJ1.js → LensFlare-DMS-NUtK.js} +2 -3
  103. package/dist/core/LightEdge-DxmnCRls.js +315 -0
  104. package/dist/core/{LightLeak-BgFq4bLG.js → LightLeak-yoEsZtYg.js} +2 -4
  105. package/dist/core/{Line--Ur3CJp1.js → Line-D17XDUjO.js} +2 -3
  106. package/dist/core/{LinearBlur-BkHF6lVm.js → LinearBlur-CiyjPTUH.js} +2 -3
  107. package/dist/core/{LinearGradient-DIdq_fiw.js → LinearGradient-DfjKG70q.js} +2 -4
  108. package/dist/core/{LinearWipe-DuCB9oV_.js → LinearWipe-D9CtBg6S.js} +2 -3
  109. package/dist/core/{LiquidMetal-B2Cz80Ka.js → LiquidMetal-8EG6DwV6.js} +3 -8
  110. package/dist/core/{Liquify-CvPn1ze-.js → Liquify-BySXF1OB.js} +1 -4
  111. package/dist/core/{MagneticFilings-BOgYrPhz.js → MagneticFilings-DNESH3Zs.js} +2 -5
  112. package/dist/core/{Marble-c2QGDXxB.js → Marble-C9WvdxrP.js} +2 -7
  113. package/dist/core/{MeshGradient-DMsza5tg.js → MeshGradient-d9--RXOU.js} +2 -10
  114. package/dist/core/{Mirror-Ck8qk1Km.js → Mirror-1V2FF2kD.js} +1 -2
  115. package/dist/core/{MultiPointGradient-DwO6snxn.js → MultiPointGradient-cRA9ytgL.js} +2 -3
  116. package/dist/core/{Nebula-3a9pYBDC.js → Nebula-BRV-q74y.js} +7 -90
  117. package/dist/core/{Neon-Cf95sJ7W.js → Neon-4PemK9Rj.js} +3 -6
  118. package/dist/core/{NoiseDissolve-DgvzEFOD.js → NoiseDissolve-B7LgD46G.js} +2 -3
  119. package/dist/core/{ObjectTracker-IopW8Jvf.js → ObjectTracker-CdzDxhpy.js} +3 -4
  120. package/dist/core/{Obsidian-BL_0ordp.js → Obsidian-2J1eX9kT.js} +9 -15
  121. package/dist/core/{PagePeel-BeAr_n0U.js → PagePeel-D-ziraOm.js} +1 -2
  122. package/dist/core/{Paper-BDEsyIPI.js → Paper-BxzCLyzB.js} +1 -2
  123. package/dist/core/{Parallelogram-Duj-0MLr.js → Parallelogram-D4OflTwn.js} +1 -2
  124. package/dist/core/{ParticleField-gk7JuNx4.js → ParticleField-tWNicEDO.js} +1 -4
  125. package/dist/core/{ParticleFlow-BzWOl7Hm.js → ParticleFlow-BiEYFyWR.js} +2 -6
  126. package/dist/core/{Particles-DYAtR6jZ.js → Particles-B7W4yWgo.js} +3 -7
  127. package/dist/core/{PerlinNoise-BHQ318g4.js → PerlinNoise-C-irUxp9.js} +3 -5
  128. package/dist/core/{Perspective-xBfd9BSE.js → Perspective-DlnAW-pe.js} +2 -3
  129. package/dist/core/{PixelSort-Bx9sUnGm.js → PixelSort-BBOTYuOE.js} +1 -4
  130. package/dist/core/{PixelThrow-0nJiGsmZ.js → PixelThrow-DCJb9Lxd.js} +2 -4
  131. package/dist/core/{Pixelate-CvCzoA0h.js → Pixelate-CZdwB--K.js} +1 -2
  132. package/dist/core/{Plasma-Be1yxNcP.js → Plasma-CTOQJeqy.js} +2 -4
  133. package/dist/core/{Plastic-Bom1oFFR.js → Plastic-DvyH9x-4.js} +3 -8
  134. package/dist/core/{PolarCoordinates-BGwTZ6NO.js → PolarCoordinates-XhdDAOD0.js} +1 -2
  135. package/dist/core/{Polygon-Byw5C7Qy.js → Polygon-CLohB-Ly.js} +2 -4
  136. package/dist/core/{Posterize-BHOstvyj.js → Posterize-BAQfnvmK.js} +1 -2
  137. package/dist/core/{Prism-pNsLhW8w.js → Prism-DJVCVAXX.js} +4 -8
  138. package/dist/core/{ProgressiveBlur-CR1IbvKQ.js → ProgressiveBlur-Dirva1on.js} +2 -3
  139. package/dist/core/{RadialGradient-BFOrMAK1.js → RadialGradient-DuSKR8Ds.js} +2 -4
  140. package/dist/core/{RadialWipe-BYnlbrNm.js → RadialWipe-n8tON7x2.js} +2 -3
  141. package/dist/core/{RandomBars-B7erRRHx.js → RandomBars-BYouiIgQ.js} +2 -3
  142. package/dist/core/{ReactionDiffusion-BnY40jHs.js → ReactionDiffusion-CHDd3y2q.js} +2 -5
  143. package/dist/core/{RectangularCoordinates-D9-3PQAz.js → RectangularCoordinates-CYFfCawa.js} +1 -2
  144. package/dist/core/{ReflectivePlane-BI-LIR2c.js → ReflectivePlane-DFTl5U9q.js} +2 -3
  145. package/dist/core/Repeater-CnbzXuAe.js +473 -0
  146. package/dist/core/{Ring-CvvtJYAf.js → Ring-CGkHVSVd.js} +1 -2
  147. package/dist/core/{RippleWipe-kAzZWsjR.js → RippleWipe-DLjPzY6u.js} +2 -3
  148. package/dist/core/{Ripples-BFLep1r1.js → Ripples-C2tITU62.js} +2 -3
  149. package/dist/core/{RoundedRect-DirNijIY.js → RoundedRect-sfNTUaCY.js} +1 -2
  150. package/dist/core/{Saturation-CfkRhJpe.js → Saturation-BRkifYWj.js} +1 -3
  151. package/dist/core/{Scratches-Dchfw1_5.js → Scratches-D87O5C2K.js} +2 -4
  152. package/dist/core/{Sharpness-DZzAnlsl.js → Sharpness-BGv613Zw.js} +1 -3
  153. package/dist/core/Shatter-DuyCFU1f.js +328 -0
  154. package/dist/core/{SimplexNoise-CmV42gYT.js → SimplexNoise-CQJvmqd-.js} +2 -4
  155. package/dist/core/{SineWave-TqnpIKO4.js → SineWave-BfOgSGMP.js} +2 -3
  156. package/dist/core/{SliceWipe-Dz8vj6bi.js → SliceWipe-CD_D99sl.js} +1 -2
  157. package/dist/core/{Smoke-B1TnZnG6.js → Smoke-BDQYKRP1.js} +2 -4
  158. package/dist/core/{SmokeFill-C8gSZ22X.js → SmokeFill-CPnzQtQv.js} +3 -8
  159. package/dist/core/{SmokeFlow-dd5uLztm.js → SmokeFlow-BkPMjZq8.js} +2 -4
  160. package/dist/core/{Solarize-CIQa9pKw.js → Solarize-DSiS32QS.js} +1 -3
  161. package/dist/core/{SolidColor-DuoQVKGk.js → SolidColor-DEKpgy1c.js} +2 -3
  162. package/dist/core/Sparkle-BZur6gPW.js +178 -0
  163. package/dist/core/{Spherize-FWwWEUyE.js → Spherize-D9Yg4n6O.js} +2 -3
  164. package/dist/core/{Spiral-DI1eG0E3.js → Spiral-BCacfEpT.js} +2 -3
  165. package/dist/core/{Star-DT-hnlIJ.js → Star-Dnw1ihk7.js} +1 -2
  166. package/dist/core/{Stone-oW35zD22.js → Stone-Cje-_vAg.js} +1 -3
  167. package/dist/core/{Strands-asB3fUr9.js → Strands-CFRxS1G_.js} +2 -4
  168. package/dist/core/{Stretch-Cm_B4WGY.js → Stretch-DXVhfIqO.js} +1 -2
  169. package/dist/core/{Stripes-BnJiniJY.js → Stripes-CCADWwyq.js} +2 -3
  170. package/dist/core/{StudioBackground-DwSO5KNV.js → StudioBackground-BlzYNAsu.js} +2 -6
  171. package/dist/core/{SunBurst-BL-BryZO.js → SunBurst-CmWbI18r.js} +2 -3
  172. package/dist/core/{Surface3D-DSvh7Zof.js → Surface3D-Dmh98-0V.js} +2 -6
  173. package/dist/core/{Swirl-BVPy039a.js → Swirl-CzI1qSVc.js} +2 -4
  174. package/dist/core/{Teardrop-CR1UqYaF.js → Teardrop-D24uulL0.js} +1 -2
  175. package/dist/core/{Text-fP5temat.js → Text-CrZKvBw6.js} +2 -6
  176. package/dist/core/{ThinFilm-CTQeVw7E.js → ThinFilm-D7R2dt1O.js} +11 -14
  177. package/dist/core/{TiltShift-BvYpYELk.js → TiltShift-AMMDZBvf.js} +2 -3
  178. package/dist/core/{TimeTrail-DqdYuHn7.js → TimeTrail-BCYDP2ep.js} +4 -8
  179. package/dist/core/{Tint-BXJMHYvg.js → Tint-DHb5wBN5.js} +2 -3
  180. package/dist/core/{Trapezoid--AgyKOWQ.js → Trapezoid-CL5Fxvq7.js} +1 -2
  181. package/dist/core/{TriangularGrid-CmDApxz9.js → TriangularGrid-Bp-SJS-H.js} +2 -3
  182. package/dist/core/{Tritone-DCd_IRp7.js → Tritone-C0nx7OdC.js} +2 -3
  183. package/dist/core/{Truchet-g1_jcoZ4.js → Truchet-DCetyDaq.js} +2 -3
  184. package/dist/core/{Twirl-JY-PXDS2.js → Twirl-D_mv9KEi.js} +1 -2
  185. package/dist/core/{VHS-ZWR6D4Da.js → VHS-Cp9aDjti.js} +2 -3
  186. package/dist/core/{VenetianBlinds-B7laTyPO.js → VenetianBlinds-DUyvaT5w.js} +2 -3
  187. package/dist/core/{Vesica-BTNW2p5u.js → Vesica-BpzrTPTA.js} +1 -2
  188. package/dist/core/{Vibrance-DmhtRT2D.js → Vibrance-DW3J-pvW.js} +1 -3
  189. package/dist/core/{VideoTexture-DK3EaAHY.js → VideoTexture-zoKsSrex.js} +1 -2
  190. package/dist/core/{Vignette-hyFfUS20.js → Vignette-KKbP3qdZ.js} +2 -5
  191. package/dist/core/{Voronoi-DhexPwNM.js → Voronoi-Bp2-U6lm.js} +2 -5
  192. package/dist/core/Voxels-B3e3LHH5.js +469 -0
  193. package/dist/core/{Water-BsBnXYYB.js → Water-CoYwvqKx.js} +7 -12
  194. package/dist/core/{Watercolor-C1HipGGO.js → Watercolor-DUNjSIN1.js} +2 -4
  195. package/dist/core/{WaveDistortion-VXyHFcJ3.js → WaveDistortion-Dp8ws0z1.js} +1 -2
  196. package/dist/core/{Waveform-CSP_4nZF.js → Waveform-DDBLB6zu.js} +2 -9
  197. package/dist/core/{WaveletNoise-CQqAufyv.js → WaveletNoise-CpBkzfRT.js} +2 -4
  198. package/dist/core/{Weave-DwX8T4_Q.js → Weave-cWkvSEAy.js} +2 -3
  199. package/dist/core/{WebcamTexture-B4SLwIP1.js → WebcamTexture-D484SXSE.js} +1 -2
  200. package/dist/core/{Wool-qg-z_TFC.js → Wool-C9L7O9fD.js} +1 -3
  201. package/dist/core/{WorleyNoise-CjVw20Fl.js → WorleyNoise-B5j5lDQZ.js} +2 -3
  202. package/dist/core/{ZoomBlur-Lm_pVpMf.js → ZoomBlur-bPC1dBu2.js} +2 -3
  203. package/dist/core/customShaders.d.ts +71 -0
  204. package/dist/core/customShaders.d.ts.map +1 -0
  205. package/dist/core/docs-manifest.json +29177 -0
  206. package/dist/core/gpu/composer.d.ts +2 -0
  207. package/dist/core/gpu/composer.d.ts.map +1 -1
  208. package/dist/core/gpu/contract.d.ts +17 -2
  209. package/dist/core/gpu/contract.d.ts.map +1 -1
  210. package/dist/core/gpu/frame.d.ts +5 -2
  211. package/dist/core/gpu/frame.d.ts.map +1 -1
  212. package/dist/core/gpu/index.d.ts.map +1 -1
  213. package/dist/core/gpu/kit/aa.d.ts +1 -1
  214. package/dist/core/gpu/kit/agents.d.ts +1 -1
  215. package/dist/core/gpu/kit/blur.d.ts +4 -4
  216. package/dist/core/gpu/kit/cells.d.ts +3 -3
  217. package/dist/core/gpu/kit/cellular.d.ts +1 -1
  218. package/dist/core/gpu/kit/colorOps.d.ts +6 -6
  219. package/dist/core/gpu/kit/effects/glass.d.ts +2 -2
  220. package/dist/core/gpu/kit/effects/thinFilm.d.ts +4 -4
  221. package/dist/core/gpu/kit/fields.d.ts.map +1 -1
  222. package/dist/core/gpu/kit/host/pointer.d.ts +1 -1
  223. package/dist/core/gpu/kit/lensParts.d.ts +3 -3
  224. package/dist/core/gpu/kit/lightfields.d.ts +3 -3
  225. package/dist/core/gpu/kit/materialParts.d.ts +1 -1
  226. package/dist/core/gpu/kit/materialParts.d.ts.map +1 -1
  227. package/dist/core/gpu/kit/media.d.ts +1 -1
  228. package/dist/core/gpu/kit/media.d.ts.map +1 -1
  229. package/dist/core/gpu/kit/motionBlur.d.ts +2 -2
  230. package/dist/core/gpu/kit/noiseColor.d.ts +5 -5
  231. package/dist/core/gpu/kit/noiseColor.d.ts.map +1 -1
  232. package/dist/core/gpu/kit/noisePaints.d.ts +1 -1
  233. package/dist/core/gpu/kit/sdf.d.ts +2 -2
  234. package/dist/core/gpu/kit/stylizePaints.d.ts +1 -1
  235. package/dist/core/gpu/kit/stylizePaints.d.ts.map +1 -1
  236. package/dist/core/gpu/kit/tone.d.ts +1 -1
  237. package/dist/core/gpu/kit/waves.d.ts +6 -0
  238. package/dist/core/gpu/kit/waves.d.ts.map +1 -1
  239. package/dist/core/gpu/passManager.d.ts +1 -1
  240. package/dist/core/gpu/passManager.d.ts.map +1 -1
  241. package/dist/core/gpu/scaffolds/fluids.d.ts +7 -7
  242. package/dist/core/gpu/scaffolds/fluids.d.ts.map +1 -1
  243. package/dist/core/gpu/scaffolds/gridKernels.d.ts +8 -8
  244. package/dist/core/gpu/scaffolds/gridKernels.d.ts.map +1 -1
  245. package/dist/core/gpu/scaffolds/pointwiseFilter.d.ts +5 -5
  246. package/dist/core/gpu/scaffolds/pointwiseFilter.d.ts.map +1 -1
  247. package/dist/core/gpu/scaffolds/radiance.d.ts +5 -5
  248. package/dist/core/gpu/scaffolds/radiance.d.ts.map +1 -1
  249. package/dist/core/gpu/scaffolds/rttFilter.d.ts +2 -2
  250. package/dist/core/gpu/scaffolds/rttFilter.d.ts.map +1 -1
  251. package/dist/core/gpu/scaffolds/sdfShape.d.ts +2 -2
  252. package/dist/core/gpu/scaffolds/sdfShape.d.ts.map +1 -1
  253. package/dist/core/gpu/scaffolds/uvRemapShader.d.ts +4 -4
  254. package/dist/core/gpu/support.d.ts +12 -0
  255. package/dist/core/gpu/support.d.ts.map +1 -1
  256. package/dist/core/index.d.ts +3 -2
  257. package/dist/core/index.d.ts.map +1 -1
  258. package/dist/core/index.js +238 -255
  259. package/dist/core/llms.txt +1558 -0
  260. package/dist/core/{noiseColor-DuWjYRmO.js → noiseColor-D_bPhJ4m.js} +2 -2
  261. package/dist/core/presetRenderer.d.ts +4 -0
  262. package/dist/core/presetRenderer.d.ts.map +1 -1
  263. package/dist/core/registry.js +204 -248
  264. package/dist/core/shaderRegistry-BaozBFyh.js +445 -0
  265. package/dist/core/shaderRegistry.d.ts.map +1 -1
  266. package/dist/core/shaders/AngularBlur/index.d.ts +1 -1
  267. package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
  268. package/dist/core/shaders/AngularBlur/index.js +4 -10
  269. package/dist/core/shaders/Arc/index.js +4 -6
  270. package/dist/core/shaders/Ascii/index.d.ts +1 -1
  271. package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
  272. package/dist/core/shaders/Ascii/index.js +4 -11
  273. package/dist/core/shaders/Aurora/index.js +4 -21
  274. package/dist/core/shaders/BarShift/index.js +4 -8
  275. package/dist/core/shaders/BarnDoors/index.js +4 -7
  276. package/dist/core/shaders/Beam/index.js +4 -11
  277. package/dist/core/shaders/Bend/index.js +4 -8
  278. package/dist/core/shaders/Blob/index.js +4 -18
  279. package/dist/core/shaders/BlockDissolve/index.js +4 -7
  280. package/dist/core/shaders/BlockNoise/index.d.ts +1 -1
  281. package/dist/core/shaders/BlockNoise/index.d.ts.map +1 -1
  282. package/dist/core/shaders/BlockNoise/index.js +5 -14
  283. package/dist/core/shaders/BlueNoise/index.d.ts +1 -1
  284. package/dist/core/shaders/BlueNoise/index.d.ts.map +1 -1
  285. package/dist/core/shaders/BlueNoise/index.js +5 -14
  286. package/dist/core/shaders/Blur/index.d.ts +1 -1
  287. package/dist/core/shaders/Blur/index.d.ts.map +1 -1
  288. package/dist/core/shaders/Blur/index.js +4 -10
  289. package/dist/core/shaders/Boids/index.js +4 -9
  290. package/dist/core/shaders/BokehBlur/index.d.ts +1 -1
  291. package/dist/core/shaders/BokehBlur/index.js +4 -10
  292. package/dist/core/shaders/BrickPattern/index.d.ts +1 -1
  293. package/dist/core/shaders/BrickPattern/index.d.ts.map +1 -1
  294. package/dist/core/shaders/BrickPattern/index.js +4 -13
  295. package/dist/core/shaders/BrightnessContrast/index.js +4 -7
  296. package/dist/core/shaders/BrushedMetal/index.js +4 -11
  297. package/dist/core/shaders/Bulge/index.js +4 -8
  298. package/dist/core/shaders/CRTScreen/index.d.ts +2 -2
  299. package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
  300. package/dist/core/shaders/CRTScreen/index.js +4 -10
  301. package/dist/core/shaders/CarbonFiber/index.d.ts +1 -1
  302. package/dist/core/shaders/CarbonFiber/index.js +4 -11
  303. package/dist/core/shaders/Chalkboard/index.d.ts +1 -1
  304. package/dist/core/shaders/Chalkboard/index.d.ts.map +1 -1
  305. package/dist/core/shaders/Chalkboard/index.js +4 -9
  306. package/dist/core/shaders/ChannelBlur/index.d.ts +1 -1
  307. package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
  308. package/dist/core/shaders/ChannelBlur/index.js +4 -10
  309. package/dist/core/shaders/CheckerWipe/index.js +4 -7
  310. package/dist/core/shaders/Checkerboard/index.d.ts +1 -1
  311. package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
  312. package/dist/core/shaders/Checkerboard/index.js +4 -13
  313. package/dist/core/shaders/Chevron/index.d.ts +1 -1
  314. package/dist/core/shaders/Chevron/index.d.ts.map +1 -1
  315. package/dist/core/shaders/Chevron/index.js +4 -13
  316. package/dist/core/shaders/ChromaFlow/index.js +4 -8
  317. package/dist/core/shaders/ChromaticAberration/index.js +4 -11
  318. package/dist/core/shaders/Chrome/index.d.ts +1 -1
  319. package/dist/core/shaders/Chrome/index.js +4 -10
  320. package/dist/core/shaders/Circle/index.js +4 -6
  321. package/dist/core/shaders/ColorWheel/index.js +4 -11
  322. package/dist/core/shaders/CompressionArtifacts/index.d.ts +2 -2
  323. package/dist/core/shaders/CompressionArtifacts/index.d.ts.map +1 -1
  324. package/dist/core/shaders/CompressionArtifacts/index.js +4 -7
  325. package/dist/core/shaders/ConcentricSpin/index.js +4 -8
  326. package/dist/core/shaders/ConicGradient/index.js +4 -11
  327. package/dist/core/shaders/ContourLines/index.js +4 -6
  328. package/dist/core/shaders/CornerPin/index.js +4 -8
  329. package/dist/core/shaders/Crescent/index.js +4 -5
  330. package/dist/core/shaders/Cross/index.js +4 -5
  331. package/dist/core/shaders/Crystal/index.js +4 -11
  332. package/dist/core/shaders/CurlNoise/index.d.ts +1 -1
  333. package/dist/core/shaders/CurlNoise/index.d.ts.map +1 -1
  334. package/dist/core/shaders/CurlNoise/index.js +5 -14
  335. package/dist/core/shaders/CursorRipples/index.js +4 -7
  336. package/dist/core/shaders/CursorTrail/index.js +4 -7
  337. package/dist/core/shaders/DataMosh/index.js +4 -7
  338. package/dist/core/shaders/DiamondGradient/index.js +4 -11
  339. package/dist/core/shaders/DiamondWipe/index.js +4 -7
  340. package/dist/core/shaders/DiffuseBlur/index.d.ts +1 -1
  341. package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
  342. package/dist/core/shaders/DiffuseBlur/index.js +4 -10
  343. package/dist/core/shaders/DisplacementMap/index.js +4 -8
  344. package/dist/core/shaders/Dither/index.d.ts +1 -1
  345. package/dist/core/shaders/Dither/index.d.ts.map +1 -1
  346. package/dist/core/shaders/Dither/index.js +4 -13
  347. package/dist/core/shaders/DotGrid/index.d.ts +2 -2
  348. package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
  349. package/dist/core/shaders/DotGrid/index.js +4 -13
  350. package/dist/core/shaders/DropShadow/index.d.ts +1 -1
  351. package/dist/core/shaders/DropShadow/index.d.ts.map +1 -1
  352. package/dist/core/shaders/DropShadow/index.js +4 -10
  353. package/dist/core/shaders/Duotone/index.js +4 -6
  354. package/dist/core/shaders/Ellipse/index.js +4 -5
  355. package/dist/core/shaders/Emboss/index.js +4 -9
  356. package/dist/core/shaders/Engraving/index.js +4 -9
  357. package/dist/core/shaders/ErosionNoise/index.d.ts +1 -1
  358. package/dist/core/shaders/ErosionNoise/index.d.ts.map +1 -1
  359. package/dist/core/shaders/ErosionNoise/index.js +5 -14
  360. package/dist/core/shaders/Exposure/index.js +4 -7
  361. package/dist/core/shaders/FallingLines/index.d.ts +1 -1
  362. package/dist/core/shaders/FallingLines/index.d.ts.map +1 -1
  363. package/dist/core/shaders/FallingLines/index.js +4 -13
  364. package/dist/core/shaders/FilmGrain/index.js +4 -7
  365. package/dist/core/shaders/FilmStock/index.js +4 -13
  366. package/dist/core/shaders/Flip/index.js +4 -8
  367. package/dist/core/shaders/FloatingParticles/index.d.ts +2 -2
  368. package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
  369. package/dist/core/shaders/FloatingParticles/index.js +4 -9
  370. package/dist/core/shaders/FlowField/index.js +4 -8
  371. package/dist/core/shaders/Flower/index.js +4 -5
  372. package/dist/core/shaders/FlowingGradient/index.js +4 -15
  373. package/dist/core/shaders/FlutedGlass/index.js +4 -11
  374. package/dist/core/shaders/Fog/index.js +4 -7
  375. package/dist/core/shaders/Form3D/index.js +4 -7
  376. package/dist/core/shaders/FractalNoise/index.d.ts +1 -1
  377. package/dist/core/shaders/FractalNoise/index.d.ts.map +1 -1
  378. package/dist/core/shaders/FractalNoise/index.js +4 -13
  379. package/dist/core/shaders/Frost/index.d.ts +1 -1
  380. package/dist/core/shaders/Frost/index.js +4 -11
  381. package/dist/core/shaders/GaborNoise/index.d.ts +2 -2
  382. package/dist/core/shaders/GaborNoise/index.d.ts.map +1 -1
  383. package/dist/core/shaders/GaborNoise/index.js +5 -14
  384. package/dist/core/shaders/Glass/index.js +4 -11
  385. package/dist/core/shaders/GlassTiles/index.d.ts +1 -1
  386. package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
  387. package/dist/core/shaders/GlassTiles/index.js +4 -8
  388. package/dist/core/shaders/Glitch/index.d.ts +1 -1
  389. package/dist/core/shaders/Glitch/index.d.ts.map +1 -1
  390. package/dist/core/shaders/Glitch/index.js +4 -10
  391. package/dist/core/shaders/Glow/index.d.ts +1 -1
  392. package/dist/core/shaders/Glow/index.d.ts.map +1 -1
  393. package/dist/core/shaders/Glow/index.js +4 -11
  394. package/dist/core/shaders/Godrays/index.js +4 -12
  395. package/dist/core/shaders/Goo/index.js +4 -11
  396. package/dist/core/shaders/GradientMap/index.js +4 -7
  397. package/dist/core/shaders/Grayscale/index.js +4 -6
  398. package/dist/core/shaders/Grid/index.d.ts +2 -2
  399. package/dist/core/shaders/Grid/index.d.ts.map +1 -1
  400. package/dist/core/shaders/Grid/index.js +4 -13
  401. package/dist/core/shaders/GridDistortion/index.js +4 -11
  402. package/dist/core/shaders/Group/index.js +4 -6
  403. package/dist/core/shaders/HTMLInCanvas/index.js +4 -7
  404. package/dist/core/shaders/Halftone/index.d.ts +3 -3
  405. package/dist/core/shaders/Halftone/index.d.ts.map +1 -1
  406. package/dist/core/shaders/Halftone/index.js +4 -13
  407. package/dist/core/shaders/Heart/index.js +4 -5
  408. package/dist/core/shaders/Heatmap/index.js +4 -11
  409. package/dist/core/shaders/HexGrid/index.d.ts +2 -2
  410. package/dist/core/shaders/HexGrid/index.d.ts.map +1 -1
  411. package/dist/core/shaders/HexGrid/index.js +4 -13
  412. package/dist/core/shaders/Hologram/index.d.ts +1 -1
  413. package/dist/core/shaders/Hologram/index.js +4 -10
  414. package/dist/core/shaders/Holographic/index.js +4 -10
  415. package/dist/core/shaders/HueShift/index.js +4 -7
  416. package/dist/core/shaders/ImageTexture/index.js +4 -6
  417. package/dist/core/shaders/InkFlow/index.d.ts +7 -7
  418. package/dist/core/shaders/InkFlow/index.js +4 -8
  419. package/dist/core/shaders/Invert/index.js +4 -6
  420. package/dist/core/shaders/IrisWipe/index.js +4 -7
  421. package/dist/core/shaders/Irradiance/index.d.ts +1 -1
  422. package/dist/core/shaders/Irradiance/index.d.ts.map +1 -1
  423. package/dist/core/shaders/Irradiance/index.js +4 -13
  424. package/dist/core/shaders/IsometricCubes/index.d.ts +1 -1
  425. package/dist/core/shaders/IsometricCubes/index.d.ts.map +1 -1
  426. package/dist/core/shaders/IsometricCubes/index.js +4 -13
  427. package/dist/core/shaders/Kaleidoscope/index.js +4 -8
  428. package/dist/core/shaders/KeyFrames/index.js +4 -10
  429. package/dist/core/shaders/LensDistortion/index.js +4 -6
  430. package/dist/core/shaders/LensFlare/index.d.ts +1 -1
  431. package/dist/core/shaders/LensFlare/index.d.ts.map +1 -1
  432. package/dist/core/shaders/LensFlare/index.js +4 -12
  433. package/dist/core/shaders/LightEdge/index.js +4 -10
  434. package/dist/core/shaders/LightLeak/index.js +4 -12
  435. package/dist/core/shaders/Line/index.js +4 -10
  436. package/dist/core/shaders/LinearBlur/index.d.ts +1 -1
  437. package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
  438. package/dist/core/shaders/LinearBlur/index.js +4 -10
  439. package/dist/core/shaders/LinearGradient/index.js +4 -11
  440. package/dist/core/shaders/LinearWipe/index.js +4 -7
  441. package/dist/core/shaders/LiquidMetal/index.js +4 -11
  442. package/dist/core/shaders/Liquify/index.js +4 -10
  443. package/dist/core/shaders/MagneticFilings/index.js +4 -9
  444. package/dist/core/shaders/Marble/index.d.ts +1 -1
  445. package/dist/core/shaders/Marble/index.d.ts.map +1 -1
  446. package/dist/core/shaders/Marble/index.js +4 -15
  447. package/dist/core/shaders/MeshGradient/index.js +4 -17
  448. package/dist/core/shaders/Mirror/index.js +4 -8
  449. package/dist/core/shaders/MultiPointGradient/index.js +4 -11
  450. package/dist/core/shaders/Nebula/index.d.ts +3 -3
  451. package/dist/core/shaders/Nebula/index.js +4 -13
  452. package/dist/core/shaders/Neon/index.js +4 -9
  453. package/dist/core/shaders/NoiseDissolve/index.js +4 -7
  454. package/dist/core/shaders/ObjectTracker/index.d.ts +1 -1
  455. package/dist/core/shaders/ObjectTracker/index.js +4 -10
  456. package/dist/core/shaders/Obsidian/index.d.ts +5 -5
  457. package/dist/core/shaders/Obsidian/index.js +4 -15
  458. package/dist/core/shaders/PagePeel/index.js +4 -10
  459. package/dist/core/shaders/Paper/index.d.ts +1 -1
  460. package/dist/core/shaders/Paper/index.d.ts.map +1 -1
  461. package/dist/core/shaders/Paper/index.js +4 -8
  462. package/dist/core/shaders/Parallelogram/index.js +4 -5
  463. package/dist/core/shaders/ParticleField/index.js +4 -9
  464. package/dist/core/shaders/ParticleFlow/index.js +4 -10
  465. package/dist/core/shaders/Particles/index.js +4 -9
  466. package/dist/core/shaders/PerlinNoise/index.d.ts +2 -2
  467. package/dist/core/shaders/PerlinNoise/index.d.ts.map +1 -1
  468. package/dist/core/shaders/PerlinNoise/index.js +5 -14
  469. package/dist/core/shaders/Perspective/index.js +4 -8
  470. package/dist/core/shaders/PixelSort/index.js +4 -8
  471. package/dist/core/shaders/PixelThrow/index.js +4 -8
  472. package/dist/core/shaders/Pixelate/index.d.ts +1 -1
  473. package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
  474. package/dist/core/shaders/Pixelate/index.js +4 -10
  475. package/dist/core/shaders/Plasma/index.js +4 -11
  476. package/dist/core/shaders/Plastic/index.js +4 -11
  477. package/dist/core/shaders/PolarCoordinates/index.js +4 -8
  478. package/dist/core/shaders/Polygon/index.js +4 -6
  479. package/dist/core/shaders/Posterize/index.js +4 -6
  480. package/dist/core/shaders/Prism/index.d.ts +2 -2
  481. package/dist/core/shaders/Prism/index.js +4 -12
  482. package/dist/core/shaders/ProgressiveBlur/index.d.ts +1 -1
  483. package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
  484. package/dist/core/shaders/ProgressiveBlur/index.js +4 -10
  485. package/dist/core/shaders/RadialGradient/index.js +4 -11
  486. package/dist/core/shaders/RadialWipe/index.js +4 -7
  487. package/dist/core/shaders/RandomBars/index.js +4 -7
  488. package/dist/core/shaders/ReactionDiffusion/index.js +4 -8
  489. package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
  490. package/dist/core/shaders/ReflectivePlane/index.js +4 -10
  491. package/dist/core/shaders/Repeater/index.js +4 -5
  492. package/dist/core/shaders/Ring/index.js +4 -5
  493. package/dist/core/shaders/RippleWipe/index.js +4 -7
  494. package/dist/core/shaders/Ripples/index.d.ts +1 -1
  495. package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
  496. package/dist/core/shaders/Ripples/index.js +4 -13
  497. package/dist/core/shaders/RoundedRect/index.js +4 -5
  498. package/dist/core/shaders/Saturation/index.js +4 -7
  499. package/dist/core/shaders/Scratches/index.d.ts +1 -1
  500. package/dist/core/shaders/Scratches/index.d.ts.map +1 -1
  501. package/dist/core/shaders/Scratches/index.js +5 -14
  502. package/dist/core/shaders/Sharpness/index.d.ts +1 -1
  503. package/dist/core/shaders/Sharpness/index.d.ts.map +1 -1
  504. package/dist/core/shaders/Sharpness/index.js +4 -11
  505. package/dist/core/shaders/Shatter/index.js +4 -6
  506. package/dist/core/shaders/SimplexNoise/index.d.ts +1 -1
  507. package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
  508. package/dist/core/shaders/SimplexNoise/index.js +5 -14
  509. package/dist/core/shaders/SineWave/index.js +4 -10
  510. package/dist/core/shaders/SliceWipe/index.js +4 -8
  511. package/dist/core/shaders/Smoke/index.js +4 -7
  512. package/dist/core/shaders/SmokeFill/index.js +4 -10
  513. package/dist/core/shaders/SmokeFlow/index.js +4 -7
  514. package/dist/core/shaders/Solarize/index.js +4 -7
  515. package/dist/core/shaders/SolidColor/index.js +4 -11
  516. package/dist/core/shaders/Sparkle/index.d.ts +57 -0
  517. package/dist/core/shaders/Sparkle/index.d.ts.map +1 -0
  518. package/dist/core/shaders/Sparkle/index.js +5 -0
  519. package/dist/core/shaders/Spherize/index.d.ts +1 -1
  520. package/dist/core/shaders/Spherize/index.d.ts.map +1 -1
  521. package/dist/core/shaders/Spherize/index.js +4 -10
  522. package/dist/core/shaders/Spiral/index.js +4 -11
  523. package/dist/core/shaders/Star/index.js +4 -5
  524. package/dist/core/shaders/Stone/index.d.ts +1 -1
  525. package/dist/core/shaders/Stone/index.d.ts.map +1 -1
  526. package/dist/core/shaders/Stone/index.js +4 -14
  527. package/dist/core/shaders/Strands/index.d.ts +1 -1
  528. package/dist/core/shaders/Strands/index.d.ts.map +1 -1
  529. package/dist/core/shaders/Strands/index.js +4 -13
  530. package/dist/core/shaders/Stretch/index.js +4 -8
  531. package/dist/core/shaders/Stripes/index.d.ts +1 -1
  532. package/dist/core/shaders/Stripes/index.d.ts.map +1 -1
  533. package/dist/core/shaders/Stripes/index.js +4 -13
  534. package/dist/core/shaders/StudioBackground/index.js +4 -14
  535. package/dist/core/shaders/SunBurst/index.js +4 -12
  536. package/dist/core/shaders/Surface3D/index.js +4 -8
  537. package/dist/core/shaders/Swirl/index.js +4 -11
  538. package/dist/core/shaders/Teardrop/index.js +4 -5
  539. package/dist/core/shaders/Text/index.js +4 -12
  540. package/dist/core/shaders/ThinFilm/index.d.ts +8 -8
  541. package/dist/core/shaders/ThinFilm/index.js +4 -9
  542. package/dist/core/shaders/TiltShift/index.d.ts +1 -1
  543. package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
  544. package/dist/core/shaders/TiltShift/index.js +4 -10
  545. package/dist/core/shaders/TimeTrail/index.d.ts +2 -2
  546. package/dist/core/shaders/TimeTrail/index.js +4 -8
  547. package/dist/core/shaders/Tint/index.js +4 -6
  548. package/dist/core/shaders/Trapezoid/index.js +4 -5
  549. package/dist/core/shaders/TriangularGrid/index.d.ts +1 -1
  550. package/dist/core/shaders/TriangularGrid/index.d.ts.map +1 -1
  551. package/dist/core/shaders/TriangularGrid/index.js +4 -13
  552. package/dist/core/shaders/Tritone/index.js +4 -6
  553. package/dist/core/shaders/Truchet/index.d.ts +1 -1
  554. package/dist/core/shaders/Truchet/index.d.ts.map +1 -1
  555. package/dist/core/shaders/Truchet/index.js +4 -13
  556. package/dist/core/shaders/Twirl/index.js +4 -8
  557. package/dist/core/shaders/VHS/index.d.ts +2 -2
  558. package/dist/core/shaders/VHS/index.d.ts.map +1 -1
  559. package/dist/core/shaders/VHS/index.js +4 -10
  560. package/dist/core/shaders/VenetianBlinds/index.js +4 -7
  561. package/dist/core/shaders/Vesica/index.js +4 -5
  562. package/dist/core/shaders/Vibrance/index.js +4 -7
  563. package/dist/core/shaders/VideoTexture/index.js +4 -6
  564. package/dist/core/shaders/Vignette/index.js +4 -8
  565. package/dist/core/shaders/Voronoi/index.d.ts +1 -1
  566. package/dist/core/shaders/Voronoi/index.d.ts.map +1 -1
  567. package/dist/core/shaders/Voronoi/index.js +4 -13
  568. package/dist/core/shaders/Voxels/index.d.ts +5 -5
  569. package/dist/core/shaders/Voxels/index.js +4 -14
  570. package/dist/core/shaders/Water/index.d.ts +3 -3
  571. package/dist/core/shaders/Water/index.js +4 -11
  572. package/dist/core/shaders/Watercolor/index.d.ts +1 -1
  573. package/dist/core/shaders/Watercolor/index.d.ts.map +1 -1
  574. package/dist/core/shaders/Watercolor/index.js +4 -10
  575. package/dist/core/shaders/WaveDistortion/index.js +4 -8
  576. package/dist/core/shaders/Waveform/index.js +4 -16
  577. package/dist/core/shaders/WaveletNoise/index.d.ts +1 -1
  578. package/dist/core/shaders/WaveletNoise/index.d.ts.map +1 -1
  579. package/dist/core/shaders/WaveletNoise/index.js +5 -14
  580. package/dist/core/shaders/Weave/index.d.ts +1 -1
  581. package/dist/core/shaders/Weave/index.d.ts.map +1 -1
  582. package/dist/core/shaders/Weave/index.js +4 -13
  583. package/dist/core/shaders/WebcamTexture/index.js +4 -6
  584. package/dist/core/shaders/Wool/index.d.ts +1 -1
  585. package/dist/core/shaders/Wool/index.d.ts.map +1 -1
  586. package/dist/core/shaders/Wool/index.js +4 -14
  587. package/dist/core/shaders/WorleyNoise/index.d.ts +1 -1
  588. package/dist/core/shaders/WorleyNoise/index.d.ts.map +1 -1
  589. package/dist/core/shaders/WorleyNoise/index.js +4 -13
  590. package/dist/core/shaders/ZoomBlur/index.d.ts +1 -1
  591. package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
  592. package/dist/core/shaders/ZoomBlur/index.js +4 -10
  593. package/dist/core/std/effects/blurs.d.ts +656 -138
  594. package/dist/core/std/effects/blurs.d.ts.map +1 -1
  595. package/dist/core/std/effects/color.d.ts +209 -32
  596. package/dist/core/std/effects/color.d.ts.map +1 -1
  597. package/dist/core/std/effects/edgeGlow.d.ts +86 -17
  598. package/dist/core/std/effects/edgeGlow.d.ts.map +1 -1
  599. package/dist/core/std/effects/fracture.d.ts +72 -8
  600. package/dist/core/std/effects/fracture.d.ts.map +1 -1
  601. package/dist/core/std/effects/index.d.ts +15 -0
  602. package/dist/core/std/effects/index.d.ts.map +1 -0
  603. package/dist/core/std/effects/instances.d.ts +87 -8
  604. package/dist/core/std/effects/instances.d.ts.map +1 -1
  605. package/dist/core/std/effects/lens.d.ts +48 -12
  606. package/dist/core/std/effects/lens.d.ts.map +1 -1
  607. package/dist/core/std/effects/overlay.d.ts +63 -22
  608. package/dist/core/std/effects/overlay.d.ts.map +1 -1
  609. package/dist/core/std/effects/pointerFields.d.ts +45 -20
  610. package/dist/core/std/effects/pointerFields.d.ts.map +1 -1
  611. package/dist/core/std/effects/reveal.d.ts +118 -40
  612. package/dist/core/std/effects/reveal.d.ts.map +1 -1
  613. package/dist/core/std/effects/stylize.d.ts +139 -70
  614. package/dist/core/std/effects/stylize.d.ts.map +1 -1
  615. package/dist/core/std/filter.d.ts +72 -12
  616. package/dist/core/std/filter.d.ts.map +1 -1
  617. package/dist/core/std/frames.d.ts +91 -24
  618. package/dist/core/std/frames.d.ts.map +1 -1
  619. package/dist/core/std/index.d.ts +46 -8
  620. package/dist/core/std/index.d.ts.map +1 -1
  621. package/dist/core/std/index.js +4 -0
  622. package/dist/core/std/invoke.d.ts +107 -12
  623. package/dist/core/std/invoke.d.ts.map +1 -1
  624. package/dist/core/std/lists.d.ts +40 -10
  625. package/dist/core/std/lists.d.ts.map +1 -1
  626. package/dist/core/std/lower.d.ts +73 -1
  627. package/dist/core/std/lower.d.ts.map +1 -1
  628. package/dist/core/std/mask.d.ts +60 -17
  629. package/dist/core/std/mask.d.ts.map +1 -1
  630. package/dist/core/std/math.d.ts +484 -9
  631. package/dist/core/std/math.d.ts.map +1 -1
  632. package/dist/core/std/motion.d.ts +130 -10
  633. package/dist/core/std/motion.d.ts.map +1 -1
  634. package/dist/core/std/paint/compose.d.ts +57 -16
  635. package/dist/core/std/paint/compose.d.ts.map +1 -1
  636. package/dist/core/std/paint/fields.d.ts +378 -95
  637. package/dist/core/std/paint/fields.d.ts.map +1 -1
  638. package/dist/core/std/paint/figures.d.ts +32 -17
  639. package/dist/core/std/paint/figures.d.ts.map +1 -1
  640. package/dist/core/std/paint/gradients.d.ts +58 -25
  641. package/dist/core/std/paint/gradients.d.ts.map +1 -1
  642. package/dist/core/std/paint/light.d.ts +501 -77
  643. package/dist/core/std/paint/light.d.ts.map +1 -1
  644. package/dist/core/std/paint/materials.d.ts +678 -151
  645. package/dist/core/std/paint/materials.d.ts.map +1 -1
  646. package/dist/core/std/paint/media.d.ts +47 -32
  647. package/dist/core/std/paint/media.d.ts.map +1 -1
  648. package/dist/core/std/paint/noise.d.ts +436 -87
  649. package/dist/core/std/paint/noise.d.ts.map +1 -1
  650. package/dist/core/std/paint/patterns.d.ts +474 -92
  651. package/dist/core/std/paint/patterns.d.ts.map +1 -1
  652. package/dist/core/std/paint/radiance.d.ts +75 -29
  653. package/dist/core/std/paint/radiance.d.ts.map +1 -1
  654. package/dist/core/std/paint/volume.d.ts +68 -27
  655. package/dist/core/std/paint/volume.d.ts.map +1 -1
  656. package/dist/core/std/paint/voxels.d.ts +46 -26
  657. package/dist/core/std/paint/voxels.d.ts.map +1 -1
  658. package/dist/core/std/shape.d.ts +195 -1
  659. package/dist/core/std/shape.d.ts.map +1 -1
  660. package/dist/core/std/signal.d.ts +55 -15
  661. package/dist/core/std/signal.d.ts.map +1 -1
  662. package/dist/core/std/sim/agentForces.d.ts +441 -99
  663. package/dist/core/std/sim/agentForces.d.ts.map +1 -1
  664. package/dist/core/std/sim/agentFrame.d.ts +94 -20
  665. package/dist/core/std/sim/agentFrame.d.ts.map +1 -1
  666. package/dist/core/std/sim/agentRender.d.ts +187 -60
  667. package/dist/core/std/sim/agentRender.d.ts.map +1 -1
  668. package/dist/core/std/sim/agents.d.ts +99 -28
  669. package/dist/core/std/sim/agents.d.ts.map +1 -1
  670. package/dist/core/std/sim/feedback.d.ts +40 -19
  671. package/dist/core/std/sim/feedback.d.ts.map +1 -1
  672. package/dist/core/std/sim/fluids.d.ts +127 -63
  673. package/dist/core/std/sim/fluids.d.ts.map +1 -1
  674. package/dist/core/std/sim/grids.d.ts +200 -48
  675. package/dist/core/std/sim/grids.d.ts.map +1 -1
  676. package/dist/core/std/sim/index.d.ts +14 -0
  677. package/dist/core/std/sim/index.d.ts.map +1 -0
  678. package/dist/core/std/sim/shapeFields.d.ts +56 -0
  679. package/dist/core/std/sim/shapeFields.d.ts.map +1 -1
  680. package/dist/core/std/sim.d.ts +112 -10
  681. package/dist/core/std/sim.d.ts.map +1 -1
  682. package/dist/core/std/slots.d.ts +72 -6
  683. package/dist/core/std/slots.d.ts.map +1 -1
  684. package/dist/core/std/types.d.ts +97 -60
  685. package/dist/core/std/types.d.ts.map +1 -1
  686. package/dist/core/std/values.d.ts +33 -14
  687. package/dist/core/std/values.d.ts.map +1 -1
  688. package/dist/core/std/warps.d.ts +221 -76
  689. package/dist/core/std/warps.d.ts.map +1 -1
  690. package/dist/core/std/wgsl.d.ts +115 -0
  691. package/dist/core/std/wgsl.d.ts.map +1 -0
  692. package/dist/core/std-ClftfWpF.js +218889 -0
  693. package/dist/core/{support-GJphyuEe.js → support-D3W86vgR.js} +11 -1
  694. package/dist/core/telemetry/index.js +1 -1
  695. package/dist/core/utilities/colorStops.d.ts +2 -2
  696. package/dist/core/utilities/listProps.d.ts +2 -2
  697. package/dist/core/utilities/listProps.d.ts.map +1 -1
  698. package/dist/core/utilities/noiseColor.d.ts +3 -3
  699. package/dist/core/utilities/transformations/index.js +1 -1
  700. package/dist/js/bundle.js +182 -180
  701. package/dist/js/createShader.d.ts.map +1 -1
  702. package/dist/js/createShader.js +4 -3
  703. package/dist/js/types.d.ts +5 -0
  704. package/dist/js/types.d.ts.map +1 -1
  705. package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
  706. package/dist/js/utils/generatePresetCode.js +35 -22
  707. package/dist/react/CustomShader.js +178 -0
  708. package/dist/react/Preview.js +1 -0
  709. package/dist/react/Shader.js +1 -1
  710. package/dist/react/Sparkle.js +226 -0
  711. package/dist/react/bundle.js +178 -176
  712. package/dist/react/components/Sparkle.d.ts +41 -0
  713. package/dist/react/components/Sparkle.d.ts.map +1 -0
  714. package/dist/react/engine/CustomShader.d.ts +37 -0
  715. package/dist/react/engine/CustomShader.d.ts.map +1 -0
  716. package/dist/react/engine/Preview.d.ts.map +1 -1
  717. package/dist/react/index.d.ts +5 -0
  718. package/dist/react/index.d.ts.map +1 -1
  719. package/dist/react/index.js +4 -2
  720. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  721. package/dist/react/utils/generatePresetCode.js +35 -22
  722. package/dist/registry.js +410 -158
  723. package/dist/solid/components/Sparkle.d.ts +38 -0
  724. package/dist/solid/components/Sparkle.d.ts.map +1 -0
  725. package/dist/solid/components/Sparkle.js +232 -0
  726. package/dist/solid/engine/CustomShader.d.ts +35 -0
  727. package/dist/solid/engine/CustomShader.d.ts.map +1 -0
  728. package/dist/solid/engine/CustomShader.js +160 -0
  729. package/dist/solid/engine/Preview.d.ts.map +1 -1
  730. package/dist/solid/engine/Preview.js +319 -317
  731. package/dist/solid/engine/Shader.js +1 -1
  732. package/dist/solid/index.d.ts +5 -0
  733. package/dist/solid/index.d.ts.map +1 -1
  734. package/dist/solid/index.js +95 -86
  735. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  736. package/dist/solid/utils/generatePresetCode.js +35 -22
  737. package/dist/svelte/components/Sparkle.svelte.d.ts +28 -0
  738. package/dist/svelte/engine/CustomShader.svelte.d.ts +40 -0
  739. package/dist/svelte/index.d.ts +4 -0
  740. package/dist/svelte/index.js +1237 -877
  741. package/dist/svelte/source/components/Sparkle.svelte +352 -0
  742. package/dist/svelte/source/engine/CustomShader.svelte +216 -0
  743. package/dist/svelte/source/engine/Preview.svelte +5 -3
  744. package/dist/svelte/source/index.js +4 -0
  745. package/dist/svelte/utils/generatePresetCode.js +35 -22
  746. package/dist/vue/CustomShader.js +3 -0
  747. package/dist/vue/CustomShader.vue_vue_type_script_setup_true_lang.js +173 -0
  748. package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +2 -0
  749. package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
  750. package/dist/vue/Sparkle.js +3 -0
  751. package/dist/vue/Sparkle.vue_vue_type_script_setup_true_lang.js +233 -0
  752. package/dist/vue/components/Sparkle.vue.d.ts +63 -0
  753. package/dist/vue/components/Sparkle.vue.d.ts.map +1 -0
  754. package/dist/vue/index.d.ts +4 -0
  755. package/dist/vue/index.d.ts.map +1 -1
  756. package/dist/vue/index.js +4 -2
  757. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  758. package/dist/vue/utils/generatePresetCode.js +35 -22
  759. package/package.json +27 -2
  760. package/dist/core/Irradiance-B36wYze9.js +0 -4191
  761. package/dist/core/LightEdge-AFfkNhDP.js +0 -2339
  762. package/dist/core/Repeater-C5LILb_Y.js +0 -762
  763. package/dist/core/Shatter-Dz3sH2ON.js +0 -1479
  764. package/dist/core/Voxels-Ca-6rRrz.js +0 -8547
  765. package/dist/core/agents-CBSp2UK_.js +0 -15709
  766. package/dist/core/agents-DXoEcto0.js +0 -5357
  767. package/dist/core/blur-7yjVyMvI.js +0 -8015
  768. package/dist/core/blurs-d4B9aUyx.js +0 -1751
  769. package/dist/core/canvasRaster-DDBkrdY8.js +0 -80
  770. package/dist/core/color-Do6tU0ry.js +0 -3619
  771. package/dist/core/compose-Dkf3v-xS.js +0 -46
  772. package/dist/core/device-m0ud8-Fn.js +0 -10
  773. package/dist/core/feedback-Dro_hxd4.js +0 -46
  774. package/dist/core/fields-DgADOKsP.js +0 -475
  775. package/dist/core/figures-B3lUGP8u.js +0 -48
  776. package/dist/core/filter-BrhpSs3Z.js +0 -23
  777. package/dist/core/fluids-umEWgdvj.js +0 -226
  778. package/dist/core/fonts-BUXTd9qb.js +0 -59
  779. package/dist/core/frames-BLqt7oaW.js +0 -78
  780. package/dist/core/glass-ABppDbYG.js +0 -2532
  781. package/dist/core/gradientPaints-5HpJVNfb.js +0 -6564
  782. package/dist/core/gradients-CIxKrfME.js +0 -159
  783. package/dist/core/grids-Cv99xcJg.js +0 -151
  784. package/dist/core/lens-DJQNJKCW.js +0 -352
  785. package/dist/core/light-D3BIVkxy.js +0 -271
  786. package/dist/core/lightfields-DvrUaH_6.js +0 -2255
  787. package/dist/core/lower-Bd2jez_2.js +0 -49452
  788. package/dist/core/mask-CeSwL79Q.js +0 -28
  789. package/dist/core/materials-4Oqvm_9m.js +0 -2944
  790. package/dist/core/math-D864seEs.js +0 -56
  791. package/dist/core/media-DXUY3ltG.js +0 -832
  792. package/dist/core/mediaLifecycle-BTPb5i1-.js +0 -320
  793. package/dist/core/motionBlur-g_WSi2iq.js +0 -6766
  794. package/dist/core/noise-d7rmP9yc.js +0 -546
  795. package/dist/core/noisePaints-CfHcXL02.js +0 -3619
  796. package/dist/core/noiseStylize-CUrW_HiC.js +0 -65
  797. package/dist/core/overlay-D5w0585O.js +0 -4712
  798. package/dist/core/patterns-Bg8lSdqH.js +0 -9723
  799. package/dist/core/pointerFields-CRecZwuZ.js +0 -2339
  800. package/dist/core/porters-OTkIMOyl.js +0 -30201
  801. package/dist/core/reveal-CfaAg-rg.js +0 -1688
  802. package/dist/core/sdf3d-2AWC_wdn.js +0 -21082
  803. package/dist/core/shaderRegistry-BUvL8ZZS.js +0 -443
  804. package/dist/core/shape-CAkSlCi8.js +0 -20
  805. package/dist/core/shapePaints-Bg2UwCZo.js +0 -3354
  806. package/dist/core/signal-emJuvOI3.js +0 -34
  807. package/dist/core/slots-BqIef2iV.js +0 -32
  808. package/dist/core/stylize-DiuoSq16.js +0 -4541
  809. package/dist/core/tone-BKhfiOBn.js +0 -763
  810. package/dist/core/warpMaps-Y8xSo-QJ.js +0 -10773
  811. package/dist/core/warps-P5O3NWLe.js +0 -276
  812. /package/dist/core/{transformations-CzFmhZww.js → transformations-P50Uo_Ju.js} +0 -0
@@ -1,1751 +0,0 @@
1
- import { Ar as vec2u, Br as struct, Cr as sin, Er as step, Gn as typegpu_default, Mr as vec4f, Or as vec2f, Ot as unpremultiplyAlpha, Pn as DEG_TO_RAD, Rr as textureStorage2d, X as applyEdgeHandlingExpr, Yn as textureStore, Yr as u32, _r as mix, ar as clamp, at as ZERO, ct as call, dt as expr, ft as floatE, gt as formatFloat, hr as max, i as resolveArg, jr as vec3f, mt as vec4, o as uniformOf, or as cos, pt as mixExpr, q as createGuardedCompute, qr as f32, rt as sampleCatmullRomExpr, st as asLocal, wr as smoothstep } from "./lower-Bd2jez_2.js";
2
- import { t as animatedTime } from "./porters-OTkIMOyl.js";
3
- import { D as rgbSplitTaps, E as revealShadow$1, O as rimComposite, S as pagePeelGeom, b as overhangShade, c as curlSheen$1, d as edgeClipSample, j as sphereBulge, k as rimLight, m as flutedGlassGeom, r as blinnHighlight, s as curlShade, x as pagePeelCompose } from "./warpMaps-Y8xSo-QJ.js";
4
- import { C as intensityToRadius, D as withBloomCompute, O as withFixedBlurCompute, S as glowCompose, T as tiltShiftBlurAmount, _ as channelBlurCompose, a as DEFAULT_COMPUTE_WIDTH, c as buildBokehGraph, d as buildGlowPrepassGraph, f as buildGlowPrepassMapGraph, g as buildTiltShiftFillMapGraph, h as buildTiltShiftFillGraph, i as DEFAULT_COMPUTE_HEIGHT, k as withVariableBlurCompute, l as buildBokehMapGraph, m as buildProgressiveBlurFillMapGraph, n as BOKEH_TAP_COUNT, o as bokehRadiusToPixels, p as buildProgressiveBlurFillGraph, r as CHANNEL_INTENSITY_TO_RADIUS, s as buildBloomExtractGraph, t as BLUR_MAP_FORMAT, u as buildFillBlurMapGraph, v as composeBlurredOverSharp, w as remapWindowValues, x as generateBokehTaps } from "./blur-7yjVyMvI.js";
5
- import { C as vignetteShade, S as vhsSampleUVs, _ as scatterGather, a as dropShadowComposite, b as vhsAcBeat, d as glitchSplitUVs, f as motionBlurGather, g as scanlineShade, h as rgbSplitCombine, i as distortScanShade, m as pixelateGather, n as beatShade, o as dropShadowUV, p as phosphorShade, r as crtSampleUV, s as fillBarsShade, t as adjustShade, u as glitchGeom, v as sharpenGather, w as yiqRecombine, x as vhsChromaTapUV, y as silhouetteBlur } from "./motionBlur-g_WSi2iq.js";
6
- function gatherStack(sample, overlays, opts) {
7
- return {
8
- kind: "gather",
9
- resultAlpha: opts?.resultAlpha,
10
- build: (params) => overlays.reduce((color, stage) => stage(color, params), sample(params))
11
- };
12
- }
13
- function frameOf(make) {
14
- const cache = /* @__PURE__ */ new WeakMap();
15
- return (params) => {
16
- const hit = cache.get(params);
17
- if (hit) return hit;
18
- const made = make(params);
19
- cache.set(params, made);
20
- return made;
21
- };
22
- }
23
- function rgbSplit(opts) {
24
- return (params) => {
25
- const amount = resolveArg(opts.amount, params);
26
- const redUV = call(crtSampleUV, "crtSampleUV", [
27
- params.ctx.uv,
28
- amount,
29
- floatE(1)
30
- ]);
31
- const blueUV = call(crtSampleUV, "crtSampleUV", [
32
- params.ctx.uv,
33
- amount,
34
- floatE(-1)
35
- ]);
36
- return call(rgbSplitCombine, "rgbSplitCombine", [
37
- params.texture.sample(redUV),
38
- params.texture.sample(params.ctx.uv),
39
- params.texture.sample(blueUV)
40
- ]);
41
- };
42
- }
43
- function tapeWarp(opts) {
44
- return (params) => call(vhsSampleUVs, "vhsSampleUVs", [
45
- params.ctx.uv,
46
- params.ctx.time,
47
- resolveArg(opts.speed, params),
48
- resolveArg(opts.wobble, params),
49
- resolveArg(opts.jitter, params)
50
- ]);
51
- }
52
- function chromaSmearTaps(opts) {
53
- return (params) => {
54
- const uvs = asLocal(opts.warp(params), "tapeUVs");
55
- const chromaUV = uvs.member("zw");
56
- const lumaSample = params.texture.sample(uvs.member("xy"));
57
- const smearScale = resolveArg(opts.smear, params).mul(.0075);
58
- const tap = (i) => params.texture.sample(call(vhsChromaTapUV, "vhsChromaTapUV", [
59
- chromaUV,
60
- smearScale,
61
- floatE(i)
62
- ]));
63
- return vec4(call(yiqRecombine, "yiqRecombine", [
64
- lumaSample,
65
- tap(1),
66
- tap(2),
67
- tap(3),
68
- tap(4),
69
- tap(5)
70
- ]), lumaSample.member("a"));
71
- };
72
- }
73
- function adjust(opts) {
74
- return (color, params) => call(adjustShade, "adjustShade", [
75
- color,
76
- resolveArg(opts.contrast, params),
77
- resolveArg(opts.brightness, params)
78
- ]);
79
- }
80
- function scanlines(opts) {
81
- return (color, params) => call(scanlineShade, "scanlineShade", [
82
- color,
83
- params.ctx.uv.member("y"),
84
- resolveArg(opts.frequency, params),
85
- resolveArg(opts.intensity, params)
86
- ]);
87
- }
88
- function phosphorMask(opts) {
89
- return (color, params) => call(phosphorShade, "phosphorShade", [
90
- color,
91
- params.ctx.uv,
92
- resolveArg(opts.pitch, params)
93
- ]);
94
- }
95
- function vignetteOverlay(opts) {
96
- return (color, params) => call(vignetteShade, "vignetteShade", [
97
- color,
98
- params.ctx.uv,
99
- params.ctx.aspect,
100
- resolveArg(opts.radius, params),
101
- resolveArg(opts.intensity, params)
102
- ]);
103
- }
104
- function opaque() {
105
- return (color) => vec4(color, floatE(1));
106
- }
107
- function beatPulse(opts) {
108
- return (color, params) => call(beatShade, "beatShade", [color, call(vhsAcBeat, "vhsAcBeat", [
109
- params.ctx.uv,
110
- params.ctx.time,
111
- resolveArg(opts.speed, params),
112
- resolveArg(opts.wobble, params)
113
- ])]);
114
- }
115
- const blurPath = {
116
- linear: (angle) => ({
117
- kind: "linear",
118
- focus: angle
119
- }),
120
- orbit: (center) => ({
121
- kind: "orbit",
122
- focus: center
123
- }),
124
- zoom: (center) => ({
125
- kind: "zoom",
126
- focus: center
127
- })
128
- };
129
- function motionBlur(opts) {
130
- const { path, amount } = opts;
131
- return {
132
- kind: "gather",
133
- build: (params) => motionBlurGather(path.kind, {
134
- focus: resolveArg(path.focus, params),
135
- amount: resolveArg(amount, params),
136
- uv: params.ctx.uv,
137
- aspect: params.ctx.aspect,
138
- viewportSize: params.ctx.viewportSize
139
- }, (coord) => params.texture.sample(coord))
140
- };
141
- }
142
- function scatter(opts) {
143
- const { amount, edges } = opts;
144
- return {
145
- kind: "gather",
146
- build: (params) => scatterGather({
147
- uv: params.ctx.uv,
148
- amount: resolveArg(amount, params),
149
- viewportSize: params.ctx.viewportSize,
150
- edgeMode: params.propValues[edges.name] ?? 0,
151
- sample: (coord) => params.texture.sample(coord)
152
- })
153
- };
154
- }
155
- function sharpen(amount) {
156
- return {
157
- kind: "gather",
158
- build: (params) => sharpenGather({
159
- uv: params.ctx.uv,
160
- viewportSize: params.ctx.viewportSize,
161
- amount: resolveArg(amount, params),
162
- sample: (coord) => params.texture.sample(coord)
163
- })
164
- };
165
- }
166
- function pixelate(opts) {
167
- const { scale, gap, roundness } = opts;
168
- return {
169
- kind: "gather",
170
- resultAlpha: "straight",
171
- build: (params) => pixelateGather({
172
- uv: params.ctx.uv,
173
- aspect: params.ctx.aspect,
174
- scale: resolveArg(scale, params),
175
- gap: resolveArg(gap, params),
176
- roundness: resolveArg(roundness, params),
177
- sampleStraight: params.sampleStraight
178
- })
179
- };
180
- }
181
- function sphereFrame(opts) {
182
- return frameOf((params) => asLocal(call(sphereBulge, "sphereBulge", [
183
- params.ctx.uv,
184
- params.ctx.viewportSize,
185
- resolveArg(opts.center, params),
186
- resolveArg(opts.radius, params),
187
- resolveArg(opts.depth, params)
188
- ]), "sphere"));
189
- }
190
- function crispTap(frame) {
191
- return (params) => call(unpremultiplyAlpha, "unpremultiplyAlpha", [sampleCatmullRomExpr(params.texture, frame(params).member("uv"))]);
192
- }
193
- function rimLit(frame, opts) {
194
- return (color, params) => {
195
- const rim = call(rimLight, "rimLight", [
196
- frame(params).member("normal"),
197
- resolveArg(opts.position, params),
198
- resolveArg(opts.intensity, params),
199
- resolveArg(opts.softness, params)
200
- ]);
201
- return call(rimComposite, "rimComposite", [
202
- color,
203
- resolveArg(opts.color, params).member("rgb"),
204
- rim,
205
- frame(params).member("coverage")
206
- ]);
207
- };
208
- }
209
- function glitchFrame(opts) {
210
- return frameOf((params) => asLocal(call(glitchGeom, "glitchGeom", [
211
- params.ctx.uv,
212
- params.ctx.time,
213
- resolveArg(opts.intensity, params),
214
- resolveArg(opts.speed, params),
215
- resolveArg(opts.blockDensity, params),
216
- resolveArg(opts.mirrorAmount, params)
217
- ]), "glitch"));
218
- }
219
- function glitchRgbSplit(frame, opts) {
220
- return (params) => {
221
- const geom = frame(params);
222
- const splitUVs = asLocal(call(glitchSplitUVs, "glitchSplitUVs", [
223
- geom.member("mirroredUV"),
224
- resolveArg(opts.shift, params),
225
- geom.member("spread")
226
- ]), "splitUVs");
227
- const greenSample = params.texture.sample(geom.member("mirroredUV"));
228
- return vec4(params.texture.sample(splitUVs.member("xy")).member("r"), greenSample.member("g"), params.texture.sample(splitUVs.member("zw")).member("b"), greenSample.member("a"));
229
- };
230
- }
231
- function colorBarFills(frame, opts) {
232
- return (color, params) => {
233
- const geom = frame(params);
234
- return call(fillBarsShade, "fillBarsShade", [
235
- color,
236
- params.ctx.uv,
237
- geom.member("bandY1"),
238
- geom.member("slowFrame"),
239
- resolveArg(opts.intensity, params),
240
- geom.member("strength"),
241
- geom.member("bandGate"),
242
- geom.member("blockGate")
243
- ]);
244
- };
245
- }
246
- function distortedScanlines(frame, opts) {
247
- return (color, params) => call(distortScanShade, "distortScanShade", [
248
- color,
249
- params.ctx.uv.member("y"),
250
- params.ctx.viewportSize.member("y"),
251
- resolveArg(opts.intensity, params),
252
- frame(params).member("distortion")
253
- ]);
254
- }
255
- function gaussianBlur(opts) {
256
- const prop = opts.intensity.name;
257
- return {
258
- compute: (params) => {
259
- const { getCpuValue, getMapInfo } = params;
260
- const mapInfo = getMapInfo(prop);
261
- if (mapInfo) return withVariableBlurCompute(params, {
262
- source: mapInfo,
263
- buildFill: (cw, ch) => buildFillBlurMapGraph(cw, ch, mapInfo.channel),
264
- fillValues: (dims, window) => ({
265
- inputWidth: dims.width,
266
- inputHeight: dims.height,
267
- ...remapWindowValues(window)
268
- })
269
- });
270
- return withFixedBlurCompute(params, { radius: () => {
271
- const raw = getCpuValue(prop);
272
- return typeof raw === "number" ? intensityToRadius(raw) : 4;
273
- } });
274
- },
275
- gpu: { fragment: (params) => composeBlurredOverSharp(params, (blurred, sharp) => vec4(blurred.member("rgb"), sharp.member("a"))) }
276
- };
277
- }
278
- function channelBlur(opts) {
279
- const { red, green, blue } = opts;
280
- return {
281
- compute: (params) => withFixedBlurCompute(params, { radius: () => {
282
- const r = (params.getCpuValue(red.name) ?? 0) * CHANNEL_INTENSITY_TO_RADIUS;
283
- const g = (params.getCpuValue(green.name) ?? 0) * CHANNEL_INTENSITY_TO_RADIUS;
284
- const b = (params.getCpuValue(blue.name) ?? 0) * CHANNEL_INTENSITY_TO_RADIUS;
285
- return Math.max(r, g, b, .01);
286
- } }),
287
- gpu: { fragment: (params) => composeBlurredOverSharp(params, (blurred, sharp) => call(channelBlurCompose, "channelBlurCompose", [
288
- sharp,
289
- blurred,
290
- uniformOf(red, params),
291
- uniformOf(green, params),
292
- uniformOf(blue, params)
293
- ])) }
294
- };
295
- }
296
- function progressiveBlur(opts) {
297
- const { intensity, angle, center, falloff } = opts;
298
- return {
299
- compute: (params) => {
300
- const { getCpuValue, getMapInfo } = params;
301
- const readGeometry = (dims) => {
302
- const centerValue = getCpuValue(center.name);
303
- return {
304
- angle: getCpuValue(angle.name) ?? 0,
305
- centerX: typeof centerValue?.x === "number" ? centerValue.x : 0,
306
- centerY: typeof centerValue?.y === "number" ? centerValue.y : .5,
307
- falloff: getCpuValue(falloff.name) ?? 1,
308
- aspect: dims.width / dims.height
309
- };
310
- };
311
- const mapInfo = getMapInfo(intensity.name);
312
- if (mapInfo) return withVariableBlurCompute(params, {
313
- source: mapInfo,
314
- buildFill: (cw, ch) => buildProgressiveBlurFillMapGraph(cw, ch, mapInfo.channel),
315
- fillValues: (dims, window) => ({
316
- ...readGeometry(dims),
317
- inputWidth: dims.width,
318
- inputHeight: dims.height,
319
- ...remapWindowValues(window)
320
- })
321
- });
322
- return withVariableBlurCompute(params, {
323
- buildFill: buildProgressiveBlurFillGraph,
324
- fillValues: (dims) => ({
325
- ...readGeometry(dims),
326
- maxRadius: intensityToRadius(getCpuValue(intensity.name) ?? 0)
327
- })
328
- });
329
- },
330
- gpu: { fragment: (params) => composeBlurredOverSharp(params, (blurred, sharp) => vec4(blurred.member("rgb"), sharp.member("a"))) }
331
- };
332
- }
333
- function tiltShift(opts) {
334
- const { intensity, width, falloff, angle, center } = opts;
335
- return {
336
- compute: (params) => {
337
- const { getCpuValue, getMapInfo } = params;
338
- const readGeometry = (dims) => {
339
- const centerValue = getCpuValue(center.name);
340
- return {
341
- angle: getCpuValue(angle.name) ?? 0,
342
- centerX: typeof centerValue?.x === "number" ? centerValue.x : .5,
343
- centerY: typeof centerValue?.y === "number" ? centerValue.y : .5,
344
- width: getCpuValue(width.name) ?? .3,
345
- falloff: getCpuValue(falloff.name) ?? .3,
346
- aspect: dims.width / dims.height
347
- };
348
- };
349
- const mapInfo = getMapInfo(intensity.name);
350
- if (mapInfo) return withVariableBlurCompute(params, {
351
- halfKernel: 14,
352
- source: mapInfo,
353
- buildFill: (cw, ch) => buildTiltShiftFillMapGraph(cw, ch, mapInfo.channel),
354
- fillValues: (dims, window) => ({
355
- ...readGeometry(dims),
356
- inputWidth: dims.width,
357
- inputHeight: dims.height,
358
- ...remapWindowValues(window)
359
- })
360
- });
361
- return withVariableBlurCompute(params, {
362
- halfKernel: 14,
363
- buildFill: buildTiltShiftFillGraph,
364
- fillValues: (dims) => ({
365
- ...readGeometry(dims),
366
- maxRadius: intensityToRadius(getCpuValue(intensity.name) ?? 0)
367
- })
368
- });
369
- },
370
- gpu: { fragment: (params) => composeBlurredOverSharp(params, (blurred, sharp) => {
371
- return mixExpr(sharp, blurred, call(tiltShiftBlurAmount, "tiltShiftBlurAmount", [
372
- uniformOf(angle, params),
373
- uniformOf(center, params),
374
- uniformOf(width, params),
375
- uniformOf(falloff, params),
376
- params.ctx.uv,
377
- params.ctx.aspect
378
- ]));
379
- }) }
380
- };
381
- }
382
- function bloom(opts) {
383
- const { intensity, threshold, size } = opts;
384
- return {
385
- compute: (params) => {
386
- const { getCpuValue, getMapInfo } = params;
387
- const mapInfo = getMapInfo(size.name);
388
- if (!mapInfo && (getCpuValue(size.name) ?? 0) === 0) return null;
389
- return withBloomCompute(params, {
390
- mapInfo,
391
- buildExtract: buildGlowPrepassGraph,
392
- buildExtractMap: buildGlowPrepassMapGraph,
393
- threshold: () => getCpuValue(threshold.name) ?? .5,
394
- radius: () => getCpuValue(size.name) ?? 25
395
- });
396
- },
397
- gpu: { fragment: (params) => composeBlurredOverSharp(params, (bloomSample, original) => call(glowCompose, "glowCompose", [
398
- original,
399
- bloomSample,
400
- uniformOf(intensity, params)
401
- ])) }
402
- };
403
- }
404
- function childTap() {
405
- return (params) => params.texture.sample(params.ctx.uv);
406
- }
407
- function shadowOffset(opts) {
408
- return (params) => call(dropShadowUV, "dropShadowUV", [
409
- params.ctx.uv,
410
- params.ctx.viewportSize,
411
- resolveArg(opts.angle, params),
412
- resolveArg(opts.distance, params)
413
- ]);
414
- }
415
- function silhouetteCoverage(opts) {
416
- return (params) => silhouetteBlur({
417
- at: opts.at(params),
418
- uv: params.ctx.uv,
419
- viewportSize: params.ctx.viewportSize,
420
- blurRadius: resolveArg(opts.blur, params),
421
- sample: (coord) => params.texture.sample(coord),
422
- convertToTexture: params.convertToTexture
423
- });
424
- }
425
- function shadowComposite(opts) {
426
- return (original, params) => {
427
- const shadowAlpha = opts.coverage(params).mul(resolveArg(opts.intensity, params));
428
- return call(dropShadowComposite, "dropShadowComposite", [
429
- original,
430
- resolveArg(opts.color, params),
431
- shadowAlpha,
432
- floatE(params.propValues[opts.cutout.name] === 1 ? 1 : 0)
433
- ]);
434
- };
435
- }
436
- var PEEL_CORNERS = {
437
- "top-left": {
438
- corner: [0, 0],
439
- opposite: [1, 1]
440
- },
441
- "top-right": {
442
- corner: [1, 0],
443
- opposite: [0, 1]
444
- },
445
- "bottom-left": {
446
- corner: [0, 1],
447
- opposite: [1, 0]
448
- },
449
- "bottom-right": {
450
- corner: [1, 1],
451
- opposite: [0, 0]
452
- }
453
- };
454
- function fluteFrame(opts) {
455
- return frameOf((params) => {
456
- const shapeId = params.propValues[opts.shape.name] ?? 0;
457
- const expHi = shapeId === 0 ? 16 : 8;
458
- const expLo = shapeId === 0 ? 4 : 3;
459
- const wavesFlag = shapeId === 2 ? 1 : 0;
460
- const t = animatedTime(params).mul(-1);
461
- return asLocal(call(flutedGlassGeom, "flutedGlassGeom", [
462
- params.ctx.uv,
463
- params.ctx.aspect,
464
- t,
465
- resolveArg(opts.angle, params),
466
- resolveArg(opts.frequency, params),
467
- resolveArg(opts.softness, params),
468
- resolveArg(opts.waveAmplitude, params),
469
- resolveArg(opts.waveFrequency, params),
470
- resolveArg(opts.refraction, params),
471
- resolveArg(opts.aberration, params),
472
- expr(`vec3f(${formatFloat(expHi)}, ${formatFloat(expLo)}, ${formatFloat(wavesFlag)})`)
473
- ]), "flute");
474
- });
475
- }
476
- function refractedTaps(frame, opts) {
477
- return (params) => {
478
- const edgeMode = params.propValues[opts.edges.name] ?? 2;
479
- const aberrationEnabled = (params.propValues[opts.aberration.name] ?? .2) > 0;
480
- const geom = frame(params);
481
- const sampleAt = (uvE) => edgeClipSample((uv) => params.texture.sample(uv), uvE, edgeMode);
482
- const refractedUV = geom.member("refractedUV");
483
- return call(unpremultiplyAlpha, "unpremultiplyAlpha", [aberrationEnabled ? rgbSplitTaps(sampleAt, refractedUV, geom.member("chrOff")) : sampleAt(refractedUV)]);
484
- };
485
- }
486
- function fluteHighlight(frame, opts) {
487
- return (color, params) => {
488
- const specA = call(blinnHighlight, "blinnHighlight", [
489
- frame(params).member("slope"),
490
- resolveArg(opts.lightAngle, params),
491
- resolveArg(opts.highlight, params),
492
- resolveArg(opts.softness, params)
493
- ]).mul(color.member("a"));
494
- return vec4(color.member("rgb").add(resolveArg(opts.color, params).member("rgb").mul(specA)), color.member("a"));
495
- };
496
- }
497
- function peelFrame(opts) {
498
- return frameOf((params) => {
499
- const cornerGeom = PEEL_CORNERS[params.propValues[opts.corner.name] ?? "bottom-right"] ?? PEEL_CORNERS["bottom-right"];
500
- return asLocal(call(pagePeelGeom, "pagePeelGeom", [
501
- params.ctx.uv,
502
- params.ctx.aspect,
503
- floatE(cornerGeom.corner[0]),
504
- floatE(cornerGeom.corner[1]),
505
- floatE(cornerGeom.opposite[0]),
506
- floatE(cornerGeom.opposite[1]),
507
- resolveArg(opts.amount, params),
508
- resolveArg(opts.radius, params)
509
- ]), "peel");
510
- });
511
- }
512
- function curlShading(frame, opts) {
513
- return (params) => call(curlShade, "curlShade", [frame(params).member("theta"), resolveArg(opts.shading, params)]);
514
- }
515
- function curlSheen(frame, opts) {
516
- return (params) => call(curlSheen$1, "curlSheen", [
517
- frame(params).member("theta"),
518
- resolveArg(opts.highlight, params),
519
- resolveArg(opts.softness, params)
520
- ]);
521
- }
522
- function overhangShadow(frame, opts) {
523
- return (params) => {
524
- const g = frame(params);
525
- return call(overhangShade, "overhangShade", [
526
- g.member("distPastCrease"),
527
- g.member("flatReach"),
528
- resolveArg(opts.amount, params),
529
- resolveArg(opts.shadow, params)
530
- ]);
531
- };
532
- }
533
- function revealShadow(frame, opts) {
534
- return (params) => {
535
- const g = frame(params);
536
- return call(revealShadow$1, "revealShadow", [
537
- g.member("distIntoPeel"),
538
- g.member("peelReach"),
539
- resolveArg(opts.amount, params),
540
- resolveArg(opts.shadow, params)
541
- ]);
542
- };
543
- }
544
- function peelCompose(frame, parts) {
545
- return (params) => {
546
- const g = frame(params);
547
- return call(pagePeelCompose, "pagePeelCompose", [
548
- params.texture.sample(g.member("curlUV")),
549
- params.texture.sample(params.ctx.uv),
550
- parts.shade(params),
551
- parts.sheen(params),
552
- parts.overhang(params),
553
- parts.reveal(params),
554
- g.member("foldBlend"),
555
- g.member("showCurl")
556
- ]);
557
- };
558
- }
559
- const mirrorRowUV = typegpu_default.fn([vec2f, f32], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, lineY) => {
560
- "use gpu";
561
- return vec2f(uv.x, __tsover_sub(__tsover_mul(lineY, 2), uv.y));
562
- }), {
563
- v: 2,
564
- name: void 0,
565
- ast: {
566
- "params": [{
567
- "type": "i",
568
- "name": "uv"
569
- }, {
570
- "type": "i",
571
- "name": "lineY"
572
- }],
573
- "body": [0, [[10, [
574
- 6,
575
- "d.vec2f",
576
- [[
577
- 7,
578
- "uv",
579
- "x"
580
- ], [
581
- 1,
582
- [
583
- 1,
584
- "lineY",
585
- "*",
586
- [5, "2"]
587
- ],
588
- "-",
589
- [
590
- 7,
591
- "uv",
592
- "y"
593
- ]
594
- ]]
595
- ]]]]
596
- },
597
- externals: { "d.vec2f": () => vec2f }
598
- }) && $.f)({}));
599
- const planarReflectionCompose = typegpu_default.fn([
600
- vec4f,
601
- vec4f,
602
- f32,
603
- f32,
604
- f32,
605
- f32
606
- ], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((original, refl, uvY, lineY, distance, falloff) => {
607
- "use gpu";
608
- const distBelow = max(__tsover_sub(uvY, lineY), 0);
609
- const distanceMax = max(distance, .001);
610
- const fadeWidth = max(__tsover_mul(distanceMax, falloff), 1e-4);
611
- const fadeStart = __tsover_sub(distanceMax, fadeWidth);
612
- const visibility = __tsover_sub(1, smoothstep(fadeStart, distanceMax, distBelow));
613
- const effReflA = __tsover_mul(refl.w, visibility);
614
- const oneMinusReflA = __tsover_sub(1, effReflA);
615
- return mix(original, vec4f(refl.xyz.mul(visibility).add(original.xyz.mul(oneMinusReflA)), __tsover_add(effReflA, __tsover_mul(original.w, oneMinusReflA))), vec4f(step(lineY, uvY)));
616
- }), {
617
- v: 2,
618
- name: void 0,
619
- ast: {
620
- "params": [
621
- {
622
- "type": "i",
623
- "name": "original"
624
- },
625
- {
626
- "type": "i",
627
- "name": "refl"
628
- },
629
- {
630
- "type": "i",
631
- "name": "uvY"
632
- },
633
- {
634
- "type": "i",
635
- "name": "lineY"
636
- },
637
- {
638
- "type": "i",
639
- "name": "distance"
640
- },
641
- {
642
- "type": "i",
643
- "name": "falloff"
644
- }
645
- ],
646
- "body": [0, [
647
- [
648
- 13,
649
- "distBelow",
650
- [
651
- 6,
652
- "std.max",
653
- [[
654
- 1,
655
- "uvY",
656
- "-",
657
- "lineY"
658
- ], [5, "0"]]
659
- ]
660
- ],
661
- [
662
- 13,
663
- "distanceMax",
664
- [
665
- 6,
666
- "std.max",
667
- ["distance", [5, "0.001"]]
668
- ]
669
- ],
670
- [
671
- 13,
672
- "fadeWidth",
673
- [
674
- 6,
675
- "std.max",
676
- [[
677
- 1,
678
- "distanceMax",
679
- "*",
680
- "falloff"
681
- ], [5, "0.0001"]]
682
- ]
683
- ],
684
- [
685
- 13,
686
- "fadeStart",
687
- [
688
- 1,
689
- "distanceMax",
690
- "-",
691
- "fadeWidth"
692
- ]
693
- ],
694
- [
695
- 13,
696
- "visibility",
697
- [
698
- 1,
699
- [5, "1"],
700
- "-",
701
- [
702
- 6,
703
- "std.smoothstep",
704
- [
705
- "fadeStart",
706
- "distanceMax",
707
- "distBelow"
708
- ]
709
- ]
710
- ]
711
- ],
712
- [
713
- 13,
714
- "effReflA",
715
- [
716
- 1,
717
- [
718
- 7,
719
- "refl",
720
- "w"
721
- ],
722
- "*",
723
- "visibility"
724
- ]
725
- ],
726
- [
727
- 13,
728
- "oneMinusReflA",
729
- [
730
- 1,
731
- [5, "1"],
732
- "-",
733
- "effReflA"
734
- ]
735
- ],
736
- [
737
- 13,
738
- "belowRgb",
739
- [
740
- 6,
741
- [
742
- 7,
743
- [
744
- 6,
745
- [
746
- 7,
747
- [
748
- 7,
749
- "refl",
750
- "xyz"
751
- ],
752
- "mul"
753
- ],
754
- ["visibility"]
755
- ],
756
- "add"
757
- ],
758
- [[
759
- 6,
760
- [
761
- 7,
762
- [
763
- 7,
764
- "original",
765
- "xyz"
766
- ],
767
- "mul"
768
- ],
769
- ["oneMinusReflA"]
770
- ]]
771
- ]
772
- ],
773
- [
774
- 13,
775
- "belowA",
776
- [
777
- 1,
778
- "effReflA",
779
- "+",
780
- [
781
- 1,
782
- [
783
- 7,
784
- "original",
785
- "w"
786
- ],
787
- "*",
788
- "oneMinusReflA"
789
- ]
790
- ]
791
- ],
792
- [
793
- 13,
794
- "belowLine",
795
- [
796
- 6,
797
- "d.vec4f",
798
- ["belowRgb", "belowA"]
799
- ]
800
- ],
801
- [
802
- 13,
803
- "isBelowLine",
804
- [
805
- 6,
806
- "std.step",
807
- ["lineY", "uvY"]
808
- ]
809
- ],
810
- [10, [
811
- 6,
812
- "std.mix",
813
- [
814
- "original",
815
- "belowLine",
816
- [
817
- 6,
818
- "d.vec4f",
819
- ["isBelowLine"]
820
- ]
821
- ]
822
- ]]
823
- ]]
824
- },
825
- externals: {
826
- "std.max": () => max,
827
- "std.smoothstep": () => smoothstep,
828
- "d.vec4f": () => vec4f,
829
- "std.step": () => step,
830
- "std.mix": () => mix
831
- }
832
- }) && $.f)({}));
833
- var DEPTH_RAMP_RADIUS_PX = 12;
834
- function depthRampFillParams() {
835
- return struct({
836
- height: f32,
837
- blurAmount: f32,
838
- blurDistance: f32
839
- });
840
- }
841
- function buildDepthRampFillGraph(computeWidth, computeHeight) {
842
- const Params = depthRampFillParams();
843
- const layout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(typegpu_default.bindGroupLayout({
844
- blurMap: { storageTexture: textureStorage2d(BLUR_MAP_FORMAT, "write-only") },
845
- params: { uniform: Params }
846
- }), "layout");
847
- return {
848
- layout,
849
- kernel: typegpu_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
850
- "use gpu";
851
- const p = layout.$.params;
852
- const v = __tsover_div(__tsover_add(f32(cy), .5), computeHeight);
853
- const distBelowAtOutput = max(__tsover_sub(p.height, v), 0);
854
- const ramp = smoothstep(0, p.blurDistance, distBelowAtOutput);
855
- const radius = __tsover_mul(__tsover_mul(p.blurAmount, ramp), DEPTH_RAMP_RADIUS_PX);
856
- textureStore(layout.$.blurMap, vec2u(cx, cy), vec4f(radius, 0, 0, 1));
857
- }), {
858
- v: 2,
859
- name: void 0,
860
- ast: {
861
- "params": [{
862
- "type": "i",
863
- "name": "cx"
864
- }, {
865
- "type": "i",
866
- "name": "cy"
867
- }],
868
- "body": [0, [
869
- [
870
- 13,
871
- "p",
872
- [
873
- 7,
874
- [
875
- 7,
876
- "layout",
877
- "$"
878
- ],
879
- "params"
880
- ]
881
- ],
882
- [
883
- 13,
884
- "v",
885
- [
886
- 1,
887
- [
888
- 1,
889
- [
890
- 6,
891
- "d.f32",
892
- ["cy"]
893
- ],
894
- "+",
895
- [5, "0.5"]
896
- ],
897
- "/",
898
- "computeHeight"
899
- ]
900
- ],
901
- [
902
- 13,
903
- "distBelowAtOutput",
904
- [
905
- 6,
906
- "std.max",
907
- [[
908
- 1,
909
- [
910
- 7,
911
- "p",
912
- "height"
913
- ],
914
- "-",
915
- "v"
916
- ], [5, "0"]]
917
- ]
918
- ],
919
- [
920
- 13,
921
- "ramp",
922
- [
923
- 6,
924
- "std.smoothstep",
925
- [
926
- [5, "0"],
927
- [
928
- 7,
929
- "p",
930
- "blurDistance"
931
- ],
932
- "distBelowAtOutput"
933
- ]
934
- ]
935
- ],
936
- [
937
- 13,
938
- "radius",
939
- [
940
- 1,
941
- [
942
- 1,
943
- [
944
- 7,
945
- "p",
946
- "blurAmount"
947
- ],
948
- "*",
949
- "ramp"
950
- ],
951
- "*",
952
- "DEPTH_RAMP_RADIUS_PX"
953
- ]
954
- ],
955
- [
956
- 6,
957
- "std.textureStore",
958
- [
959
- [
960
- 7,
961
- [
962
- 7,
963
- "layout",
964
- "$"
965
- ],
966
- "blurMap"
967
- ],
968
- [
969
- 6,
970
- "d.vec2u",
971
- ["cx", "cy"]
972
- ],
973
- [
974
- 6,
975
- "d.vec4f",
976
- [
977
- "radius",
978
- [5, "0"],
979
- [5, "0"],
980
- [5, "1"]
981
- ]
982
- ]
983
- ]
984
- ]
985
- ]]
986
- },
987
- externals: {
988
- "layout": () => layout,
989
- "d.f32": () => f32,
990
- "computeHeight": () => computeHeight,
991
- "std.max": () => max,
992
- "std.smoothstep": () => smoothstep,
993
- "DEPTH_RAMP_RADIUS_PX": () => DEPTH_RAMP_RADIUS_PX,
994
- "std.textureStore": () => textureStore,
995
- "d.vec2u": () => vec2u,
996
- "d.vec4f": () => vec4f
997
- }
998
- }) && $.f)({})).$name("depthRampFillBlurMap"),
999
- Params
1000
- };
1001
- }
1002
- function mirrorAcrossRow(line) {
1003
- return ({ ctx, uniforms }) => call(mirrorRowUV, "mirrorRowUV", [ctx.uv, uniforms[line.name]]);
1004
- }
1005
- function depthRampBlur(opts) {
1006
- return { compute: (params) => withVariableBlurCompute(params, {
1007
- halfKernel: opts.halfKernel,
1008
- buildFill: buildDepthRampFillGraph,
1009
- fillValues: () => ({
1010
- height: params.getCpuValue(opts.line.name) ?? .5,
1011
- blurAmount: params.getCpuValue(opts.blur.name) ?? 1,
1012
- blurDistance: Math.max(.01, params.getCpuValue(opts.blurDistance.name) ?? .5)
1013
- })
1014
- }) };
1015
- }
1016
- function planarReflection(opts, original, reflection, reflectedUV) {
1017
- return (params) => {
1018
- const { ctx, uniforms, propValues } = params;
1019
- const edgeMode = propValues[opts.edges.name] ?? 0;
1020
- return call(planarReflectionCompose, "planarReflectionCompose", [
1021
- original,
1022
- applyEdgeHandlingExpr(reflectedUV(params), reflection, edgeMode),
1023
- ctx.uv.member("y"),
1024
- uniforms[opts.line.name],
1025
- uniforms[opts.distance.name],
1026
- uniforms[opts.falloff.name]
1027
- ]);
1028
- };
1029
- }
1030
- const tintedScreenGlow = typegpu_default.fn([
1031
- vec4f,
1032
- vec4f,
1033
- vec4f
1034
- ], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((base, glow, tintStrength) => {
1035
- "use gpu";
1036
- const strength = tintStrength.w;
1037
- const bloomC = clamp(glow.xyz.mul(tintStrength.xyz).mul(strength), vec3f(0, 0, 0), vec3f(1, 1, 1));
1038
- const one = vec3f(1, 1, 1);
1039
- const screened = one.sub(one.sub(base.xyz).mul(one.sub(bloomC)));
1040
- const a = __tsover_add(base.w, __tsover_mul(__tsover_mul(glow.w, strength), __tsover_sub(1, base.w)));
1041
- return vec4f(screened.x, screened.y, screened.z, clamp(a, 0, 1));
1042
- }), {
1043
- v: 2,
1044
- name: void 0,
1045
- ast: {
1046
- "params": [
1047
- {
1048
- "type": "i",
1049
- "name": "base"
1050
- },
1051
- {
1052
- "type": "i",
1053
- "name": "glow"
1054
- },
1055
- {
1056
- "type": "i",
1057
- "name": "tintStrength"
1058
- }
1059
- ],
1060
- "body": [0, [
1061
- [
1062
- 13,
1063
- "strength",
1064
- [
1065
- 7,
1066
- "tintStrength",
1067
- "w"
1068
- ]
1069
- ],
1070
- [
1071
- 13,
1072
- "bloomC",
1073
- [
1074
- 6,
1075
- "std.clamp",
1076
- [
1077
- [
1078
- 6,
1079
- [
1080
- 7,
1081
- [
1082
- 6,
1083
- [
1084
- 7,
1085
- [
1086
- 7,
1087
- "glow",
1088
- "xyz"
1089
- ],
1090
- "mul"
1091
- ],
1092
- [[
1093
- 7,
1094
- "tintStrength",
1095
- "xyz"
1096
- ]]
1097
- ],
1098
- "mul"
1099
- ],
1100
- ["strength"]
1101
- ],
1102
- [
1103
- 6,
1104
- "d.vec3f",
1105
- [
1106
- [5, "0"],
1107
- [5, "0"],
1108
- [5, "0"]
1109
- ]
1110
- ],
1111
- [
1112
- 6,
1113
- "d.vec3f",
1114
- [
1115
- [5, "1"],
1116
- [5, "1"],
1117
- [5, "1"]
1118
- ]
1119
- ]
1120
- ]
1121
- ]
1122
- ],
1123
- [
1124
- 13,
1125
- "one",
1126
- [
1127
- 6,
1128
- "d.vec3f",
1129
- [
1130
- [5, "1"],
1131
- [5, "1"],
1132
- [5, "1"]
1133
- ]
1134
- ]
1135
- ],
1136
- [
1137
- 13,
1138
- "screened",
1139
- [
1140
- 6,
1141
- [
1142
- 7,
1143
- "one",
1144
- "sub"
1145
- ],
1146
- [[
1147
- 6,
1148
- [
1149
- 7,
1150
- [
1151
- 6,
1152
- [
1153
- 7,
1154
- "one",
1155
- "sub"
1156
- ],
1157
- [[
1158
- 7,
1159
- "base",
1160
- "xyz"
1161
- ]]
1162
- ],
1163
- "mul"
1164
- ],
1165
- [[
1166
- 6,
1167
- [
1168
- 7,
1169
- "one",
1170
- "sub"
1171
- ],
1172
- ["bloomC"]
1173
- ]]
1174
- ]]
1175
- ]
1176
- ],
1177
- [
1178
- 13,
1179
- "a",
1180
- [
1181
- 1,
1182
- [
1183
- 7,
1184
- "base",
1185
- "w"
1186
- ],
1187
- "+",
1188
- [
1189
- 1,
1190
- [
1191
- 1,
1192
- [
1193
- 7,
1194
- "glow",
1195
- "w"
1196
- ],
1197
- "*",
1198
- "strength"
1199
- ],
1200
- "*",
1201
- [
1202
- 1,
1203
- [5, "1"],
1204
- "-",
1205
- [
1206
- 7,
1207
- "base",
1208
- "w"
1209
- ]
1210
- ]
1211
- ]
1212
- ]
1213
- ],
1214
- [10, [
1215
- 6,
1216
- "d.vec4f",
1217
- [
1218
- [
1219
- 7,
1220
- "screened",
1221
- "x"
1222
- ],
1223
- [
1224
- 7,
1225
- "screened",
1226
- "y"
1227
- ],
1228
- [
1229
- 7,
1230
- "screened",
1231
- "z"
1232
- ],
1233
- [
1234
- 6,
1235
- "std.clamp",
1236
- [
1237
- "a",
1238
- [5, "0"],
1239
- [5, "1"]
1240
- ]
1241
- ]
1242
- ]
1243
- ]]
1244
- ]]
1245
- },
1246
- externals: {
1247
- "std.clamp": () => clamp,
1248
- "d.vec3f": () => vec3f,
1249
- "d.vec4f": () => vec4f
1250
- }
1251
- }) && $.f)({})).$name("tintedScreenGlow");
1252
- function screenedBloom(slots) {
1253
- return {
1254
- compute: (params) => {
1255
- const { getCpuValue } = params;
1256
- if ((getCpuValue(slots.strength.name) ?? 0) === 0) return null;
1257
- return withBloomCompute(params, {
1258
- outputKey: slots.output,
1259
- buildExtract: (w, h) => buildBloomExtractGraph(w, h, slots.extractName),
1260
- threshold: () => slots.threshold,
1261
- radius: () => getCpuValue(slots.radius.name) ?? 28
1262
- });
1263
- },
1264
- screen: (base, at, params) => {
1265
- const glowTex = params.computeOutputs?.[slots.output];
1266
- return call(tintedScreenGlow, "tintedScreenGlow", [
1267
- base,
1268
- glowTex ? glowTex.sample(at) : expr("vec4f(0.0, 0.0, 0.0, 0.0)"),
1269
- vec4(slots.tint[0], slots.tint[1], slots.tint[2], params.uniforms[slots.strength.name])
1270
- ]);
1271
- }
1272
- };
1273
- }
1274
- const swayUV = typegpu_default.fn([
1275
- vec2f,
1276
- f32,
1277
- f32
1278
- ], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, amount, t) => {
1279
- "use gpu";
1280
- const amp = __tsover_mul(amount, .006);
1281
- const ox = __tsover_mul(__tsover_add(__tsover_mul(sin(__tsover_mul(t, 1.7)), .5), __tsover_mul(sin(__tsover_add(__tsover_mul(t, .9), 1.3)), .5)), amp);
1282
- const oy = __tsover_mul(__tsover_add(__tsover_mul(sin(__tsover_add(__tsover_mul(t, 1.3), .7)), .5), __tsover_mul(sin(__tsover_mul(t, 2.3)), .5)), amp);
1283
- const ang = __tsover_mul(__tsover_mul(sin(__tsover_mul(t, .6)), amount), .004);
1284
- const c = cos(ang);
1285
- const s = sin(ang);
1286
- const p = uv.sub(vec2f(.5, .5));
1287
- const rx = __tsover_sub(__tsover_mul(p.x, c), __tsover_mul(p.y, s));
1288
- const ry = __tsover_add(__tsover_mul(p.x, s), __tsover_mul(p.y, c));
1289
- return vec2f(__tsover_add(__tsover_add(rx, .5), ox), __tsover_add(__tsover_add(ry, .5), oy));
1290
- }), {
1291
- v: 2,
1292
- name: void 0,
1293
- ast: {
1294
- "params": [
1295
- {
1296
- "type": "i",
1297
- "name": "uv"
1298
- },
1299
- {
1300
- "type": "i",
1301
- "name": "amount"
1302
- },
1303
- {
1304
- "type": "i",
1305
- "name": "t"
1306
- }
1307
- ],
1308
- "body": [0, [
1309
- [
1310
- 13,
1311
- "amp",
1312
- [
1313
- 1,
1314
- "amount",
1315
- "*",
1316
- [5, "0.006"]
1317
- ]
1318
- ],
1319
- [
1320
- 13,
1321
- "ox",
1322
- [
1323
- 1,
1324
- [
1325
- 1,
1326
- [
1327
- 1,
1328
- [
1329
- 6,
1330
- "std.sin",
1331
- [[
1332
- 1,
1333
- "t",
1334
- "*",
1335
- [5, "1.7"]
1336
- ]]
1337
- ],
1338
- "*",
1339
- [5, "0.5"]
1340
- ],
1341
- "+",
1342
- [
1343
- 1,
1344
- [
1345
- 6,
1346
- "std.sin",
1347
- [[
1348
- 1,
1349
- [
1350
- 1,
1351
- "t",
1352
- "*",
1353
- [5, "0.9"]
1354
- ],
1355
- "+",
1356
- [5, "1.3"]
1357
- ]]
1358
- ],
1359
- "*",
1360
- [5, "0.5"]
1361
- ]
1362
- ],
1363
- "*",
1364
- "amp"
1365
- ]
1366
- ],
1367
- [
1368
- 13,
1369
- "oy",
1370
- [
1371
- 1,
1372
- [
1373
- 1,
1374
- [
1375
- 1,
1376
- [
1377
- 6,
1378
- "std.sin",
1379
- [[
1380
- 1,
1381
- [
1382
- 1,
1383
- "t",
1384
- "*",
1385
- [5, "1.3"]
1386
- ],
1387
- "+",
1388
- [5, "0.7"]
1389
- ]]
1390
- ],
1391
- "*",
1392
- [5, "0.5"]
1393
- ],
1394
- "+",
1395
- [
1396
- 1,
1397
- [
1398
- 6,
1399
- "std.sin",
1400
- [[
1401
- 1,
1402
- "t",
1403
- "*",
1404
- [5, "2.3"]
1405
- ]]
1406
- ],
1407
- "*",
1408
- [5, "0.5"]
1409
- ]
1410
- ],
1411
- "*",
1412
- "amp"
1413
- ]
1414
- ],
1415
- [
1416
- 13,
1417
- "ang",
1418
- [
1419
- 1,
1420
- [
1421
- 1,
1422
- [
1423
- 6,
1424
- "std.sin",
1425
- [[
1426
- 1,
1427
- "t",
1428
- "*",
1429
- [5, "0.6"]
1430
- ]]
1431
- ],
1432
- "*",
1433
- "amount"
1434
- ],
1435
- "*",
1436
- [5, "0.004"]
1437
- ]
1438
- ],
1439
- [
1440
- 13,
1441
- "c",
1442
- [
1443
- 6,
1444
- "std.cos",
1445
- ["ang"]
1446
- ]
1447
- ],
1448
- [
1449
- 13,
1450
- "s",
1451
- [
1452
- 6,
1453
- "std.sin",
1454
- ["ang"]
1455
- ]
1456
- ],
1457
- [
1458
- 13,
1459
- "p",
1460
- [
1461
- 6,
1462
- [
1463
- 7,
1464
- "uv",
1465
- "sub"
1466
- ],
1467
- [[
1468
- 6,
1469
- "d.vec2f",
1470
- [[5, "0.5"], [5, "0.5"]]
1471
- ]]
1472
- ]
1473
- ],
1474
- [
1475
- 13,
1476
- "rx",
1477
- [
1478
- 1,
1479
- [
1480
- 1,
1481
- [
1482
- 7,
1483
- "p",
1484
- "x"
1485
- ],
1486
- "*",
1487
- "c"
1488
- ],
1489
- "-",
1490
- [
1491
- 1,
1492
- [
1493
- 7,
1494
- "p",
1495
- "y"
1496
- ],
1497
- "*",
1498
- "s"
1499
- ]
1500
- ]
1501
- ],
1502
- [
1503
- 13,
1504
- "ry",
1505
- [
1506
- 1,
1507
- [
1508
- 1,
1509
- [
1510
- 7,
1511
- "p",
1512
- "x"
1513
- ],
1514
- "*",
1515
- "s"
1516
- ],
1517
- "+",
1518
- [
1519
- 1,
1520
- [
1521
- 7,
1522
- "p",
1523
- "y"
1524
- ],
1525
- "*",
1526
- "c"
1527
- ]
1528
- ]
1529
- ],
1530
- [10, [
1531
- 6,
1532
- "d.vec2f",
1533
- [[
1534
- 1,
1535
- [
1536
- 1,
1537
- "rx",
1538
- "+",
1539
- [5, "0.5"]
1540
- ],
1541
- "+",
1542
- "ox"
1543
- ], [
1544
- 1,
1545
- [
1546
- 1,
1547
- "ry",
1548
- "+",
1549
- [5, "0.5"]
1550
- ],
1551
- "+",
1552
- "oy"
1553
- ]]
1554
- ]]
1555
- ]]
1556
- },
1557
- externals: {
1558
- "std.sin": () => sin,
1559
- "std.cos": () => cos,
1560
- "d.vec2f": () => vec2f
1561
- }
1562
- }) && $.f)({})).$name("swayUV");
1563
- function frameSway(slots) {
1564
- return (params) => {
1565
- let acc = 0;
1566
- params.onBeforeRender(({ deltaTime }) => {
1567
- const w = params.getCpuValue(slots.amount.name) ?? 0;
1568
- acc += deltaTime * (w > 0 ? 1 : 0);
1569
- params.setExtraField(slots.field, acc);
1570
- });
1571
- return call(swayUV, "swayUV", [
1572
- params.ctx.uv,
1573
- params.uniforms[slots.amount.name],
1574
- params.uniforms[slots.field]
1575
- ]);
1576
- };
1577
- }
1578
- var BOKEH_DEG_TO_RAD = DEG_TO_RAD;
1579
- var BOKEH_GATHER_FORMAT = "rgba16float";
1580
- function apertureTable(opts, getCpuValue, tapsUniform) {
1581
- let key = "";
1582
- return () => {
1583
- const shape = getCpuValue(opts.shape.name) ?? "blades";
1584
- const count = getCpuValue(opts.blades.name) ?? 6;
1585
- const next = `${shape}|${count}`;
1586
- if (next === key) return;
1587
- key = next;
1588
- tapsUniform.write(generateBokehTaps(shape, count, 100).map((tap) => vec4f(tap.x, tap.y, tap.rim, 0)));
1589
- };
1590
- }
1591
- function bokehDefocus(opts) {
1592
- return {
1593
- compute: (params) => {
1594
- const { childNode, gpu, convertToTexture, registerComputeTexture, getCpuValue, getMapInfo, onCleanup, onResize, dimensions } = params;
1595
- if (!childNode) return null;
1596
- const root = gpu?.root;
1597
- if (!root) return null;
1598
- const childTexture = convertToTexture(childNode);
1599
- let curWidth = Math.max(1, Math.round(dimensions.width));
1600
- let curHeight = Math.max(1, Math.round(dimensions.height));
1601
- const LONG_EDGE = Math.max(DEFAULT_COMPUTE_WIDTH, 640);
1602
- const aspect = curHeight > 0 ? curWidth / curHeight : 1;
1603
- const computeWidth = Math.max(8, aspect >= 1 ? LONG_EDGE : Math.round(LONG_EDGE * aspect));
1604
- const computeHeight = Math.max(8, aspect >= 1 ? Math.round(LONG_EDGE / aspect) : LONG_EDGE);
1605
- const outputTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
1606
- size: [computeWidth, computeHeight],
1607
- format: BOKEH_GATHER_FORMAT
1608
- }).$usage("storage", "sampled"), "outputTex");
1609
- onCleanup(() => outputTex.destroy());
1610
- const blurredTexture = registerComputeTexture(outputTex);
1611
- onResize(({ width, height }) => {
1612
- curWidth = Math.max(1, Math.round(width));
1613
- curHeight = Math.max(1, Math.round(height));
1614
- });
1615
- const readLook = () => {
1616
- const rot = (getCpuValue(opts.rotation.name) ?? 0) * BOKEH_DEG_TO_RAD;
1617
- return {
1618
- highlightGain: getCpuValue(opts.gain.name) ?? 4,
1619
- highlightThreshold: getCpuValue(opts.threshold.name) ?? .6,
1620
- rotCos: Math.cos(rot),
1621
- rotSin: Math.sin(rot),
1622
- chromaticFringe: getCpuValue(opts.fringe.name) ?? .2
1623
- };
1624
- };
1625
- const mapInfo = getMapInfo(opts.radius.name);
1626
- if (mapInfo) {
1627
- const graph$1 = buildBokehMapGraph(computeWidth, computeHeight, 100, mapInfo.channel);
1628
- const kernelParams$1 = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(graph$1.Params), "kernelParams");
1629
- const tapsUniform$1 = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(graph$1.TapArray), "tapsUniform");
1630
- const ensureTaps$1 = apertureTable({
1631
- shape: opts.shape,
1632
- blades: opts.blades
1633
- }, getCpuValue, tapsUniform$1);
1634
- let bokehPass$1 = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
1635
- "use gpu";
1636
- graph$1.kernel(cx, cy);
1637
- }), {
1638
- v: 2,
1639
- name: void 0,
1640
- ast: {
1641
- "params": [{
1642
- "type": "i",
1643
- "name": "cx"
1644
- }, {
1645
- "type": "i",
1646
- "name": "cy"
1647
- }],
1648
- "body": [0, [[
1649
- 6,
1650
- "graph.kernel",
1651
- ["cx", "cy"]
1652
- ]]]
1653
- },
1654
- externals: { "graph.kernel": () => graph$1.kernel }
1655
- }) && $.f)({}), { size: [computeWidth, computeHeight] });
1656
- return {
1657
- outputs: { blurredTexture },
1658
- bindInputs: (resolve) => {
1659
- const src = resolve(childTexture.key);
1660
- const mapSrc = resolve(mapInfo.sourceTexture.key);
1661
- if (!src || !mapSrc) return;
1662
- const bindGroup = root.createBindGroup(graph$1.layout, {
1663
- input: src.texture,
1664
- source: mapSrc.texture,
1665
- output: outputTex,
1666
- params: kernelParams$1.buffer,
1667
- taps: tapsUniform$1.buffer
1668
- });
1669
- bokehPass$1 = bokehPass$1.with(bindGroup);
1670
- },
1671
- getComputeNodes: () => {
1672
- ensureTaps$1();
1673
- const w = mapInfo.window();
1674
- kernelParams$1.write({
1675
- ...readLook(),
1676
- inputWidth: curWidth,
1677
- inputHeight: curHeight,
1678
- inputMin: w.inputMin,
1679
- inputMax: w.inputMax,
1680
- outputMin: w.outputMin,
1681
- outputMax: w.outputMax,
1682
- curve: w.curve
1683
- });
1684
- return [bokehPass$1];
1685
- }
1686
- };
1687
- }
1688
- const graph = buildBokehGraph(computeWidth, computeHeight, 100);
1689
- const kernelParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(graph.Params), "kernelParams");
1690
- const tapsUniform = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createUniform(graph.TapArray), "tapsUniform");
1691
- const ensureTaps = apertureTable({
1692
- shape: opts.shape,
1693
- blades: opts.blades
1694
- }, getCpuValue, tapsUniform);
1695
- let bokehPass = createGuardedCompute(root, /* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((cx, cy) => {
1696
- "use gpu";
1697
- graph.kernel(cx, cy);
1698
- }), {
1699
- v: 2,
1700
- name: void 0,
1701
- ast: {
1702
- "params": [{
1703
- "type": "i",
1704
- "name": "cx"
1705
- }, {
1706
- "type": "i",
1707
- "name": "cy"
1708
- }],
1709
- "body": [0, [[
1710
- 6,
1711
- "graph.kernel",
1712
- ["cx", "cy"]
1713
- ]]]
1714
- },
1715
- externals: { "graph.kernel": () => graph.kernel }
1716
- }) && $.f)({}), { size: [computeWidth, computeHeight] });
1717
- return {
1718
- outputs: { blurredTexture },
1719
- bindInputs: (resolve) => {
1720
- const src = resolve(childTexture.key);
1721
- if (!src) return;
1722
- const bindGroup = root.createBindGroup(graph.layout, {
1723
- input: src.texture,
1724
- output: outputTex,
1725
- params: kernelParams.buffer,
1726
- taps: tapsUniform.buffer
1727
- });
1728
- bokehPass = bokehPass.with(bindGroup);
1729
- },
1730
- getComputeNodes: () => {
1731
- ensureTaps();
1732
- const radius = getCpuValue(opts.radius.name) ?? 50;
1733
- kernelParams.write({
1734
- radius: bokehRadiusToPixels(radius),
1735
- ...readLook(),
1736
- inputWidth: curWidth,
1737
- inputHeight: curHeight
1738
- });
1739
- return [bokehPass];
1740
- }
1741
- };
1742
- },
1743
- gpu: { fragment: ({ childNode, computeOutputs, ctx, convertToTexture }) => {
1744
- if (!childNode) return ZERO;
1745
- const blurred = computeOutputs?.blurredTexture;
1746
- if (!blurred) return call(unpremultiplyAlpha, "unpremultiplyAlpha", [convertToTexture(childNode).sample(ctx.uv)]);
1747
- return call(unpremultiplyAlpha, "unpremultiplyAlpha", [blurred.sample(ctx.uv)]);
1748
- } }
1749
- };
1750
- }
1751
- export { planarReflection as A, shadowOffset as B, motionBlur as C, peelFrame as D, peelCompose as E, rimLit as F, tiltShift as G, silhouetteCoverage as H, scanlines as I, vignetteOverlay as K, scatter as L, refractedTaps as M, revealShadow as N, phosphorMask as O, rgbSplit as P, screenedBloom as R, mirrorAcrossRow as S, overhangShadow as T, sphereFrame as U, sharpen as V, tapeWarp as W, frameSway as _, bokehDefocus as a, glitchFrame as b, chromaSmearTaps as c, curlShading as d, curlSheen as f, fluteHighlight as g, fluteFrame as h, blurPath as i, progressiveBlur as j, pixelate as k, colorBarFills as l, distortedScanlines as m, beatPulse as n, channelBlur as o, depthRampBlur as p, bloom as r, childTap as s, adjust as t, crispTap as u, gatherStack as v, opaque as w, glitchRgbSplit as x, gaussianBlur as y, shadowComposite as z };