shadertown 0.10.0 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,81 @@ deploys, not by this file.
6
6
  This project follows [semantic versioning](https://semver.org). Before 1.0 the
7
7
  minor number carries breaking changes, so pin it if that matters to you.
8
8
 
9
+ ## 0.13.0 — 2026-09-05
10
+
11
+ Auto judges a phone by its GPU, not by being a phone.
12
+
13
+ ### Changed
14
+
15
+ - **The device check uses detect-gpu.** `@pmndrs/detect-gpu` is now a
16
+ dependency, imported after the first frame is on screen, the way vgpu's
17
+ `adaptive-quality` example does it. Blocklisted GPUs and benchmark tiers 0
18
+ and 1 ask for Low; a software adapter still does so at once. The rule that
19
+ sent every mobile device to Low is gone: it put an iPhone 14 on Low before
20
+ it had drawn a frame, when its GPU benchmarks at the top tier. A GPU the
21
+ tables do not know keeps High and leaves the verdict to the frame rate.
22
+
23
+ ### Added
24
+
25
+ - **`configureQuality({ benchmarksUrl })`.** Serve detect-gpu's benchmark
26
+ tables from your own origin instead of unpkg. Call it before the first
27
+ canvas mounts.
28
+
29
+ ## 0.12.0 — 2026-09-05
30
+
31
+ Two quality tiers, and an Auto that picks between them.
32
+
33
+ ### Added
34
+
35
+ - **Two tiers.** Low clamps the device pixel ratio to 1 and halves the
36
+ iteration counts every shader marks as cost — march steps, noise octaves,
37
+ blur taps, rays — so a raymarch costs half on Low and not merely a quarter
38
+ of the pixels. All 72 shaders draw on both,
39
+ Gossamer and Louvres included.
40
+ - **`setQualityTier(tier)`.** One setting for the page: `auto`, `high` or
41
+ `low`, default `auto`. Every canvas follows it live, so a settings menu
42
+ calls it once and the whole page swaps. `qualityTier()` reads it and
43
+ `onQualityTier()` hears it change. A canvas that names `quality.tier` of
44
+ its own — on `<ShaderCanvas>`, `defineShader` or `createShaderRenderer` —
45
+ pins that tier and ignores the page's.
46
+ - **Auto.** The default. Starts on High and drops to Low once, when the device
47
+ class, a battery under 30% off the charger, or two seconds of presented
48
+ frames under 80% of the refresh rate ask for it. Every signal is advisory
49
+ and page-wide: the verdict is shared by every canvas on the page and
50
+ remembered for the ones created after. Ported from vgpu's
51
+ `adaptive-quality` example, without its detect-gpu dependency.
52
+ - **`onQualityChange`** on `<ShaderCanvas>`, `onQuality` on the renderer
53
+ options, and `renderer.quality` / `renderer.setTier()`: what was asked,
54
+ what is on screen, and why. The swap is a new surface and one uniform,
55
+ never a recompile.
56
+ - **`st_steps(n)` and `st_low()`** in the shared prelude, and a `quality`
57
+ field on `Params`. `st_fbm2`, `st_fbm3`, `st_ridge2` and `st_srcBlur` scale
58
+ their own loops with the tier.
59
+
60
+ ## 0.11.0 — 2026-09-04
61
+
62
+ Two shaders after two ReactBits backgrounds, each given its own name, look
63
+ and controls.
64
+
65
+ ### Added
66
+
67
+ - **`gossamer`.** After ReactBits' Ghost Fibers. A stack of layers, each a
68
+ field of fine parallel threads folded by a wave and twisted about the
69
+ centre, every layer half as bright as the one before and on its own clock,
70
+ so the threads drift over one another without repeating. A soft haze lies
71
+ between them in the second colour, a pool of light sits at the heart, and
72
+ the whole weave turns slowly. Drawn through the `glow` graph, so the threads
73
+ bleed the way a cobweb does with the light behind it. Layers, Wave,
74
+ Sharpness and Haze are its own controls, Twist rides on the warp slot, and
75
+ it ships four presets.
76
+ - **`louvres`.** After ReactBits' Gradient Blinds. A three-stop gradient laid
77
+ across the frame at an angle and cut into a run of slats, each shaded across
78
+ its own width like a louvre turned toward the light. A spotlight rides on
79
+ the pointer: inside it the gradient shows through, outside it the slats fall
80
+ to dark. The gradient drifts slowly along its own axis. Slats, Angle,
81
+ Spotlight and Softness are its own controls, Bend rides on the warp slot,
82
+ and it ships four presets. Seventy-two shaders in total.
83
+
9
84
  ## 0.10.0 — 2026-09-02
10
85
 
11
86
  Four shaders of light, and the small render graph that blooms them.
package/README.md CHANGED
@@ -40,8 +40,8 @@ npx add-mcp "npx -y shadertown@latest mcp" -n shadertown
40
40
 
41
41
  ## Licensing
42
42
 
43
- This package is MIT, and it draws all 70 shaders. What a licence buys is the
44
- readable source: 16 shaders hand theirs to anyone, the other 54 need
43
+ This package is MIT, and it draws all 72 shaders. What a licence buys is the
44
+ readable source: 16 shaders hand theirs to anyone, the other 56 need
45
45
  [Professional](https://www.shadertown.com/pricing). Source you have already
46
46
  vendored keeps working either way.
47
47