@nodetool-ai/gpu 0.8.1

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 (359) hide show
  1. package/README.md +52 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/blend/blendModes.d.ts +67 -0
  4. package/dist/blend/blendModes.d.ts.map +1 -0
  5. package/dist/blend/blendModes.js +80 -0
  6. package/dist/blend/blendModes.js.map +1 -0
  7. package/dist/blend/index.d.ts +10 -0
  8. package/dist/blend/index.d.ts.map +1 -0
  9. package/dist/blend/index.js +10 -0
  10. package/dist/blend/index.js.map +1 -0
  11. package/dist/blend/wgsl.d.ts +16 -0
  12. package/dist/blend/wgsl.d.ts.map +1 -0
  13. package/dist/blend/wgsl.js +85 -0
  14. package/dist/blend/wgsl.js.map +1 -0
  15. package/dist/compositor/compositor.d.ts +112 -0
  16. package/dist/compositor/compositor.d.ts.map +1 -0
  17. package/dist/compositor/compositor.js +353 -0
  18. package/dist/compositor/compositor.js.map +1 -0
  19. package/dist/compositor/headless.d.ts +47 -0
  20. package/dist/compositor/headless.d.ts.map +1 -0
  21. package/dist/compositor/headless.js +158 -0
  22. package/dist/compositor/headless.js.map +1 -0
  23. package/dist/compositor/index.d.ts +8 -0
  24. package/dist/compositor/index.d.ts.map +1 -0
  25. package/dist/compositor/index.js +8 -0
  26. package/dist/compositor/index.js.map +1 -0
  27. package/dist/compositor/shaders.d.ts +24 -0
  28. package/dist/compositor/shaders.d.ts.map +1 -0
  29. package/dist/compositor/shaders.js +241 -0
  30. package/dist/compositor/shaders.js.map +1 -0
  31. package/dist/compositor/transform.d.ts +49 -0
  32. package/dist/compositor/transform.d.ts.map +1 -0
  33. package/dist/compositor/transform.js +74 -0
  34. package/dist/compositor/transform.js.map +1 -0
  35. package/dist/context.d.ts +108 -0
  36. package/dist/context.d.ts.map +1 -0
  37. package/dist/context.js +205 -0
  38. package/dist/context.js.map +1 -0
  39. package/dist/debug/premulValidator.d.ts +85 -0
  40. package/dist/debug/premulValidator.d.ts.map +1 -0
  41. package/dist/debug/premulValidator.js +239 -0
  42. package/dist/debug/premulValidator.js.map +1 -0
  43. package/dist/executor.d.ts +74 -0
  44. package/dist/executor.d.ts.map +1 -0
  45. package/dist/executor.js +413 -0
  46. package/dist/executor.js.map +1 -0
  47. package/dist/fullscreenQuad.d.ts +11 -0
  48. package/dist/fullscreenQuad.d.ts.map +1 -0
  49. package/dist/fullscreenQuad.js +31 -0
  50. package/dist/fullscreenQuad.js.map +1 -0
  51. package/dist/index.d.ts +16 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +16 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/module.d.ts +162 -0
  56. package/dist/module.d.ts.map +1 -0
  57. package/dist/module.js +100 -0
  58. package/dist/module.js.map +1 -0
  59. package/dist/node.d.ts +38 -0
  60. package/dist/node.d.ts.map +1 -0
  61. package/dist/node.js +140 -0
  62. package/dist/node.js.map +1 -0
  63. package/dist/pool.d.ts +30 -0
  64. package/dist/pool.d.ts.map +1 -0
  65. package/dist/pool.js +33 -0
  66. package/dist/pool.js.map +1 -0
  67. package/dist/recipe.d.ts +148 -0
  68. package/dist/recipe.d.ts.map +1 -0
  69. package/dist/recipe.js +181 -0
  70. package/dist/recipe.js.map +1 -0
  71. package/dist/registry.d.ts +49 -0
  72. package/dist/registry.d.ts.map +1 -0
  73. package/dist/registry.js +100 -0
  74. package/dist/registry.js.map +1 -0
  75. package/dist/shaders/_canary/passthrough/v1/module.d.ts +13 -0
  76. package/dist/shaders/_canary/passthrough/v1/module.d.ts.map +1 -0
  77. package/dist/shaders/_canary/passthrough/v1/module.js +71 -0
  78. package/dist/shaders/_canary/passthrough/v1/module.js.map +1 -0
  79. package/dist/shaders/alpha/premulToStraight/v1/module.d.ts +16 -0
  80. package/dist/shaders/alpha/premulToStraight/v1/module.d.ts.map +1 -0
  81. package/dist/shaders/alpha/premulToStraight/v1/module.js +62 -0
  82. package/dist/shaders/alpha/premulToStraight/v1/module.js.map +1 -0
  83. package/dist/shaders/alpha/straightToPremul/v1/module.d.ts +19 -0
  84. package/dist/shaders/alpha/straightToPremul/v1/module.d.ts.map +1 -0
  85. package/dist/shaders/alpha/straightToPremul/v1/module.js +61 -0
  86. package/dist/shaders/alpha/straightToPremul/v1/module.js.map +1 -0
  87. package/dist/shaders/color/brightnessContrast/v1/module.d.ts +17 -0
  88. package/dist/shaders/color/brightnessContrast/v1/module.d.ts.map +1 -0
  89. package/dist/shaders/color/brightnessContrast/v1/module.js +84 -0
  90. package/dist/shaders/color/brightnessContrast/v1/module.js.map +1 -0
  91. package/dist/shaders/color/cdl/v1/module.d.ts +35 -0
  92. package/dist/shaders/color/cdl/v1/module.d.ts.map +1 -0
  93. package/dist/shaders/color/cdl/v1/module.js +106 -0
  94. package/dist/shaders/color/cdl/v1/module.js.map +1 -0
  95. package/dist/shaders/color/channelMerge/v1/module.d.ts +22 -0
  96. package/dist/shaders/color/channelMerge/v1/module.d.ts.map +1 -0
  97. package/dist/shaders/color/channelMerge/v1/module.js +101 -0
  98. package/dist/shaders/color/channelMerge/v1/module.js.map +1 -0
  99. package/dist/shaders/color/channelShuffle/v1/module.d.ts +29 -0
  100. package/dist/shaders/color/channelShuffle/v1/module.d.ts.map +1 -0
  101. package/dist/shaders/color/channelShuffle/v1/module.js +94 -0
  102. package/dist/shaders/color/channelShuffle/v1/module.js.map +1 -0
  103. package/dist/shaders/color/channelSplit/v1/module.d.ts +18 -0
  104. package/dist/shaders/color/channelSplit/v1/module.d.ts.map +1 -0
  105. package/dist/shaders/color/channelSplit/v1/module.js +90 -0
  106. package/dist/shaders/color/channelSplit/v1/module.js.map +1 -0
  107. package/dist/shaders/color/colorBalance/v1/module.d.ts +18 -0
  108. package/dist/shaders/color/colorBalance/v1/module.d.ts.map +1 -0
  109. package/dist/shaders/color/colorBalance/v1/module.js +86 -0
  110. package/dist/shaders/color/colorBalance/v1/module.js.map +1 -0
  111. package/dist/shaders/color/cubeLut/v1/module.d.ts +14 -0
  112. package/dist/shaders/color/cubeLut/v1/module.d.ts.map +1 -0
  113. package/dist/shaders/color/cubeLut/v1/module.js +78 -0
  114. package/dist/shaders/color/cubeLut/v1/module.js.map +1 -0
  115. package/dist/shaders/color/curves/v1/module.d.ts +31 -0
  116. package/dist/shaders/color/curves/v1/module.d.ts.map +1 -0
  117. package/dist/shaders/color/curves/v1/module.js +102 -0
  118. package/dist/shaders/color/curves/v1/module.js.map +1 -0
  119. package/dist/shaders/color/exposure/v1/module.d.ts +15 -0
  120. package/dist/shaders/color/exposure/v1/module.d.ts.map +1 -0
  121. package/dist/shaders/color/exposure/v1/module.js +78 -0
  122. package/dist/shaders/color/exposure/v1/module.js.map +1 -0
  123. package/dist/shaders/color/exposureTone/v1/module.d.ts +28 -0
  124. package/dist/shaders/color/exposureTone/v1/module.d.ts.map +1 -0
  125. package/dist/shaders/color/exposureTone/v1/module.js +107 -0
  126. package/dist/shaders/color/exposureTone/v1/module.js.map +1 -0
  127. package/dist/shaders/color/filmLook/v1/module.d.ts +28 -0
  128. package/dist/shaders/color/filmLook/v1/module.d.ts.map +1 -0
  129. package/dist/shaders/color/filmLook/v1/module.js +103 -0
  130. package/dist/shaders/color/filmLook/v1/module.js.map +1 -0
  131. package/dist/shaders/color/grade/v1/module.d.ts +35 -0
  132. package/dist/shaders/color/grade/v1/module.d.ts.map +1 -0
  133. package/dist/shaders/color/grade/v1/module.js +182 -0
  134. package/dist/shaders/color/grade/v1/module.js.map +1 -0
  135. package/dist/shaders/color/grayscale/v1/module.d.ts +14 -0
  136. package/dist/shaders/color/grayscale/v1/module.d.ts.map +1 -0
  137. package/dist/shaders/color/grayscale/v1/module.js +79 -0
  138. package/dist/shaders/color/grayscale/v1/module.js.map +1 -0
  139. package/dist/shaders/color/hsb/v1/module.d.ts +20 -0
  140. package/dist/shaders/color/hsb/v1/module.d.ts.map +1 -0
  141. package/dist/shaders/color/hsb/v1/module.js +131 -0
  142. package/dist/shaders/color/hsb/v1/module.js.map +1 -0
  143. package/dist/shaders/color/hslAdjust/v1/module.d.ts +30 -0
  144. package/dist/shaders/color/hslAdjust/v1/module.d.ts.map +1 -0
  145. package/dist/shaders/color/hslAdjust/v1/module.js +170 -0
  146. package/dist/shaders/color/hslAdjust/v1/module.js.map +1 -0
  147. package/dist/shaders/color/invert/v1/module.d.ts +15 -0
  148. package/dist/shaders/color/invert/v1/module.d.ts.map +1 -0
  149. package/dist/shaders/color/invert/v1/module.js +85 -0
  150. package/dist/shaders/color/invert/v1/module.js.map +1 -0
  151. package/dist/shaders/color/levels/v1/module.d.ts +33 -0
  152. package/dist/shaders/color/levels/v1/module.d.ts.map +1 -0
  153. package/dist/shaders/color/levels/v1/module.js +116 -0
  154. package/dist/shaders/color/levels/v1/module.js.map +1 -0
  155. package/dist/shaders/color/liftGammaGain/v1/module.d.ts +40 -0
  156. package/dist/shaders/color/liftGammaGain/v1/module.d.ts.map +1 -0
  157. package/dist/shaders/color/liftGammaGain/v1/module.js +114 -0
  158. package/dist/shaders/color/liftGammaGain/v1/module.js.map +1 -0
  159. package/dist/shaders/color/posterize/v1/module.d.ts +16 -0
  160. package/dist/shaders/color/posterize/v1/module.d.ts.map +1 -0
  161. package/dist/shaders/color/posterize/v1/module.js +80 -0
  162. package/dist/shaders/color/posterize/v1/module.js.map +1 -0
  163. package/dist/shaders/color/solarize/v1/module.d.ts +15 -0
  164. package/dist/shaders/color/solarize/v1/module.d.ts.map +1 -0
  165. package/dist/shaders/color/solarize/v1/module.js +83 -0
  166. package/dist/shaders/color/solarize/v1/module.js.map +1 -0
  167. package/dist/shaders/color/splitToning/v1/module.d.ts +26 -0
  168. package/dist/shaders/color/splitToning/v1/module.d.ts.map +1 -0
  169. package/dist/shaders/color/splitToning/v1/module.js +95 -0
  170. package/dist/shaders/color/splitToning/v1/module.js.map +1 -0
  171. package/dist/shaders/filters/blur/gaussian/v1/module.d.ts +23 -0
  172. package/dist/shaders/filters/blur/gaussian/v1/module.d.ts.map +1 -0
  173. package/dist/shaders/filters/blur/gaussian/v1/module.js +110 -0
  174. package/dist/shaders/filters/blur/gaussian/v1/module.js.map +1 -0
  175. package/dist/shaders/filters/blur/separable/v1/module.d.ts +18 -0
  176. package/dist/shaders/filters/blur/separable/v1/module.d.ts.map +1 -0
  177. package/dist/shaders/filters/blur/separable/v1/module.js +64 -0
  178. package/dist/shaders/filters/blur/separable/v1/module.js.map +1 -0
  179. package/dist/shaders/filters/convolve3x3/v1/module.d.ts +23 -0
  180. package/dist/shaders/filters/convolve3x3/v1/module.d.ts.map +1 -0
  181. package/dist/shaders/filters/convolve3x3/v1/module.js +128 -0
  182. package/dist/shaders/filters/convolve3x3/v1/module.js.map +1 -0
  183. package/dist/shaders/filters/glow/v1/module.d.ts +26 -0
  184. package/dist/shaders/filters/glow/v1/module.d.ts.map +1 -0
  185. package/dist/shaders/filters/glow/v1/module.js +102 -0
  186. package/dist/shaders/filters/glow/v1/module.js.map +1 -0
  187. package/dist/shaders/filters/grain/v1/module.d.ts +38 -0
  188. package/dist/shaders/filters/grain/v1/module.d.ts.map +1 -0
  189. package/dist/shaders/filters/grain/v1/module.js +110 -0
  190. package/dist/shaders/filters/grain/v1/module.js.map +1 -0
  191. package/dist/shaders/filters/pixelate/v1/module.d.ts +14 -0
  192. package/dist/shaders/filters/pixelate/v1/module.d.ts.map +1 -0
  193. package/dist/shaders/filters/pixelate/v1/module.js +76 -0
  194. package/dist/shaders/filters/pixelate/v1/module.js.map +1 -0
  195. package/dist/shaders/filters/sharpen/unsharpMask/v1/module.d.ts +17 -0
  196. package/dist/shaders/filters/sharpen/unsharpMask/v1/module.d.ts.map +1 -0
  197. package/dist/shaders/filters/sharpen/unsharpMask/v1/module.js +93 -0
  198. package/dist/shaders/filters/sharpen/unsharpMask/v1/module.js.map +1 -0
  199. package/dist/shaders/filters/threshold/v1/module.d.ts +17 -0
  200. package/dist/shaders/filters/threshold/v1/module.d.ts.map +1 -0
  201. package/dist/shaders/filters/threshold/v1/module.js +71 -0
  202. package/dist/shaders/filters/threshold/v1/module.js.map +1 -0
  203. package/dist/shaders/filters/vignette/v1/module.d.ts +18 -0
  204. package/dist/shaders/filters/vignette/v1/module.d.ts.map +1 -0
  205. package/dist/shaders/filters/vignette/v1/module.js +78 -0
  206. package/dist/shaders/filters/vignette/v1/module.js.map +1 -0
  207. package/dist/shaders/filters/visualFx/v1/module.d.ts +24 -0
  208. package/dist/shaders/filters/visualFx/v1/module.d.ts.map +1 -0
  209. package/dist/shaders/filters/visualFx/v1/module.js +210 -0
  210. package/dist/shaders/filters/visualFx/v1/module.js.map +1 -0
  211. package/dist/shaders/index.d.ts +86 -0
  212. package/dist/shaders/index.d.ts.map +1 -0
  213. package/dist/shaders/index.js +161 -0
  214. package/dist/shaders/index.js.map +1 -0
  215. package/dist/shaders/keyer/chromaKey/v1/module.d.ts +25 -0
  216. package/dist/shaders/keyer/chromaKey/v1/module.d.ts.map +1 -0
  217. package/dist/shaders/keyer/chromaKey/v1/module.js +111 -0
  218. package/dist/shaders/keyer/chromaKey/v1/module.js.map +1 -0
  219. package/dist/shaders/keyer/lumaKey/v1/module.d.ts +22 -0
  220. package/dist/shaders/keyer/lumaKey/v1/module.d.ts.map +1 -0
  221. package/dist/shaders/keyer/lumaKey/v1/module.js +89 -0
  222. package/dist/shaders/keyer/lumaKey/v1/module.js.map +1 -0
  223. package/dist/shaders/mask/apply/v1/module.d.ts +16 -0
  224. package/dist/shaders/mask/apply/v1/module.d.ts.map +1 -0
  225. package/dist/shaders/mask/apply/v1/module.js +79 -0
  226. package/dist/shaders/mask/apply/v1/module.js.map +1 -0
  227. package/dist/shaders/mask/fromImage/v1/module.d.ts +18 -0
  228. package/dist/shaders/mask/fromImage/v1/module.d.ts.map +1 -0
  229. package/dist/shaders/mask/fromImage/v1/module.js +99 -0
  230. package/dist/shaders/mask/fromImage/v1/module.js.map +1 -0
  231. package/dist/shaders/mask/invert/v1/module.d.ts +12 -0
  232. package/dist/shaders/mask/invert/v1/module.d.ts.map +1 -0
  233. package/dist/shaders/mask/invert/v1/module.js +57 -0
  234. package/dist/shaders/mask/invert/v1/module.js.map +1 -0
  235. package/dist/shaders/mixer/add/v1/module.d.ts +17 -0
  236. package/dist/shaders/mixer/add/v1/module.d.ts.map +1 -0
  237. package/dist/shaders/mixer/add/v1/module.js +73 -0
  238. package/dist/shaders/mixer/add/v1/module.js.map +1 -0
  239. package/dist/shaders/mixer/colorOverlay/v1/module.d.ts +26 -0
  240. package/dist/shaders/mixer/colorOverlay/v1/module.d.ts.map +1 -0
  241. package/dist/shaders/mixer/colorOverlay/v1/module.js +81 -0
  242. package/dist/shaders/mixer/colorOverlay/v1/module.js.map +1 -0
  243. package/dist/shaders/mixer/dropShadow/v1/module.d.ts +28 -0
  244. package/dist/shaders/mixer/dropShadow/v1/module.d.ts.map +1 -0
  245. package/dist/shaders/mixer/dropShadow/v1/module.js +104 -0
  246. package/dist/shaders/mixer/dropShadow/v1/module.js.map +1 -0
  247. package/dist/shaders/mixer/outline/v1/module.d.ts +27 -0
  248. package/dist/shaders/mixer/outline/v1/module.d.ts.map +1 -0
  249. package/dist/shaders/mixer/outline/v1/module.js +105 -0
  250. package/dist/shaders/mixer/outline/v1/module.js.map +1 -0
  251. package/dist/shaders/mixer/over/v1/module.d.ts +16 -0
  252. package/dist/shaders/mixer/over/v1/module.d.ts.map +1 -0
  253. package/dist/shaders/mixer/over/v1/module.js +71 -0
  254. package/dist/shaders/mixer/over/v1/module.js.map +1 -0
  255. package/dist/shaders/mixer/shadowCompose/v1/module.d.ts +26 -0
  256. package/dist/shaders/mixer/shadowCompose/v1/module.d.ts.map +1 -0
  257. package/dist/shaders/mixer/shadowCompose/v1/module.js +95 -0
  258. package/dist/shaders/mixer/shadowCompose/v1/module.js.map +1 -0
  259. package/dist/shaders/sources/angularGradient/v1/module.d.ts +18 -0
  260. package/dist/shaders/sources/angularGradient/v1/module.d.ts.map +1 -0
  261. package/dist/shaders/sources/angularGradient/v1/module.js +67 -0
  262. package/dist/shaders/sources/angularGradient/v1/module.js.map +1 -0
  263. package/dist/shaders/sources/checkerboard/v1/module.d.ts +19 -0
  264. package/dist/shaders/sources/checkerboard/v1/module.d.ts.map +1 -0
  265. package/dist/shaders/sources/checkerboard/v1/module.js +70 -0
  266. package/dist/shaders/sources/checkerboard/v1/module.js.map +1 -0
  267. package/dist/shaders/sources/diamondGradient/v1/module.d.ts +18 -0
  268. package/dist/shaders/sources/diamondGradient/v1/module.d.ts.map +1 -0
  269. package/dist/shaders/sources/diamondGradient/v1/module.js +61 -0
  270. package/dist/shaders/sources/diamondGradient/v1/module.js.map +1 -0
  271. package/dist/shaders/sources/gaussianNoise/v1/module.d.ts +21 -0
  272. package/dist/shaders/sources/gaussianNoise/v1/module.d.ts.map +1 -0
  273. package/dist/shaders/sources/gaussianNoise/v1/module.js +72 -0
  274. package/dist/shaders/sources/gaussianNoise/v1/module.js.map +1 -0
  275. package/dist/shaders/sources/linearGradient/v1/module.d.ts +21 -0
  276. package/dist/shaders/sources/linearGradient/v1/module.d.ts.map +1 -0
  277. package/dist/shaders/sources/linearGradient/v1/module.js +72 -0
  278. package/dist/shaders/sources/linearGradient/v1/module.js.map +1 -0
  279. package/dist/shaders/sources/radialGradient/v1/module.d.ts +18 -0
  280. package/dist/shaders/sources/radialGradient/v1/module.d.ts.map +1 -0
  281. package/dist/shaders/sources/radialGradient/v1/module.js +60 -0
  282. package/dist/shaders/sources/radialGradient/v1/module.js.map +1 -0
  283. package/dist/shaders/sources/solid/v1/module.d.ts +17 -0
  284. package/dist/shaders/sources/solid/v1/module.d.ts.map +1 -0
  285. package/dist/shaders/sources/solid/v1/module.js +49 -0
  286. package/dist/shaders/sources/solid/v1/module.js.map +1 -0
  287. package/dist/shaders/transform/affine/v1/module.d.ts +36 -0
  288. package/dist/shaders/transform/affine/v1/module.d.ts.map +1 -0
  289. package/dist/shaders/transform/affine/v1/module.js +94 -0
  290. package/dist/shaders/transform/affine/v1/module.js.map +1 -0
  291. package/dist/shaders/transform/cornerPin/v1/module.d.ts +40 -0
  292. package/dist/shaders/transform/cornerPin/v1/module.d.ts.map +1 -0
  293. package/dist/shaders/transform/cornerPin/v1/module.js +109 -0
  294. package/dist/shaders/transform/cornerPin/v1/module.js.map +1 -0
  295. package/dist/shaders/transform/crop/v1/module.d.ts +26 -0
  296. package/dist/shaders/transform/crop/v1/module.d.ts.map +1 -0
  297. package/dist/shaders/transform/crop/v1/module.js +82 -0
  298. package/dist/shaders/transform/crop/v1/module.js.map +1 -0
  299. package/dist/shaders/transform/displace/v1/module.d.ts +23 -0
  300. package/dist/shaders/transform/displace/v1/module.d.ts.map +1 -0
  301. package/dist/shaders/transform/displace/v1/module.js +95 -0
  302. package/dist/shaders/transform/displace/v1/module.js.map +1 -0
  303. package/dist/shaders/transform/mirror/v1/module.d.ts +14 -0
  304. package/dist/shaders/transform/mirror/v1/module.d.ts.map +1 -0
  305. package/dist/shaders/transform/mirror/v1/module.js +73 -0
  306. package/dist/shaders/transform/mirror/v1/module.js.map +1 -0
  307. package/dist/shaders/transform/offset/v1/module.d.ts +21 -0
  308. package/dist/shaders/transform/offset/v1/module.d.ts.map +1 -0
  309. package/dist/shaders/transform/offset/v1/module.js +88 -0
  310. package/dist/shaders/transform/offset/v1/module.js.map +1 -0
  311. package/dist/shaders/transform/pad/v1/module.d.ts +26 -0
  312. package/dist/shaders/transform/pad/v1/module.d.ts.map +1 -0
  313. package/dist/shaders/transform/pad/v1/module.js +95 -0
  314. package/dist/shaders/transform/pad/v1/module.js.map +1 -0
  315. package/dist/shaders/transform/polarRemap/v1/module.d.ts +20 -0
  316. package/dist/shaders/transform/polarRemap/v1/module.d.ts.map +1 -0
  317. package/dist/shaders/transform/polarRemap/v1/module.js +95 -0
  318. package/dist/shaders/transform/polarRemap/v1/module.js.map +1 -0
  319. package/dist/shaders/transform/resize/v1/module.d.ts +20 -0
  320. package/dist/shaders/transform/resize/v1/module.d.ts.map +1 -0
  321. package/dist/shaders/transform/resize/v1/module.js +116 -0
  322. package/dist/shaders/transform/resize/v1/module.js.map +1 -0
  323. package/dist/shaders/transform/rotate90/v1/module.d.ts +25 -0
  324. package/dist/shaders/transform/rotate90/v1/module.d.ts.map +1 -0
  325. package/dist/shaders/transform/rotate90/v1/module.js +90 -0
  326. package/dist/shaders/transform/rotate90/v1/module.js.map +1 -0
  327. package/dist/shaders/transform/spherize/v1/module.d.ts +21 -0
  328. package/dist/shaders/transform/spherize/v1/module.d.ts.map +1 -0
  329. package/dist/shaders/transform/spherize/v1/module.js +94 -0
  330. package/dist/shaders/transform/spherize/v1/module.js.map +1 -0
  331. package/dist/shaders/transform/tile/v1/module.d.ts +22 -0
  332. package/dist/shaders/transform/tile/v1/module.d.ts.map +1 -0
  333. package/dist/shaders/transform/tile/v1/module.js +89 -0
  334. package/dist/shaders/transform/tile/v1/module.js.map +1 -0
  335. package/dist/shared/lumaWgsl.d.ts +14 -0
  336. package/dist/shared/lumaWgsl.d.ts.map +1 -0
  337. package/dist/shared/lumaWgsl.js +18 -0
  338. package/dist/shared/lumaWgsl.js.map +1 -0
  339. package/dist/shared/premulWgsl.d.ts +46 -0
  340. package/dist/shared/premulWgsl.d.ts.map +1 -0
  341. package/dist/shared/premulWgsl.js +90 -0
  342. package/dist/shared/premulWgsl.js.map +1 -0
  343. package/dist/texture.d.ts +54 -0
  344. package/dist/texture.d.ts.map +1 -0
  345. package/dist/texture.js +70 -0
  346. package/dist/texture.js.map +1 -0
  347. package/dist/types.d.ts +103 -0
  348. package/dist/types.d.ts.map +1 -0
  349. package/dist/types.js +8 -0
  350. package/dist/types.js.map +1 -0
  351. package/dist/validate/wgslLinearity.d.ts +86 -0
  352. package/dist/validate/wgslLinearity.d.ts.map +1 -0
  353. package/dist/validate/wgslLinearity.js +298 -0
  354. package/dist/validate/wgslLinearity.js.map +1 -0
  355. package/dist/webgpu/index.d.ts +11 -0
  356. package/dist/webgpu/index.d.ts.map +1 -0
  357. package/dist/webgpu/index.js +11 -0
  358. package/dist/webgpu/index.js.map +1 -0
  359. package/package.json +85 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * `sources.checkerboard@1` — two-color checkerboard pattern.
