shadertown 0.1.0 → 0.2.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.
@@ -1,4 +1,4 @@
1
- import type { ColorControl } from "./types.js";
1
+ import type { ColorControl, ShaderKind } from "./types.js";
2
2
  export declare const shaderRegistry: {
3
3
  readonly aurora: {
4
4
  readonly name: "Aurora";
@@ -1917,12 +1917,1061 @@ export declare const shaderRegistry: {
1917
1917
  readonly colorC: ColorControl;
1918
1918
  };
1919
1919
  };
1920
+ readonly glass: {
1921
+ readonly name: "Glass";
1922
+ readonly tagline: "A refracting, frosted sheet over the layer behind it";
1923
+ readonly description: "A drifting height field read as a surface: its slope bends the layer underneath, spreads the red and blue ends apart, and catches light along the steep ground. Frost blurs along an axis the height rotates, so the sheet grains up instead of banding. Point it at an image, a video, or another shadertown shader.";
1924
+ readonly family: "optical";
1925
+ readonly tags: readonly ["glass", "refraction", "overlay"];
1926
+ readonly cost: "medium";
1927
+ readonly defaultSource: "neon-grid";
1928
+ readonly controls: {
1929
+ readonly speed: {
1930
+ readonly default: 0.35;
1931
+ readonly max: 2;
1932
+ readonly slot: "speed";
1933
+ readonly label: "Speed";
1934
+ readonly min: 0;
1935
+ readonly step: 0.01;
1936
+ readonly hint: "Time multiplier. 0 freezes the shader on its current frame.";
1937
+ };
1938
+ readonly scale: {
1939
+ readonly default: 1;
1940
+ readonly slot: "scale";
1941
+ readonly label: "Scale";
1942
+ readonly min: 0.2;
1943
+ readonly max: 3;
1944
+ readonly step: 0.01;
1945
+ readonly hint: "Zoom of the underlying field. Lower is bigger, softer shapes.";
1946
+ };
1947
+ readonly intensity: {
1948
+ readonly default: 1;
1949
+ readonly slot: "intensity";
1950
+ readonly label: "Strength";
1951
+ readonly min: 0;
1952
+ readonly max: 2.5;
1953
+ readonly step: 0.01;
1954
+ readonly hint: "Overall brightness of the effect before the post chain.";
1955
+ };
1956
+ readonly grain: {
1957
+ readonly default: 0.02;
1958
+ readonly slot: "grain";
1959
+ readonly label: "Grain";
1960
+ readonly min: 0;
1961
+ readonly max: 0.35;
1962
+ readonly step: 0.005;
1963
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
1964
+ };
1965
+ readonly vignette: {
1966
+ readonly default: 0.2;
1967
+ readonly slot: "vignette";
1968
+ readonly label: "Vignette";
1969
+ readonly min: 0;
1970
+ readonly max: 1;
1971
+ readonly step: 0.01;
1972
+ readonly hint: "Darkening towards the edges of the frame.";
1973
+ };
1974
+ readonly warp: {
1975
+ readonly label: "Refraction";
1976
+ readonly default: 0.8;
1977
+ readonly max: 2.5;
1978
+ readonly hint: "How far the sheet bends what is behind it.";
1979
+ readonly slot: "warp";
1980
+ readonly min: 0;
1981
+ readonly step: 0.01;
1982
+ };
1983
+ readonly frost: {
1984
+ readonly slot: "a";
1985
+ readonly label: "Frost";
1986
+ readonly min: 0;
1987
+ readonly max: 1;
1988
+ readonly step: 0.01;
1989
+ readonly default: 0.35;
1990
+ readonly hint: "Blur radius. Past about 0.6 the layer below stops being readable.";
1991
+ };
1992
+ readonly dispersion: {
1993
+ readonly slot: "b";
1994
+ readonly label: "Dispersion";
1995
+ readonly min: 0;
1996
+ readonly max: 1;
1997
+ readonly step: 0.01;
1998
+ readonly default: 0.25;
1999
+ readonly hint: "Colour fringing where the sheet is steepest, as in real glass.";
2000
+ };
2001
+ readonly edge: {
2002
+ readonly slot: "c";
2003
+ readonly label: "Edge light";
2004
+ readonly min: 0;
2005
+ readonly max: 2;
2006
+ readonly step: 0.01;
2007
+ readonly default: 0.6;
2008
+ readonly hint: "Highlight along the ridges. This is what makes it read as thick.";
2009
+ };
2010
+ readonly tint: {
2011
+ readonly slot: "d";
2012
+ readonly label: "Tint";
2013
+ readonly min: 0;
2014
+ readonly max: 1;
2015
+ readonly step: 0.01;
2016
+ readonly default: 0.15;
2017
+ readonly hint: "Pulls the whole sheet towards the palette. 0 leaves it colourless.";
2018
+ };
2019
+ readonly vibrancy: {
2020
+ readonly slot: "vibrancy";
2021
+ readonly label: "Vibrancy";
2022
+ readonly min: 0;
2023
+ readonly max: 2;
2024
+ readonly step: 0.01;
2025
+ readonly default: 1;
2026
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2027
+ };
2028
+ };
2029
+ readonly colors: {
2030
+ readonly colorA: ColorControl;
2031
+ readonly colorB: ColorControl;
2032
+ readonly colorC: ColorControl;
2033
+ };
2034
+ };
2035
+ readonly lens: {
2036
+ readonly name: "Lens";
2037
+ readonly tagline: "Barrel distortion, colour fringing and soft corners";
2038
+ readonly description: "A camera lens rather than a filter: one radial distortion constant per colour channel, so straight lines bow outwards, the fringing is invisible in the middle and worst in the corners, and the corners lose both light and sharpness. Set distortion below zero for the pincushion a long lens gives you instead.";
2039
+ readonly family: "optical";
2040
+ readonly tags: readonly ["camera", "distortion", "retro"];
2041
+ readonly cost: "medium";
2042
+ readonly defaultSource: "neon-grid";
2043
+ readonly controls: {
2044
+ readonly vignette: {
2045
+ readonly default: 0.15;
2046
+ readonly slot: "vignette";
2047
+ readonly label: "Vignette";
2048
+ readonly min: 0;
2049
+ readonly max: 1;
2050
+ readonly step: 0.01;
2051
+ readonly hint: "Darkening towards the edges of the frame.";
2052
+ };
2053
+ readonly warp: {
2054
+ readonly label: "Distortion";
2055
+ readonly min: -1;
2056
+ readonly max: 2;
2057
+ readonly default: 0.5;
2058
+ readonly hint: "Above zero bows outwards (barrel), below zero pulls inwards (pincushion).";
2059
+ readonly slot: "warp";
2060
+ readonly step: 0.01;
2061
+ };
2062
+ readonly softness: {
2063
+ readonly slot: "a";
2064
+ readonly label: "Corner softness";
2065
+ readonly min: 0;
2066
+ readonly max: 1;
2067
+ readonly step: 0.01;
2068
+ readonly default: 0.35;
2069
+ readonly hint: "How far off the focal plane the corners sit.";
2070
+ };
2071
+ readonly fringing: {
2072
+ readonly slot: "b";
2073
+ readonly label: "Fringing";
2074
+ readonly min: 0;
2075
+ readonly max: 1;
2076
+ readonly step: 0.01;
2077
+ readonly default: 0.4;
2078
+ readonly hint: "How far apart the red and blue ends are bent.";
2079
+ };
2080
+ readonly zoom: {
2081
+ readonly slot: "c";
2082
+ readonly label: "Zoom";
2083
+ readonly min: 0.5;
2084
+ readonly max: 1.5;
2085
+ readonly step: 0.01;
2086
+ readonly default: 1;
2087
+ readonly hint: "Below 1 pulls back and shows the black outside the frame.";
2088
+ };
2089
+ readonly falloff: {
2090
+ readonly slot: "d";
2091
+ readonly label: "Corner falloff";
2092
+ readonly min: 0;
2093
+ readonly max: 1;
2094
+ readonly step: 0.01;
2095
+ readonly default: 0.4;
2096
+ readonly hint: "Light lost towards the corners, as distortion spreads it thinner.";
2097
+ };
2098
+ readonly intensity: {
2099
+ readonly slot: "intensity";
2100
+ readonly label: "Strength";
2101
+ readonly min: 0;
2102
+ readonly max: 2.5;
2103
+ readonly step: 0.01;
2104
+ readonly default: 1;
2105
+ readonly hint: "Overall brightness of the effect before the post chain.";
2106
+ };
2107
+ readonly vibrancy: {
2108
+ readonly slot: "vibrancy";
2109
+ readonly label: "Vibrancy";
2110
+ readonly min: 0;
2111
+ readonly max: 2;
2112
+ readonly step: 0.01;
2113
+ readonly default: 1;
2114
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2115
+ };
2116
+ readonly grain: {
2117
+ readonly slot: "grain";
2118
+ readonly label: "Grain";
2119
+ readonly min: 0;
2120
+ readonly max: 0.35;
2121
+ readonly step: 0.005;
2122
+ readonly default: 0.03;
2123
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2124
+ };
2125
+ };
2126
+ readonly colors: {
2127
+ readonly colorA: ColorControl;
2128
+ readonly colorB: ColorControl;
2129
+ readonly colorC: ColorControl;
2130
+ };
2131
+ };
2132
+ readonly bloom: {
2133
+ readonly name: "Bloom";
2134
+ readonly tagline: "Light bleeding out of the bright parts of the layer below";
2135
+ readonly description: "A threshold picks out what is already bright, and a wide spiral spreads it. Each tap is thresholded on its own rather than blurring first, so a dark neighbour never dims a highlight. Streak stretches the spiral sideways into the flare an anamorphic lens puts on every point of light.";
2136
+ readonly family: "optical";
2137
+ readonly tags: readonly ["glow", "light", "hero"];
2138
+ readonly cost: "heavy";
2139
+ readonly defaultSource: "starfield";
2140
+ readonly controls: {
2141
+ readonly vignette: {
2142
+ readonly default: 0.1;
2143
+ readonly slot: "vignette";
2144
+ readonly label: "Vignette";
2145
+ readonly min: 0;
2146
+ readonly max: 1;
2147
+ readonly step: 0.01;
2148
+ readonly hint: "Darkening towards the edges of the frame.";
2149
+ };
2150
+ readonly warp: {
2151
+ readonly label: "Streak";
2152
+ readonly min: 0;
2153
+ readonly max: 1;
2154
+ readonly default: 0.15;
2155
+ readonly hint: "Stretches the halo sideways. Small values read as a lens, large as a smear.";
2156
+ readonly slot: "warp";
2157
+ readonly step: 0.01;
2158
+ };
2159
+ readonly threshold: {
2160
+ readonly slot: "a";
2161
+ readonly label: "Threshold";
2162
+ readonly min: 0;
2163
+ readonly max: 1;
2164
+ readonly step: 0.01;
2165
+ readonly default: 0.55;
2166
+ readonly hint: "How bright a pixel has to be before it blooms at all.";
2167
+ };
2168
+ readonly radius: {
2169
+ readonly slot: "b";
2170
+ readonly label: "Radius";
2171
+ readonly min: 0;
2172
+ readonly max: 1;
2173
+ readonly step: 0.01;
2174
+ readonly default: 0.5;
2175
+ readonly hint: "How far the light carries. Wide radii need bright, sparse sources.";
2176
+ };
2177
+ readonly amount: {
2178
+ readonly slot: "c";
2179
+ readonly label: "Amount";
2180
+ readonly min: 0;
2181
+ readonly max: 3;
2182
+ readonly step: 0.01;
2183
+ readonly default: 1.2;
2184
+ readonly hint: "How much of the halo is added back on top.";
2185
+ };
2186
+ readonly tint: {
2187
+ readonly slot: "d";
2188
+ readonly label: "Tint";
2189
+ readonly min: 0;
2190
+ readonly max: 1;
2191
+ readonly step: 0.01;
2192
+ readonly default: 0.3;
2193
+ readonly hint: "Colours the halo from the palette. Real coatings are rarely neutral.";
2194
+ };
2195
+ readonly intensity: {
2196
+ readonly slot: "intensity";
2197
+ readonly label: "Strength";
2198
+ readonly min: 0;
2199
+ readonly max: 2.5;
2200
+ readonly step: 0.01;
2201
+ readonly default: 1;
2202
+ readonly hint: "Overall brightness of the effect before the post chain.";
2203
+ };
2204
+ readonly vibrancy: {
2205
+ readonly slot: "vibrancy";
2206
+ readonly label: "Vibrancy";
2207
+ readonly min: 0;
2208
+ readonly max: 2;
2209
+ readonly step: 0.01;
2210
+ readonly default: 1;
2211
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2212
+ };
2213
+ readonly grain: {
2214
+ readonly slot: "grain";
2215
+ readonly label: "Grain";
2216
+ readonly min: 0;
2217
+ readonly max: 0.35;
2218
+ readonly step: 0.005;
2219
+ readonly default: 0.03;
2220
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2221
+ };
2222
+ };
2223
+ readonly colors: {
2224
+ readonly colorA: ColorControl;
2225
+ readonly colorB: ColorControl;
2226
+ readonly colorC: ColorControl;
2227
+ };
2228
+ };
2229
+ readonly shockwave: {
2230
+ readonly name: "Shockwave";
2231
+ readonly tagline: "Expanding rings that shove the layer aside as they pass";
2232
+ readonly description: "Three gaussian bands, staggered in phase and spending their force as they grow. The displacement is signed by which side of the crest a pixel is on, so the front compresses ahead of itself and rarefies behind — which is what makes it read as a wave rather than a glowing ring. Turn pointer tracking on and it starts wherever the cursor is.";
2233
+ readonly family: "distortion";
2234
+ readonly tags: readonly ["impact", "pulse", "interactive"];
2235
+ readonly cost: "medium";
2236
+ readonly defaultSource: "truchet";
2237
+ readonly controls: {
2238
+ readonly speed: {
2239
+ readonly default: 0.8;
2240
+ readonly slot: "speed";
2241
+ readonly label: "Speed";
2242
+ readonly min: 0;
2243
+ readonly max: 3;
2244
+ readonly step: 0.01;
2245
+ readonly hint: "Time multiplier. 0 freezes the shader on its current frame.";
2246
+ };
2247
+ readonly grain: {
2248
+ readonly default: 0.02;
2249
+ readonly slot: "grain";
2250
+ readonly label: "Grain";
2251
+ readonly min: 0;
2252
+ readonly max: 0.35;
2253
+ readonly step: 0.005;
2254
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2255
+ };
2256
+ readonly vignette: {
2257
+ readonly default: 0.15;
2258
+ readonly slot: "vignette";
2259
+ readonly label: "Vignette";
2260
+ readonly min: 0;
2261
+ readonly max: 1;
2262
+ readonly step: 0.01;
2263
+ readonly hint: "Darkening towards the edges of the frame.";
2264
+ };
2265
+ readonly warp: {
2266
+ readonly label: "Force";
2267
+ readonly min: 0;
2268
+ readonly max: 2;
2269
+ readonly default: 0.9;
2270
+ readonly hint: "How far the front shoves what it passes over.";
2271
+ readonly slot: "warp";
2272
+ readonly step: 0.01;
2273
+ };
2274
+ readonly reach: {
2275
+ readonly slot: "a";
2276
+ readonly label: "Reach";
2277
+ readonly min: 0.1;
2278
+ readonly max: 2;
2279
+ readonly step: 0.01;
2280
+ readonly default: 1;
2281
+ readonly hint: "How far a ring travels before it is spent.";
2282
+ };
2283
+ readonly width: {
2284
+ readonly slot: "b";
2285
+ readonly label: "Width";
2286
+ readonly min: 0;
2287
+ readonly max: 1;
2288
+ readonly step: 0.01;
2289
+ readonly default: 0.35;
2290
+ readonly hint: "Thickness of the front. Thin is a crack, thick is a swell.";
2291
+ };
2292
+ readonly decay: {
2293
+ readonly slot: "c";
2294
+ readonly label: "Decay";
2295
+ readonly min: 0.1;
2296
+ readonly max: 4;
2297
+ readonly step: 0.01;
2298
+ readonly default: 1.5;
2299
+ readonly hint: "How quickly a ring loses force. High values die close to the centre.";
2300
+ };
2301
+ readonly fringing: {
2302
+ readonly slot: "d";
2303
+ readonly label: "Fringing";
2304
+ readonly min: 0;
2305
+ readonly max: 1;
2306
+ readonly step: 0.01;
2307
+ readonly default: 0.4;
2308
+ readonly hint: "Colour separation across the crest.";
2309
+ };
2310
+ readonly scale: {
2311
+ readonly slot: "scale";
2312
+ readonly label: "Scale";
2313
+ readonly min: 0.2;
2314
+ readonly max: 3;
2315
+ readonly step: 0.01;
2316
+ readonly default: 1;
2317
+ readonly hint: "Zoom of the underlying field. Lower is bigger, softer shapes.";
2318
+ };
2319
+ readonly intensity: {
2320
+ readonly slot: "intensity";
2321
+ readonly label: "Strength";
2322
+ readonly min: 0;
2323
+ readonly max: 2.5;
2324
+ readonly step: 0.01;
2325
+ readonly default: 1;
2326
+ readonly hint: "Overall brightness of the effect before the post chain.";
2327
+ };
2328
+ readonly vibrancy: {
2329
+ readonly slot: "vibrancy";
2330
+ readonly label: "Vibrancy";
2331
+ readonly min: 0;
2332
+ readonly max: 2;
2333
+ readonly step: 0.01;
2334
+ readonly default: 1;
2335
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2336
+ };
2337
+ };
2338
+ readonly colors: {
2339
+ readonly colorA: ColorControl;
2340
+ readonly colorB: ColorControl;
2341
+ readonly colorC: ColorControl;
2342
+ };
2343
+ };
2344
+ readonly swirl: {
2345
+ readonly name: "Swirl";
2346
+ readonly tagline: "A vortex that winds the layer around a point";
2347
+ readonly description: "Rotation that falls off with distance, so the middle turns and the edges stay put. Falloff decides the whole character: near 1 it is a gentle whirlpool, near 4 a tight knot in still water. The colour channels wind by slightly different angles, which smears them along the direction of travel and sells the spin.";
2348
+ readonly family: "distortion";
2349
+ readonly tags: readonly ["vortex", "twist", "interactive"];
2350
+ readonly cost: "light";
2351
+ readonly defaultSource: "voronoi";
2352
+ readonly controls: {
2353
+ readonly speed: {
2354
+ readonly default: 1;
2355
+ readonly slot: "speed";
2356
+ readonly label: "Speed";
2357
+ readonly min: 0;
2358
+ readonly max: 3;
2359
+ readonly step: 0.01;
2360
+ readonly hint: "Time multiplier. 0 freezes the shader on its current frame.";
2361
+ };
2362
+ readonly grain: {
2363
+ readonly default: 0.02;
2364
+ readonly slot: "grain";
2365
+ readonly label: "Grain";
2366
+ readonly min: 0;
2367
+ readonly max: 0.35;
2368
+ readonly step: 0.005;
2369
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2370
+ };
2371
+ readonly vignette: {
2372
+ readonly default: 0.15;
2373
+ readonly slot: "vignette";
2374
+ readonly label: "Vignette";
2375
+ readonly min: 0;
2376
+ readonly max: 1;
2377
+ readonly step: 0.01;
2378
+ readonly hint: "Darkening towards the edges of the frame.";
2379
+ };
2380
+ readonly warp: {
2381
+ readonly label: "Twist";
2382
+ readonly min: 0;
2383
+ readonly max: 3;
2384
+ readonly default: 1.2;
2385
+ readonly hint: "Turns at the centre. Past about 2 the middle stops being readable.";
2386
+ readonly slot: "warp";
2387
+ readonly step: 0.01;
2388
+ };
2389
+ readonly radius: {
2390
+ readonly slot: "a";
2391
+ readonly label: "Radius";
2392
+ readonly min: 0.02;
2393
+ readonly max: 1.2;
2394
+ readonly step: 0.01;
2395
+ readonly default: 0.55;
2396
+ readonly hint: "How far the vortex reaches before the layer is untouched.";
2397
+ };
2398
+ readonly falloff: {
2399
+ readonly slot: "b";
2400
+ readonly label: "Falloff";
2401
+ readonly min: 0.1;
2402
+ readonly max: 5;
2403
+ readonly step: 0.01;
2404
+ readonly default: 1.6;
2405
+ readonly hint: "Shape of the edge. Low is a wide whirlpool, high is a tight knot.";
2406
+ };
2407
+ readonly spin: {
2408
+ readonly slot: "c";
2409
+ readonly label: "Spin";
2410
+ readonly min: -1;
2411
+ readonly max: 1;
2412
+ readonly step: 0.01;
2413
+ readonly default: 0.15;
2414
+ readonly hint: "Steady rotation over time. Negative winds the other way.";
2415
+ };
2416
+ readonly smear: {
2417
+ readonly slot: "d";
2418
+ readonly label: "Smear";
2419
+ readonly min: 0;
2420
+ readonly max: 1;
2421
+ readonly step: 0.01;
2422
+ readonly default: 0.3;
2423
+ readonly hint: "Colour trailing along the direction of travel.";
2424
+ };
2425
+ readonly scale: {
2426
+ readonly slot: "scale";
2427
+ readonly label: "Scale";
2428
+ readonly min: 0.2;
2429
+ readonly max: 3;
2430
+ readonly step: 0.01;
2431
+ readonly default: 1;
2432
+ readonly hint: "Zoom of the underlying field. Lower is bigger, softer shapes.";
2433
+ };
2434
+ readonly intensity: {
2435
+ readonly slot: "intensity";
2436
+ readonly label: "Strength";
2437
+ readonly min: 0;
2438
+ readonly max: 2.5;
2439
+ readonly step: 0.01;
2440
+ readonly default: 1;
2441
+ readonly hint: "Overall brightness of the effect before the post chain.";
2442
+ };
2443
+ readonly vibrancy: {
2444
+ readonly slot: "vibrancy";
2445
+ readonly label: "Vibrancy";
2446
+ readonly min: 0;
2447
+ readonly max: 2;
2448
+ readonly step: 0.01;
2449
+ readonly default: 1;
2450
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2451
+ };
2452
+ };
2453
+ readonly colors: {
2454
+ readonly colorA: ColorControl;
2455
+ readonly colorB: ColorControl;
2456
+ readonly colorC: ColorControl;
2457
+ };
2458
+ };
2459
+ readonly flow: {
2460
+ readonly name: "Flow";
2461
+ readonly tagline: "The layer pushed around by a slow, turbulent field";
2462
+ readonly description: "Two noise fields drive a displacement, then curl turns it from a drift into a circulation. Smearing runs along the flow rather than in a circle, so the result looks stirred instead of merely blurred. Turbulence trades broad lazy currents for stringy filaments.";
2463
+ readonly family: "distortion";
2464
+ readonly tags: readonly ["liquid", "organic", "ambient"];
2465
+ readonly cost: "heavy";
2466
+ readonly defaultSource: "halftone";
2467
+ readonly controls: {
2468
+ readonly speed: {
2469
+ readonly default: 0.5;
2470
+ readonly max: 2;
2471
+ readonly slot: "speed";
2472
+ readonly label: "Speed";
2473
+ readonly min: 0;
2474
+ readonly step: 0.01;
2475
+ readonly hint: "Time multiplier. 0 freezes the shader on its current frame.";
2476
+ };
2477
+ readonly scale: {
2478
+ readonly default: 1;
2479
+ readonly slot: "scale";
2480
+ readonly label: "Scale";
2481
+ readonly min: 0.2;
2482
+ readonly max: 3;
2483
+ readonly step: 0.01;
2484
+ readonly hint: "Zoom of the underlying field. Lower is bigger, softer shapes.";
2485
+ };
2486
+ readonly grain: {
2487
+ readonly default: 0.02;
2488
+ readonly slot: "grain";
2489
+ readonly label: "Grain";
2490
+ readonly min: 0;
2491
+ readonly max: 0.35;
2492
+ readonly step: 0.005;
2493
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2494
+ };
2495
+ readonly vignette: {
2496
+ readonly default: 0.2;
2497
+ readonly slot: "vignette";
2498
+ readonly label: "Vignette";
2499
+ readonly min: 0;
2500
+ readonly max: 1;
2501
+ readonly step: 0.01;
2502
+ readonly hint: "Darkening towards the edges of the frame.";
2503
+ };
2504
+ readonly warp: {
2505
+ readonly label: "Strength";
2506
+ readonly min: 0;
2507
+ readonly max: 2;
2508
+ readonly default: 0.7;
2509
+ readonly hint: "How far the field pushes the layer.";
2510
+ readonly slot: "warp";
2511
+ readonly step: 0.01;
2512
+ };
2513
+ readonly turbulence: {
2514
+ readonly slot: "a";
2515
+ readonly label: "Turbulence";
2516
+ readonly min: 0;
2517
+ readonly max: 1;
2518
+ readonly step: 0.01;
2519
+ readonly default: 0.4;
2520
+ readonly hint: "0 is broad lazy currents, 1 is sharp filaments.";
2521
+ };
2522
+ readonly curl: {
2523
+ readonly slot: "b";
2524
+ readonly label: "Curl";
2525
+ readonly min: 0;
2526
+ readonly max: 1;
2527
+ readonly step: 0.01;
2528
+ readonly default: 0.75;
2529
+ readonly hint: "Turns the drift into circulation. 0 pulls everything one way.";
2530
+ };
2531
+ readonly smear: {
2532
+ readonly slot: "c";
2533
+ readonly label: "Smear";
2534
+ readonly min: 0;
2535
+ readonly max: 1;
2536
+ readonly step: 0.01;
2537
+ readonly default: 0.35;
2538
+ readonly hint: "Blur along the flow, which is what reads as motion.";
2539
+ };
2540
+ readonly tint: {
2541
+ readonly slot: "d";
2542
+ readonly label: "Tint";
2543
+ readonly min: 0;
2544
+ readonly max: 1;
2545
+ readonly step: 0.01;
2546
+ readonly default: 0.2;
2547
+ readonly hint: "Colours the fast water from the palette.";
2548
+ };
2549
+ readonly intensity: {
2550
+ readonly slot: "intensity";
2551
+ readonly label: "Strength";
2552
+ readonly min: 0;
2553
+ readonly max: 2.5;
2554
+ readonly step: 0.01;
2555
+ readonly default: 1;
2556
+ readonly hint: "Overall brightness of the effect before the post chain.";
2557
+ };
2558
+ readonly vibrancy: {
2559
+ readonly slot: "vibrancy";
2560
+ readonly label: "Vibrancy";
2561
+ readonly min: 0;
2562
+ readonly max: 2;
2563
+ readonly step: 0.01;
2564
+ readonly default: 1;
2565
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2566
+ };
2567
+ };
2568
+ readonly colors: {
2569
+ readonly colorA: ColorControl;
2570
+ readonly colorB: ColorControl;
2571
+ readonly colorC: ColorControl;
2572
+ };
2573
+ };
2574
+ readonly duotone: {
2575
+ readonly name: "Duotone";
2576
+ readonly tagline: "The layer's brightness read through your palette";
2577
+ readonly description: "Luminance is set between a black and a white point, then contrasted about the midpoint, then used to walk the three-stop palette. In that order: a hard contrast applied first would clip before the range is set. Keep colour mixes the original chroma back, for when a busy photograph should not become a flat poster.";
2578
+ readonly family: "image";
2579
+ readonly tags: readonly ["colour", "poster", "brand"];
2580
+ readonly cost: "light";
2581
+ readonly defaultSource: "julia";
2582
+ readonly controls: {
2583
+ readonly grain: {
2584
+ readonly default: 0.02;
2585
+ readonly slot: "grain";
2586
+ readonly label: "Grain";
2587
+ readonly min: 0;
2588
+ readonly max: 0.35;
2589
+ readonly step: 0.005;
2590
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2591
+ };
2592
+ readonly vignette: {
2593
+ readonly default: 0.2;
2594
+ readonly slot: "vignette";
2595
+ readonly label: "Vignette";
2596
+ readonly min: 0;
2597
+ readonly max: 1;
2598
+ readonly step: 0.01;
2599
+ readonly hint: "Darkening towards the edges of the frame.";
2600
+ };
2601
+ readonly black: {
2602
+ readonly slot: "a";
2603
+ readonly label: "Black point";
2604
+ readonly min: 0;
2605
+ readonly max: 0.6;
2606
+ readonly step: 0.01;
2607
+ readonly default: 0.05;
2608
+ readonly hint: "Brightness that maps to the first colour. Raise it to crush shadows.";
2609
+ };
2610
+ readonly white: {
2611
+ readonly slot: "b";
2612
+ readonly label: "White point";
2613
+ readonly min: 0.4;
2614
+ readonly max: 1;
2615
+ readonly step: 0.01;
2616
+ readonly default: 0.9;
2617
+ readonly hint: "Brightness that maps to the last colour. Lower it to blow highlights.";
2618
+ };
2619
+ readonly contrast: {
2620
+ readonly slot: "c";
2621
+ readonly label: "Contrast";
2622
+ readonly min: 0.2;
2623
+ readonly max: 3;
2624
+ readonly step: 0.01;
2625
+ readonly default: 1.2;
2626
+ readonly hint: "Steepness of the ramp between the two points.";
2627
+ };
2628
+ readonly keep: {
2629
+ readonly slot: "d";
2630
+ readonly label: "Keep colour";
2631
+ readonly min: 0;
2632
+ readonly max: 1;
2633
+ readonly step: 0.01;
2634
+ readonly default: 0;
2635
+ readonly hint: "Mixes the original chroma back over the mapped tone.";
2636
+ };
2637
+ readonly intensity: {
2638
+ readonly slot: "intensity";
2639
+ readonly label: "Strength";
2640
+ readonly min: 0;
2641
+ readonly max: 2.5;
2642
+ readonly step: 0.01;
2643
+ readonly default: 1;
2644
+ readonly hint: "Overall brightness of the effect before the post chain.";
2645
+ };
2646
+ readonly vibrancy: {
2647
+ readonly slot: "vibrancy";
2648
+ readonly label: "Vibrancy";
2649
+ readonly min: 0;
2650
+ readonly max: 2;
2651
+ readonly step: 0.01;
2652
+ readonly default: 1;
2653
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2654
+ };
2655
+ };
2656
+ readonly colors: {
2657
+ readonly colorA: ColorControl;
2658
+ readonly colorB: ColorControl;
2659
+ readonly colorC: ColorControl;
2660
+ };
2661
+ };
2662
+ readonly edges: {
2663
+ readonly name: "Edges";
2664
+ readonly tagline: "The layer reduced to its outlines";
2665
+ readonly description: "A Sobel kernel over luminance, with the step widened past a single texel — a sub-texel step would just sample the same texel three times, and widening it is what turns a hairline into a drawn line. Fill decides how much of the original shows under the ink, from a clean line drawing to a traced photograph.";
2666
+ readonly family: "image";
2667
+ readonly tags: readonly ["outline", "line art", "technical"];
2668
+ readonly cost: "medium";
2669
+ readonly defaultSource: "truchet";
2670
+ readonly controls: {
2671
+ readonly grain: {
2672
+ readonly default: 0.01;
2673
+ readonly slot: "grain";
2674
+ readonly label: "Grain";
2675
+ readonly min: 0;
2676
+ readonly max: 0.35;
2677
+ readonly step: 0.005;
2678
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2679
+ };
2680
+ readonly vignette: {
2681
+ readonly default: 0.2;
2682
+ readonly slot: "vignette";
2683
+ readonly label: "Vignette";
2684
+ readonly min: 0;
2685
+ readonly max: 1;
2686
+ readonly step: 0.01;
2687
+ readonly hint: "Darkening towards the edges of the frame.";
2688
+ };
2689
+ readonly thickness: {
2690
+ readonly slot: "a";
2691
+ readonly label: "Thickness";
2692
+ readonly min: 0.5;
2693
+ readonly max: 6;
2694
+ readonly step: 0.1;
2695
+ readonly default: 1.5;
2696
+ readonly hint: "How far apart the kernel taps sit, in source texels.";
2697
+ };
2698
+ readonly threshold: {
2699
+ readonly slot: "b";
2700
+ readonly label: "Threshold";
2701
+ readonly min: 0;
2702
+ readonly max: 1;
2703
+ readonly step: 0.01;
2704
+ readonly default: 0.15;
2705
+ readonly hint: "How steep a gradient has to be to count as an edge.";
2706
+ };
2707
+ readonly fill: {
2708
+ readonly slot: "c";
2709
+ readonly label: "Fill";
2710
+ readonly min: 0;
2711
+ readonly max: 1;
2712
+ readonly step: 0.01;
2713
+ readonly default: 0;
2714
+ readonly hint: "How much of the original shows under the lines.";
2715
+ };
2716
+ readonly glow: {
2717
+ readonly slot: "d";
2718
+ readonly label: "Glow";
2719
+ readonly min: 0;
2720
+ readonly max: 2;
2721
+ readonly step: 0.01;
2722
+ readonly default: 0.4;
2723
+ readonly hint: "Bleed off the line, which reads as ink rather than aliasing.";
2724
+ };
2725
+ readonly intensity: {
2726
+ readonly slot: "intensity";
2727
+ readonly label: "Strength";
2728
+ readonly min: 0;
2729
+ readonly max: 2.5;
2730
+ readonly step: 0.01;
2731
+ readonly default: 1;
2732
+ readonly hint: "Overall brightness of the effect before the post chain.";
2733
+ };
2734
+ readonly vibrancy: {
2735
+ readonly slot: "vibrancy";
2736
+ readonly label: "Vibrancy";
2737
+ readonly min: 0;
2738
+ readonly max: 2;
2739
+ readonly step: 0.01;
2740
+ readonly default: 1;
2741
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2742
+ };
2743
+ };
2744
+ readonly colors: {
2745
+ readonly colorA: ColorControl;
2746
+ readonly colorB: ColorControl;
2747
+ readonly colorC: ColorControl;
2748
+ };
2749
+ };
2750
+ readonly mosaic: {
2751
+ readonly name: "Mosaic";
2752
+ readonly tagline: "The layer rebuilt out of tiles";
2753
+ readonly description: "One tap at each tile's centre, not an average of it — the hard colour is the point, and averaging would only reinvent a blur. Posterising after sampling is what makes it look assembled from a limited set rather than merely coarse. Roundness grows a dot whose size follows the tile's brightness, the way a printed screen does.";
2754
+ readonly family: "image";
2755
+ readonly tags: readonly ["pixelate", "print", "retro"];
2756
+ readonly cost: "light";
2757
+ readonly defaultSource: "aurora";
2758
+ readonly controls: {
2759
+ readonly grain: {
2760
+ readonly default: 0;
2761
+ readonly slot: "grain";
2762
+ readonly label: "Grain";
2763
+ readonly min: 0;
2764
+ readonly max: 0.35;
2765
+ readonly step: 0.005;
2766
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2767
+ };
2768
+ readonly vignette: {
2769
+ readonly default: 0.2;
2770
+ readonly slot: "vignette";
2771
+ readonly label: "Vignette";
2772
+ readonly min: 0;
2773
+ readonly max: 1;
2774
+ readonly step: 0.01;
2775
+ readonly hint: "Darkening towards the edges of the frame.";
2776
+ };
2777
+ readonly tiles: {
2778
+ readonly slot: "a";
2779
+ readonly label: "Tiles";
2780
+ readonly min: 4;
2781
+ readonly max: 160;
2782
+ readonly step: 1;
2783
+ readonly default: 42;
2784
+ readonly hint: "Tiles across the short axis. They stay square on any canvas.";
2785
+ };
2786
+ readonly roundness: {
2787
+ readonly slot: "b";
2788
+ readonly label: "Roundness";
2789
+ readonly min: 0;
2790
+ readonly max: 1;
2791
+ readonly step: 0.01;
2792
+ readonly default: 0;
2793
+ readonly hint: "0 is a solid tile, 1 is a dot that shrinks as the tile darkens.";
2794
+ };
2795
+ readonly gap: {
2796
+ readonly slot: "c";
2797
+ readonly label: "Gap";
2798
+ readonly min: 0;
2799
+ readonly max: 0.45;
2800
+ readonly step: 0.01;
2801
+ readonly default: 0.02;
2802
+ readonly hint: "Ground left showing between tiles.";
2803
+ };
2804
+ readonly steps: {
2805
+ readonly slot: "d";
2806
+ readonly label: "Colour steps";
2807
+ readonly min: 2;
2808
+ readonly max: 32;
2809
+ readonly step: 1;
2810
+ readonly default: 12;
2811
+ readonly hint: "Levels each channel is quantised to. Low values band on purpose.";
2812
+ };
2813
+ readonly intensity: {
2814
+ readonly slot: "intensity";
2815
+ readonly label: "Strength";
2816
+ readonly min: 0;
2817
+ readonly max: 2.5;
2818
+ readonly step: 0.01;
2819
+ readonly default: 1;
2820
+ readonly hint: "Overall brightness of the effect before the post chain.";
2821
+ };
2822
+ readonly vibrancy: {
2823
+ readonly slot: "vibrancy";
2824
+ readonly label: "Vibrancy";
2825
+ readonly min: 0;
2826
+ readonly max: 2;
2827
+ readonly step: 0.01;
2828
+ readonly default: 1;
2829
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2830
+ };
2831
+ };
2832
+ readonly colors: {
2833
+ readonly colorA: ColorControl;
2834
+ readonly colorB: ColorControl;
2835
+ readonly colorC: ColorControl;
2836
+ };
2837
+ };
2838
+ readonly reveal: {
2839
+ readonly name: "Reveal";
2840
+ readonly tagline: "The layer wiped in over a colour ground";
2841
+ readonly description: "A threshold cutting through a field: noise dissolves, a rotated ramp wipes, and shape slides between the two. At speed 0 the progress control is a scrubber you can drive from your own code — bind it to a scroll position or a load event. Above 0 it loops on its own, which is what makes it worth looking at on a card.";
2842
+ readonly family: "transition";
2843
+ readonly tags: readonly ["wipe", "dissolve", "entrance"];
2844
+ readonly cost: "light";
2845
+ readonly defaultSource: "mesh-gradient";
2846
+ readonly controls: {
2847
+ readonly speed: {
2848
+ readonly default: 0.6;
2849
+ readonly max: 2;
2850
+ readonly slot: "speed";
2851
+ readonly label: "Speed";
2852
+ readonly min: 0;
2853
+ readonly step: 0.01;
2854
+ readonly hint: "Time multiplier. 0 freezes the shader on its current frame.";
2855
+ };
2856
+ readonly scale: {
2857
+ readonly default: 1;
2858
+ readonly slot: "scale";
2859
+ readonly label: "Scale";
2860
+ readonly min: 0.2;
2861
+ readonly max: 3;
2862
+ readonly step: 0.01;
2863
+ readonly hint: "Zoom of the underlying field. Lower is bigger, softer shapes.";
2864
+ };
2865
+ readonly grain: {
2866
+ readonly default: 0.02;
2867
+ readonly slot: "grain";
2868
+ readonly label: "Grain";
2869
+ readonly min: 0;
2870
+ readonly max: 0.35;
2871
+ readonly step: 0.005;
2872
+ readonly hint: "Per-pixel noise. A little hides banding on flat gradients.";
2873
+ };
2874
+ readonly vignette: {
2875
+ readonly default: 0.2;
2876
+ readonly slot: "vignette";
2877
+ readonly label: "Vignette";
2878
+ readonly min: 0;
2879
+ readonly max: 1;
2880
+ readonly step: 0.01;
2881
+ readonly hint: "Darkening towards the edges of the frame.";
2882
+ };
2883
+ readonly warp: {
2884
+ readonly label: "Edge glow";
2885
+ readonly min: 0;
2886
+ readonly max: 2;
2887
+ readonly default: 0.6;
2888
+ readonly hint: "Light riding the boundary, the way a burn does.";
2889
+ readonly slot: "warp";
2890
+ readonly step: 0.01;
2891
+ };
2892
+ readonly progress: {
2893
+ readonly slot: "a";
2894
+ readonly label: "Progress";
2895
+ readonly min: 0;
2896
+ readonly max: 1;
2897
+ readonly step: 0.01;
2898
+ readonly default: 0;
2899
+ readonly hint: "Position of the wipe. Set speed to 0 and drive this yourself.";
2900
+ };
2901
+ readonly shape: {
2902
+ readonly slot: "b";
2903
+ readonly label: "Shape";
2904
+ readonly min: 0;
2905
+ readonly max: 1;
2906
+ readonly step: 0.01;
2907
+ readonly default: 0.35;
2908
+ readonly hint: "0 dissolves through noise, 1 wipes along a straight edge.";
2909
+ };
2910
+ readonly angle: {
2911
+ readonly slot: "c";
2912
+ readonly label: "Angle";
2913
+ readonly min: 0;
2914
+ readonly max: 1;
2915
+ readonly step: 0.01;
2916
+ readonly default: 0;
2917
+ readonly hint: "Direction of the wipe, as a full turn from 0 to 1.";
2918
+ };
2919
+ readonly softness: {
2920
+ readonly slot: "d";
2921
+ readonly label: "Softness";
2922
+ readonly min: 0.001;
2923
+ readonly max: 0.4;
2924
+ readonly step: 0.001;
2925
+ readonly default: 0.08;
2926
+ readonly hint: "Width of the boundary band. Small is a hard cut.";
2927
+ };
2928
+ readonly intensity: {
2929
+ readonly slot: "intensity";
2930
+ readonly label: "Strength";
2931
+ readonly min: 0;
2932
+ readonly max: 2.5;
2933
+ readonly step: 0.01;
2934
+ readonly default: 1;
2935
+ readonly hint: "Overall brightness of the effect before the post chain.";
2936
+ };
2937
+ readonly vibrancy: {
2938
+ readonly slot: "vibrancy";
2939
+ readonly label: "Vibrancy";
2940
+ readonly min: 0;
2941
+ readonly max: 2;
2942
+ readonly step: 0.01;
2943
+ readonly default: 1;
2944
+ readonly hint: "Saturation. 0 is greyscale, 1 is as authored, 2 is punched.";
2945
+ };
2946
+ };
2947
+ readonly colors: {
2948
+ readonly colorA: ColorControl;
2949
+ readonly colorB: ColorControl;
2950
+ readonly colorC: ColorControl;
2951
+ };
2952
+ };
1920
2953
  };