3
+ *
4
+ * `cellSize` is in output pixels. Zero-input source, host-specified
5
+ * dimensions — the host picks the output resolution; cell count follows
6
+ * directly from that and `cellSize`.
7
+ */
8
+ import tgpu from "typegpu";
9
+ import * as d from "typegpu/data";
10
+ import { defineModule } from "../../../../module.js";
11
+ export const CheckerboardParams = d.struct({
12
+ colorA: d.vec4f,
13
+ colorB: d.vec4f,
14
+ cellSize: d.f32
15
+ });
16
+ const layout = tgpu.bindGroupLayout({
17
+ params: { uniform: CheckerboardParams }
18
+ });
19
+ export const sourcesCheckerboardV1 = defineModule({
20
+ id: "sources.checkerboard",
21
+ version: 1,
22
+ surface: "internal",
23
+ category: "sources",
24
+ linearity: "source",
25
+ kind: "fragment",
26
+ params: CheckerboardParams,
27
+ paramDefaults: {
28
+ colorA: d.vec4f(0.8, 0.8, 0.8, 1),
29
+ colorB: d.vec4f(0.2, 0.2, 0.2, 1),
30
+ cellSize: 16
31
+ },
32
+ paramUi: {
33
+ colorA: { label: "Color A" },
34
+ colorB: { label: "Color B" },
35
+ cellSize: { min: 1, max: 256, step: 1, label: "Cell size", notes: "pixels" }
36
+ },
37
+ layout,
38
+ wgsl: /* wgsl */ `
39
+ struct Out {
40
+ @builtin(position) position: vec4f,
41
+ @location(0) uv: vec2f,
42
+ };
43
+
44
+ @fragment
45
+ fn fs_main(in: Out) -> @location(0) vec4f {
46
+ let p = layout.$.params;
47
+ let cell = max(1.0, p.cellSize);
48
+ let coord = vec2i(in.position.xy / cell);
49
+ let parity = (coord.x + coord.y) % 2;
50
+ // The colour params arrive premultiplied (hosts premultiply at the colour
51
+ // picker boundary), so return them as-is. Re-multiplying by alpha here
52
+ // would darken translucent cell colours to rgb*a².
53
+ if (parity == 0) {
54
+ return p.colorA;
55
+ }
56
+ return p.colorB;
57
+ }
58
+ `,
59
+ io: {
60
+ inputs: {},
61
+ output: {
62
+ colorSpace: "linear",
63
+ alpha: "premultiplied",
64
+ format: "rgba8unorm",
65
+ dimensions: "host-specified"
66
+ },
67
+ rod: "explicit"
68
+ }
69
+ });
70
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/checkerboard/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,KAAK;IACf,MAAM,EAAE,CAAC,CAAC,KAAK;IACf,QAAQ,EAAE,CAAC,CAAC,GAAG;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;IAChD,EAAE,EAAE,sBAAsB;IAC1B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,kBAAkB;IAC1B,aAAa,EAAE;QACb,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QACjC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QACjC,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC5B,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC5B,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;KAC7E;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;CAoBlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `sources.diamondGradient@1` — two-color diamond gradient.
3
+ *
4
+ * Uses Manhattan distance from center for a diamond-shaped ramp. Zero-input
5
+ * source, host-specified dimensions.
6
+ */
7
+ import * as d from "typegpu/data";
8
+ export declare const DiamondGradientParams: d.WgslStruct<{
9
+ colorInner: d.Vec4f;
10
+ colorOuter: d.Vec4f;
11
+ radius: d.F32;
12
+ }>;
13
+ export declare const sourcesDiamondGradientV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
14
+ colorInner: d.Vec4f;
15
+ colorOuter: d.Vec4f;
16
+ radius: d.F32;
17
+ }>>;
18
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/sources/diamondGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,qBAAqB;;;;EAIhC,CAAC;AAMH,eAAO,MAAM,wBAAwB;;;;GA0CnC,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * `sources.diamondGradient@1` — two-color diamond gradient.
3
+ *
4
+ * Uses Manhattan distance from center for a diamond-shaped ramp. Zero-input
5
+ * source, host-specified dimensions.
6
+ */
7
+ import tgpu from "typegpu";
8
+ import * as d from "typegpu/data";
9
+ import { defineModule } from "../../../../module.js";
10
+ export const DiamondGradientParams = d.struct({
11
+ colorInner: d.vec4f,
12
+ colorOuter: d.vec4f,
13
+ radius: d.f32
14
+ });
15
+ const layout = tgpu.bindGroupLayout({
16
+ params: { uniform: DiamondGradientParams }
17
+ });
18
+ export const sourcesDiamondGradientV1 = defineModule({
19
+ id: "sources.diamondGradient",
20
+ version: 1,
21
+ surface: "internal",
22
+ category: "sources",
23
+ linearity: "source",
24
+ kind: "fragment",
25
+ params: DiamondGradientParams,
26
+ paramDefaults: {
27
+ colorInner: d.vec4f(0, 0, 0, 1),
28
+ colorOuter: d.vec4f(1, 1, 1, 1),
29
+ radius: 0.5
30
+ },
31
+ paramUi: {
32
+ colorInner: { label: "Inner color" },
33
+ colorOuter: { label: "Outer color" },
34
+ radius: { min: 0.01, max: 1.5, step: 0.01, label: "Radius" }
35
+ },
36
+ layout,
37
+ wgsl: /* wgsl */ `
38
+ @fragment
39
+ fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {
40
+ let p = layout.$.params;
41
+ let d = abs(uv - vec2f(0.5, 0.5));
42
+ let r = max(p.radius, 0.0001);
43
+ let t = clamp((d.x + d.y) / r, 0.0, 1.0);
44
+ // The colour params arrive premultiplied (hosts premultiply at the colour
45
+ // picker boundary); a mix of premultiplied endpoints stays premultiplied.
46
+ // Re-multiplying by alpha here would darken translucent colours to rgb*a².
47
+ return mix(p.colorInner, p.colorOuter, t);
48
+ }
49
+ `,
50
+ io: {
51
+ inputs: {},
52
+ output: {
53
+ colorSpace: "linear",
54
+ alpha: "premultiplied",
55
+ format: "rgba8unorm",
56
+ dimensions: "host-specified"
57
+ },
58
+ rod: "explicit"
59
+ }
60
+ });
61
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/diamondGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,KAAK;IACnB,UAAU,EAAE,CAAC,CAAC,KAAK;IACnB,MAAM,EAAE,CAAC,CAAC,GAAG;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC;IACnD,EAAE,EAAE,yBAAyB;IAC7B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,qBAAqB;IAC7B,aAAa,EAAE;QACb,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG;KACZ;IACD,OAAO,EAAE;QACP,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;QACpC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;QACpC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;KAC7D;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;;;;;;;;CAYlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `sources.gaussianNoise@1` — fill the output with per-channel Gaussian noise.
3
+ *
4
+ * Zero-input source (host-specified dimensions). Each channel gets an
5
+ * independent sample drawn via the Box-Muller transform from a hash-based RNG
6
+ * keyed by pixel position + `seed`, then mapped to [0,1] as
7
+ * `((mean + g*stddev) * 128 + 128) / 255` (matching the legacy CPU node). Pass a
8
+ * fresh `seed` per run for run-to-run variation. Output is opaque.
9
+ */
10
+ import * as d from "typegpu/data";
11
+ export declare const GaussianNoiseParams: d.WgslStruct<{
12
+ mean: d.F32;
13
+ stddev: d.F32;
14
+ seed: d.F32;
15
+ }>;
16
+ export declare const sourcesGaussianNoiseV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
17
+ mean: d.F32;
18
+ stddev: d.F32;
19
+ seed: d.F32;
20
+ }>>;
21
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/sources/gaussianNoise/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAMH,eAAO,MAAM,sBAAsB;;;;GAkDjC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * `sources.gaussianNoise@1` — fill the output with per-channel Gaussian noise.
3
+ *
4
+ * Zero-input source (host-specified dimensions). Each channel gets an
5
+ * independent sample drawn via the Box-Muller transform from a hash-based RNG
6
+ * keyed by pixel position + `seed`, then mapped to [0,1] as
7
+ * `((mean + g*stddev) * 128 + 128) / 255` (matching the legacy CPU node). Pass a
8
+ * fresh `seed` per run for run-to-run variation. Output is opaque.
9
+ */
10
+ import tgpu from "typegpu";
11
+ import * as d from "typegpu/data";
12
+ import { defineModule } from "../../../../module.js";
13
+ export const GaussianNoiseParams = d.struct({
14
+ mean: d.f32,
15
+ stddev: d.f32,
16
+ seed: d.f32
17
+ });
18
+ const layout = tgpu.bindGroupLayout({
19
+ params: { uniform: GaussianNoiseParams }
20
+ });
21
+ export const sourcesGaussianNoiseV1 = defineModule({
22
+ id: "sources.gaussianNoise",
23
+ version: 1,
24
+ surface: "internal",
25
+ category: "sources",
26
+ linearity: "source",
27
+ kind: "fragment",
28
+ params: GaussianNoiseParams,
29
+ paramDefaults: { mean: 0, stddev: 1, seed: 0 },
30
+ paramUi: {
31
+ mean: { min: -1, max: 1, step: 0.01, label: "Mean" },
32
+ stddev: { min: 0, max: 4, step: 0.01, label: "Std Dev" },
33
+ seed: { label: "Seed" }
34
+ },
35
+ layout,
36
+ wgsl: /* wgsl */ `
37
+ fn hash21(p: vec2f) -> f32 {
38
+ var p3 = fract(vec3f(p.x, p.y, p.x) * 0.1031);
39
+ p3 = p3 + dot(p3, vec3f(p3.y, p3.z, p3.x) + 33.33);
40
+ return fract((p3.x + p3.y) * p3.z);
41
+ }
42
+
43
+ fn gauss(p: vec2f, seed: f32) -> f32 {
44
+ let u1 = max(1e-6, hash21(p + vec2f(seed, 0.0)));
45
+ let u2 = hash21(p + vec2f(0.0, seed));
46
+ return sqrt(-2.0 * log(u1)) * cos(6.28318530718 * u2);
47
+ }
48
+
49
+ @fragment
50
+ fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {
51
+ let p = uv * 4096.0;
52
+ let m = layout.$.params.mean;
53
+ let s = layout.$.params.stddev;
54
+ let base = layout.$.params.seed;
55
+ let r = clamp(((m + gauss(p, base + 1.0) * s) * 128.0 + 128.0) / 255.0, 0.0, 1.0);
56
+ let g = clamp(((m + gauss(p, base + 2.0) * s) * 128.0 + 128.0) / 255.0, 0.0, 1.0);
57
+ let b = clamp(((m + gauss(p, base + 3.0) * s) * 128.0 + 128.0) / 255.0, 0.0, 1.0);
58
+ return vec4f(r, g, b, 1.0);
59
+ }
60
+ `,
61
+ io: {
62
+ inputs: {},
63
+ output: {
64
+ colorSpace: "linear",
65
+ alpha: "premultiplied",
66
+ format: "rgba8unorm",
67
+ dimensions: "host-specified"
68
+ },
69
+ rod: "explicit"
70
+ }
71
+ });
72
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/gaussianNoise/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,GAAG;IACX,MAAM,EAAE,CAAC,CAAC,GAAG;IACb,IAAI,EAAE,CAAC,CAAC,GAAG;CACZ,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;IACjD,EAAE,EAAE,uBAAuB;IAC3B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,mBAAmB;IAC3B,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;IAC9C,OAAO,EAAE;QACP,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;QACpD,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;QACxD,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;KACxB;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CAwBlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `sources.linearGradient@1` — two-color linear gradient at an angle.
3
+ *
4
+ * `angle` in radians (0 = horizontal, left→right); `midpoint` shifts the 50%
5
+ * mark along the gradient axis (0..1). Zero-input source, host-specified
6
+ * dimensions.
7
+ */
8
+ import * as d from "typegpu/data";
9
+ export declare const LinearGradientParams: d.WgslStruct<{
10
+ colorA: d.Vec4f;
11
+ colorB: d.Vec4f;
12
+ angle: d.F32;
13
+ midpoint: d.F32;
14
+ }>;
15
+ export declare const sourcesLinearGradientV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
16
+ colorA: d.Vec4f;
17
+ colorB: d.Vec4f;
18
+ angle: d.F32;
19
+ midpoint: d.F32;
20
+ }>>;
21
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/sources/linearGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,oBAAoB;;;;;EAK/B,CAAC;AAMH,eAAO,MAAM,uBAAuB;;;;;GAmDlC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * `sources.linearGradient@1` — two-color linear gradient at an angle.
3
+ *
4
+ * `angle` in radians (0 = horizontal, left→right); `midpoint` shifts the 50%
5
+ * mark along the gradient axis (0..1). Zero-input source, host-specified
6
+ * dimensions.
7
+ */
8
+ import tgpu from "typegpu";
9
+ import * as d from "typegpu/data";
10
+ import { defineModule } from "../../../../module.js";
11
+ export const LinearGradientParams = d.struct({
12
+ colorA: d.vec4f,
13
+ colorB: d.vec4f,
14
+ angle: d.f32,
15
+ midpoint: d.f32
16
+ });
17
+ const layout = tgpu.bindGroupLayout({
18
+ params: { uniform: LinearGradientParams }
19
+ });
20
+ export const sourcesLinearGradientV1 = defineModule({
21
+ id: "sources.linearGradient",
22
+ version: 1,
23
+ surface: "internal",
24
+ category: "sources",
25
+ linearity: "source",
26
+ kind: "fragment",
27
+ params: LinearGradientParams,
28
+ paramDefaults: {
29
+ colorA: d.vec4f(0, 0, 0, 1),
30
+ colorB: d.vec4f(1, 1, 1, 1),
31
+ angle: 0,
32
+ midpoint: 0.5
33
+ },
34
+ paramUi: {
35
+ colorA: { label: "Color A" },
36
+ colorB: { label: "Color B" },
37
+ angle: { min: -Math.PI, max: Math.PI, step: 0.01, label: "Angle", notes: "radians" },
38
+ midpoint: { min: 0.01, max: 0.99, step: 0.01, label: "Midpoint" }
39
+ },
40
+ layout,
41
+ wgsl: /* wgsl */ `
42
+ @fragment
43
+ fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {
44
+ let p = layout.$.params;
45
+ let c = vec2f(cos(p.angle), sin(p.angle));
46
+ let t01 = clamp(dot(uv - vec2f(0.5), c) + 0.5, 0.0, 1.0);
47
+ let mid = clamp(p.midpoint, 0.01, 0.99);
48
+ var t: f32 = 0.0;
49
+ if (t01 < mid) {
50
+ t = (t01 / mid) * 0.5;
51
+ } else {
52
+ t = 0.5 + ((t01 - mid) / (1.0 - mid)) * 0.5;
53
+ }
54
+ // The colour params arrive premultiplied (hosts premultiply at the colour
55
+ // picker boundary, matching the pool's between-modules invariant), and a mix
56
+ // of premultiplied endpoints is itself premultiplied. Re-multiplying by
57
+ // alpha here would darken translucent stops to rgb*a².
58
+ return mix(p.colorA, p.colorB, t);
59
+ }
60
+ `,
61
+ io: {
62
+ inputs: {},
63
+ output: {
64
+ colorSpace: "linear",
65
+ alpha: "premultiplied",
66
+ format: "rgba8unorm",
67
+ dimensions: "host-specified"
68
+ },
69
+ rod: "explicit"
70
+ }
71
+ });
72
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/linearGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,KAAK;IACf,MAAM,EAAE,CAAC,CAAC,KAAK;IACf,KAAK,EAAE,CAAC,CAAC,GAAG;IACZ,QAAQ,EAAE,CAAC,CAAC,GAAG;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;CAC1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;IAClD,EAAE,EAAE,wBAAwB;IAC5B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,oBAAoB;IAC5B,aAAa,EAAE;QACb,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3B,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,GAAG;KACd;IACD,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC5B,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC5B,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;QACpF,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;KAClE;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;CAmBlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `sources.radialGradient@1` — two-color radial gradient.
3
+ *
4
+ * `radius` controls where the outer color is fully reached (in normalized UV
5
+ * units from center). Zero-input source, host-specified dimensions.
6
+ */
7
+ import * as d from "typegpu/data";
8
+ export declare const RadialGradientParams: d.WgslStruct<{
9
+ colorInner: d.Vec4f;
10
+ colorOuter: d.Vec4f;
11
+ radius: d.F32;
12
+ }>;
13
+ export declare const sourcesRadialGradientV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
14
+ colorInner: d.Vec4f;
15
+ colorOuter: d.Vec4f;
16
+ radius: d.F32;
17
+ }>>;
18
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/sources/radialGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAC;AAMH,eAAO,MAAM,uBAAuB;;;;GAyClC,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * `sources.radialGradient@1` — two-color radial gradient.
3
+ *
4
+ * `radius` controls where the outer color is fully reached (in normalized UV
5
+ * units from center). Zero-input source, host-specified dimensions.
6
+ */
7
+ import tgpu from "typegpu";
8
+ import * as d from "typegpu/data";
9
+ import { defineModule } from "../../../../module.js";
10
+ export const RadialGradientParams = d.struct({
11
+ colorInner: d.vec4f,
12
+ colorOuter: d.vec4f,
13
+ radius: d.f32
14
+ });
15
+ const layout = tgpu.bindGroupLayout({
16
+ params: { uniform: RadialGradientParams }
17
+ });
18
+ export const sourcesRadialGradientV1 = defineModule({
19
+ id: "sources.radialGradient",
20
+ version: 1,
21
+ surface: "internal",
22
+ category: "sources",
23
+ linearity: "source",
24
+ kind: "fragment",
25
+ params: RadialGradientParams,
26
+ paramDefaults: {
27
+ colorInner: d.vec4f(0, 0, 0, 1),
28
+ colorOuter: d.vec4f(1, 1, 1, 1),
29
+ radius: 0.5
30
+ },
31
+ paramUi: {
32
+ colorInner: { label: "Inner color" },
33
+ colorOuter: { label: "Outer color" },
34
+ radius: { min: 0.01, max: 1.5, step: 0.01, label: "Radius" }
35
+ },
36
+ layout,
37
+ wgsl: /* wgsl */ `
38
+ @fragment
39
+ fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {
40
+ let p = layout.$.params;
41
+ let r = max(p.radius, 0.0001);
42
+ let t = clamp(distance(uv, vec2f(0.5, 0.5)) / r, 0.0, 1.0);
43
+ // The colour params arrive premultiplied (hosts premultiply at the colour
44
+ // picker boundary); a mix of premultiplied endpoints stays premultiplied.
45
+ // Re-multiplying by alpha here would darken translucent colours to rgb*a².
46
+ return mix(p.colorInner, p.colorOuter, t);
47
+ }
48
+ `,
49
+ io: {
50
+ inputs: {},
51
+ output: {
52
+ colorSpace: "linear",
53
+ alpha: "premultiplied",
54
+ format: "rgba8unorm",
55
+ dimensions: "host-specified"
56
+ },
57
+ rod: "explicit"
58
+ }
59
+ });
60
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/radialGradient/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,KAAK;IACnB,UAAU,EAAE,CAAC,CAAC,KAAK;IACnB,MAAM,EAAE,CAAC,CAAC,GAAG;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;CAC1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;IAClD,EAAE,EAAE,wBAAwB;IAC5B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,oBAAoB;IAC5B,aAAa,EAAE;QACb,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG;KACZ;IACD,OAAO,EAAE;QACP,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;QACpC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;QACpC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;KAC7D;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;;;;;;;CAWlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `sources.solid@1` — fill the entire output with a single color.
3
+ *
4
+ * Zero-input source. Output dimensions are `host-specified` — the host
5
+ * allocates the target texture at the resolution it wants, the module just
6
+ * writes the same RGBA into every pixel. Alpha is premultiplied per the
7
+ * pool's convention (callers passing a straight-alpha color must
8
+ * pre-multiply before assigning to the param).
9
+ */
10
+ import * as d from "typegpu/data";
11
+ export declare const SolidParams: d.WgslStruct<{
12
+ color: d.Vec4f;
13
+ }>;
14
+ export declare const sourcesSolidV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
15
+ color: d.Vec4f;
16
+ }>>;
17
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/sources/solid/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,WAAW;;EAEtB,CAAC;AAMH,eAAO,MAAM,cAAc;;GA6BzB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * `sources.solid@1` — fill the entire output with a single color.
3
+ *
4
+ * Zero-input source. Output dimensions are `host-specified` — the host
5
+ * allocates the target texture at the resolution it wants, the module just
6
+ * writes the same RGBA into every pixel. Alpha is premultiplied per the
7
+ * pool's convention (callers passing a straight-alpha color must
8
+ * pre-multiply before assigning to the param).
9
+ */
10
+ import tgpu from "typegpu";
11
+ import * as d from "typegpu/data";
12
+ import { defineModule } from "../../../../module.js";
13
+ export const SolidParams = d.struct({
14
+ color: d.vec4f
15
+ });
16
+ const layout = tgpu.bindGroupLayout({
17
+ params: { uniform: SolidParams }
18
+ });
19
+ export const sourcesSolidV1 = defineModule({
20
+ id: "sources.solid",
21
+ version: 1,
22
+ surface: "internal",
23
+ category: "sources",
24
+ linearity: "source",
25
+ kind: "fragment",
26
+ params: SolidParams,
27
+ paramDefaults: { color: d.vec4f(0, 0, 0, 1) },
28
+ paramUi: {
29
+ color: { label: "Color", notes: "RGBA, premultiplied" }
30
+ },
31
+ layout,
32
+ wgsl: /* wgsl */ `
33
+ @fragment
34
+ fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f {
35
+ return layout.$.params.color;
36
+ }
37
+ `,
38
+ io: {
39
+ inputs: {},
40
+ output: {
41
+ colorSpace: "linear",
42
+ alpha: "premultiplied",
43
+ format: "rgba8unorm",
44
+ dimensions: "host-specified"
45
+ },
46
+ rod: "explicit"
47
+ }
48
+ });
49
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/shaders/sources/solid/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,CAAC,CAAC,KAAK;CACf,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;IACzC,EAAE,EAAE,eAAe;IACnB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,WAAW;IACnB,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAC7C,OAAO,EAAE;QACP,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE;KACxD;IACD,MAAM;IACN,IAAI,EAAE,UAAU,CAAC;;;;;CAKlB;IACC,EAAE,EAAE;QACF,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,gBAAgB;SAC7B;QACD,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `transform.affine@1` — apply an inverse 2D affine matrix to remap UV space.
3
+ *
4
+ * The params spell out a 2×3 inverse matrix: each output UV `(u, v)` maps to
5
+ * the source UV `(m00*u + m01*v + tx, m10*u + m11*v + ty)`. Authoring the
6
+ * **inverse** keeps the WGSL a single matrix-vector multiply — exactly the
7
+ * same pattern `compositor/transform.ts` uses for layer placement.
8
+ *
9
+ * Output dimensions are `host-specified`. Out-of-bounds samples
10
+ * (`u < 0 || u > 1 || v < 0 || v > 1`) return transparent black so a rotated
11
+ * or scaled source leaves cleanly transparent corners rather than smearing
12
+ * the edge color.
13
+ *
14
+ * For arbitrary rotation around the source center with scale, the host
15
+ * composes the inverse matrix on the CPU (`compositor/transform.ts`
16
+ * `layerTransformToInverseAffine` is the canonical helper); this module
17
+ * just consumes it.
18
+ */
19
+ import * as d from "typegpu/data";
20
+ export declare const AffineParams: d.WgslStruct<{
21
+ m00: d.F32;
22
+ m01: d.F32;
23
+ tx: d.F32;
24
+ m10: d.F32;
25
+ m11: d.F32;
26
+ ty: d.F32;
27
+ }>;
28
+ export declare const transformAffineV1: import("../../../../module.js").ShaderModule<d.WgslStruct<{
29
+ m00: d.F32;
30
+ m01: d.F32;
31
+ tx: d.F32;
32
+ m10: d.F32;
33
+ m11: d.F32;
34
+ ty: d.F32;
35
+ }>>;
36
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/transform/affine/v1/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,YAAY;;;;;;;EAOvB,CAAC;AAeH,eAAO,MAAM,iBAAiB;;;;;;;GAoD5B,CAAC"}