1921
2954
  export type ShaderRegistry = typeof shaderRegistry;
1922
2955
  export type ShaderName = keyof ShaderRegistry;
1923
2956
  export declare const shaderNames: ShaderName[];
1924
2957
  export declare function getShader<K extends ShaderName>(name: K): ShaderRegistry[K];
1925
2958
  export declare function isShaderName(value: string): value is ShaderName;
2959
+ /**
2960
+ * Whether a shader invents its picture or reads one.
2961
+ *
2962
+ * Comes from the build, which reads it off the folder the WGSL lives in, so it
2963
+ * cannot disagree with the bindings the shader actually declares.
2964
+ */
2965
+ export declare function shaderKind(name: ShaderName): ShaderKind;
2966
+ export declare function isSourceShader(name: ShaderName): boolean;
2967
+ /**
2968
+ * The shader a source shader reads when the caller supplies nothing.
2969
+ *
2970
+ * Read through the wide `ShaderDefinition` type on purpose: only source shaders
2971
+ * carry `defaultSource`, so the narrowed literal union does not have the
2972
+ * property and every call site would otherwise need its own cast.
2973
+ */
2974
+ export declare function defaultSourceOf(name: ShaderName): ShaderName | undefined;
1926
2975
  /** Every control name a given shader exposes. */
1927
2976
  export type ControlName<K extends ShaderName> = keyof ShaderRegistry[K]["controls"];
1928
2977
  /** The params object a user writes in a config for shader `K`. */