PageSourceSearch

https://21st.dev/_next/static/chunks/21911-7931039735bcffde.js

js 21st.dev collected 2026-09-24 20:41:58 UTC 33,474 bytes, 446 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21911],{821911:(e,a,t)=>{t.d(a,{Li:()=>r,T:()=>f,ZC:()=>u,bO:()=>l,cI:()=>p,l6:()=>n,lZ:()=>c,uk:()=>d,xV:()=>s,yj:()=>h});let l={silk:["#0B1026","#3D46E8","#B18CFF","#FFD6E7"],smoke:["#02010A","#04052E","#3D2C8D","#916BBF"],flow:["#160B0B","#C2402A","#F49D37","#FFE8C2"],waves:["#031C26","#1B6CA8","#5AD2F4","#EAF9FF"],aurora:["#0A0A12","#5B2A86","#D64FA8","#FFC2E2"],orb:["#140A00","#FF6D00","#FFC300","#FFF1B8"],caustics:["#001219","#005F73","#94D2BD","#E9D8A6"],mesh:["#231A10","#A47148","#E3B587","#F9F1E7"],metaballs:["#000000","#1F51FF","#00E5FF","#EAFDFF"],plasma:["#12000A","#E63976","#FF9770","#FFECD1"],stripes:["#0D1B0F","#3E8E41","#C7F464","#FFFDE1"],rings:["#10002B","#5A189A","#9D4EDD","#E0AAFF"],halftone:["#101010","#F5F5F5","#B0B0B0","#3A3A3A"],"paper-mesh-gradient":["#120D31","#6C4CF1","#EF5DA8","#FFD166"],"paper-static-mesh-gradient":["#081C15","#2D6A4F","#95D5B2","#FFF3B0"],"paper-static-radial-gradient":["#08051A","#3A0CA3","#F72585","#FFD6FF"],"paper-paper-texture":["#FFFFFF","#9FADBC","#D8D4CA","#777168"],"paper-water":["#101820","#536878","#B8E1FF","#FFFFFF"],"paper-image-dithering":["#000C38","#94FFAF","#EAFF94","#FFFFFF"],"paper-dithering":["#0B0B0C","#343A40","#ADB5BD","#F8F9FA"],"paper-dot-grid":["#071013","#155E75","#22D3EE","#ECFEFF"],"paper-warp":["#16051B","#7E22CE","#F43F5E","#FDE68A"],"paper-swirl":["#09090B","#1D4ED8","#A855F7","#F0ABFC"],"paper-waves":["#031926","#0E7490","#38BDF8","#E0F2FE"],"paper-perlin-noise":["#101408","#4D7C0F","#A3E635","#F7FEE7"],"paper-simplex-noise":["#4449CF","#FFD1E0","#F94446","#FFD36B","#FFFFFF"],"paper-metaballs":["#08080A","#DC2626","#FB923C","#FEF3C7"],"paper-liquid-metal":["#09090B","#52525B","#D4D4D8","#FFFFFF"],"paper-gem-smoke":["#110907","#9F1239","#F59E0B","#FFF7ED"],"paper-fluted-glass":["#071A24","#155E75","#67E8F9","#F0FDFA"],"paper-halftone-dots":["#111111","#525252","#D4D4D4","#FAFAFA"],"paper-halftone-cmyk":["#FBFAF5","#00B4FF","#FC519F","#FFD800","#231F20"],"paper-heatmap":["#000000","#11206A","#2F63E7","#6BD7FF","#FFE679","#FF4C00"],"paper-neuro-noise":["#07030D","#2A0A48","#D62976","#FFDA79"],"paper-smoke-ring":["#05070F","#102A43","#6A5AE0","#F3C4FB"],"paper-god-rays":["#050308","#4C1036","#E35D3E","#FFD166"],"paper-pulsing-border":["#05070D","#1261A0","#35C4E8","#F2FBFF"],"paper-color-panels":["#07050D","#291257","#A83CA8","#FF9E64"],"paper-voronoi":["#061014","#0E7490","#67E8F9","#ECFEFF"],"paper-dot-orbit":["#100B08","#D97706","#FBBF24","#FFF7D6"],"paper-spiral":["#090411","#4C1D95","#C026D3","#F5D0FE"],"paper-grain-gradient":["#0A0A0A","#3F3CBB","#DB4B8F","#FFD66B"]},r=[{id:"silk",label:"Silk",group:"Flow",body:`vec3 shade(vec2 uv, vec2 p, float t) {
2  vec2 q = p * 1.6;
3  float amp = 0.25 + u_intensity * 0.85;
4  for (float i = 1.0; i < 5.0; i += 1.0) {
5    q.x += amp / i * cos(i * 2.4 * q.y + t * 0.8 + u_seed);
6    q.y += amp / i * cos(i * 1.7 * q.x + t * 0.6);
7  }
8  return palette(0.5 + 0.5 * sin(q.x + q.y));
9}`},{id:"smoke",label:"Smoke",group:"Flow",body:`vec3 shade(vec2 uv, vec2 p, float t) {
10  float warp = 2.0 + u_intensity * 4.0;
11  vec2 q = vec2(fbm(p + t * 0.08), fbm(p + vec2(5.2, 1.3) - t * 0.06));
12  vec2 r = vec2(fbm(p + warp * q + vec2(1.7, 9.2)),
13                fbm(p + warp * q + vec2(8.3, 2.8)));
14  return palette(fbm(p + 3.0 * r + u_seed));
15}`},{id:"flow",label:"Flow field",group:"Flow",body:`vec3 shade(vec2 uv, vec2 p, float t) {
16  float a = fbm(p * 2.0 + u_seed) * 6.2831;
17  vec2 dir = vec2(cos(a), sin(a));
18  float v = fbm(p * 3.0 + dir * (u_intensity * 2.0) + t * 0.12);
19  return palette(v);
20}`},{id:"waves",label:"Waves",group:"Flow",body:`vec3 shade(vec2 uv, vec2 p, float t) {
21  float y = uv.y
22    + sin(uv.x * (3.0 + u_intensity * 9.0) + t * 0.8) * 0.08
23    + (fbm(p * 2.0 + t * 0.1) - 0.5) * u_intensity * 0.6;
24  return palette(y);
25}`},{id:"aurora",label:"Aurora",group:"Light",body:`vec3 shade(vec2 uv, vec2 p, float t) {
26  float curtain = fbm(vec2(p.x * 2.0 + t * 0.15, p.y * 0.6 - t * 0.05) + u_seed);
27  float band = fbm(vec2(p.x * 3.5 - t * 0.1, curtain * (2.0 + u_intensity * 3.0)));
28  float glow = smoothstep(0.15, 0.85, band) * (1.0 - abs(p.y) * 0.7);
29  return palette(clamp(glow, 0.0, 1.0));
30}`},{id:"orb",label:"Orb",group:"Light",body:`vec3 shade(vec2 uv, vec2 p, float t) {
31  float wob = fbm(p * 2.0 + t * 0.25 + u_seed) - 0.5;
32  float d = length(p) + wob * u_intensity * 0.5;
33  float core = 1.0 - smoothstep(0.0, 0.75, d);
34  float halo = exp(-d * 2.5) * 0.5;
35  return palette(clamp(core + halo, 0.0, 1.0));
36}`},{id:"caustics",label:"Caustics",group:"Light",body:`vec3 shade(vec2 uv, vec2 p, float t) {
37  vec2 g = p * (3.0 + u_intensity * 4.0);
38  vec2 ig = floor(g);
39  vec2 fg = fract(g);
40  float m = 1.0;
41  for (int y = -1; y <= 1; y++) {
42    for (int x = -1; x <= 1; x++) {
43      vec2 o = vec2(float(x), float(y));
44      vec2 r = o + 0.5 + 0.45 * sin(t * 0.7 + 6.2831 * hash22(ig + o + u_seed)) - fg;
45      m = min(m, dot(r, r));
46    }
47  }
48  float v = 1.0 - smoothstep(0.0, 1.0, m);
49  return palette(pow(v, 2.2));
50}`},{id:"mesh",label:"Mesh drift",group:"Blobs",body:`vec3 shade(vec2 uv, vec2 p, float t) {
51  vec3 acc = u_colors[0] * 0.15;
52  float total = 0.15;
53  for (int i = 0; i < 8; i++) {
54    if (float(i) >= u_colorCount) break;
55    float fi = float(i);
56    vec2 c = vec2(
57      sin(t * (0.21 + fi * 0.071) + fi * 2.4 + u_seed),
58      cos(t * (0.17 + fi * 0.093) + fi * 1.7)) * (0.45 + u_intensity * 0.35);
59    float w = exp(-dot(p - c, p - c) * 6.0);
60    acc += u_colors[i] * w;
61    total += w;
62  }
63  return acc / total;
64}`},{id:"metaballs",label:"Metaballs",group:"Blobs",intensityLabel:"Blob size",paramLabel:"Gooe
64yness",body:`vec3 shade(vec2 uv, vec2 p, float t) {
65  float field = 0.0;
66  for (int i = 0; i < 5; i++) {
67    float fi = float(i);
68    vec2 c = vec2(sin(t * (0.3 + fi * 0.11) + fi * 2.0 + u_seed),
69                  cos(t * (0.23 + fi * 0.13) + fi * 1.3)) * 0.55;
70    field += (0.04 + u_intensity * 0.06) / (dot(p - c, p - c) + 0.003);
71  }
72  return palette(smoothstep(0.4, 1.9 - u_paramA * 1.3, field));
73}`},{id:"plasma",label:"Plasma",group:"Pattern",body:`vec3 shade(vec2 uv, vec2 p, float t) {
74  float k = 2.0 + u_intensity * 6.0;
75  float v = sin(p.x * k + t) + sin(p.y * k * 0.8 - t * 0.7)
76    + sin((p.x + p.y) * k * 0.6 + t * 0.5)
77    + sin(length(p) * k * 1.2 - t);
78  return palette(0.5 + 0.5 * sin(v + u_seed));
79}`},{id:"stripes",label:"Warp stripes",group:"Pattern",intensityLabel:"Warp",paramLabel:"Stripes",body:`vec3 shade(vec2 uv, vec2 p, float t) {
80  float warp = fbm(p * 1.5 + t * 0.15 + u_seed) * u_intensity * 2.0;
81  float freq = 3.0 + u_paramA * 20.0;
82  float s = 0.5 + 0.5 * sin((p.x * 0.8 + p.y * 0.4 + warp) * freq + t * 0.5);
83  return palette(s);
84}`},{id:"rings",label:"Rings",group:"Pattern",intensityLabel:"Wobble",paramLabel:"Rings",body:`vec3 shade(vec2 uv, vec2 p, float t) {
85  float w = fbm(p * 2.5 + t * 0.1) * u_intensity * 0.8;
86  float freq = 4.0 + u_paramA * 30.0;
87  return palette(0.5 + 0.5 * sin(length(p) * freq - t * 1.5 + w * 6.0 + u_seed));
88}`},{id:"halftone",label:"Halftone",group:"Pattern",intensityLabel:"Cells",paramLabel:"Dot size",body:`vec3 shade(vec2 uv, vec2 p, float t) {
89  float cells = 18.0 + u_intensity * 30.0;
90  vec2 f = fract(p * cells) - 0.5;
91  float field = 0.5 + 0.5 * sin(p.x * 3.0 + t + u_seed) * sin(p.y * 2.4 - t * 0.7);
92  float r = (0.06 + u_paramA * 0.34) + field * 0.2;
93  float dotMask = 1.0 - smoothstep(r - 0.08, r, length(f));
94  return mix(u_colors[0], palette(field), dotMask);
95}`},{id:"paper-mesh-gradient",label:"Mesh Gradient",group:"Paper Shaders",intensityLabel:"Spread",paramLabel:"Softness",source:{label:"Paper Shaders",url:"https://shaders.paper.design/mesh-gradient"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
96  vec3 color = u_colors[0] * 0.16;
97  float weight = 0.16;
98  for (int i = 0; i < 8; i++) {
99    if (float(i) >= u_colorCount) break;
100    float fi = float(i);
101    vec2 center = vec2(sin(fi * 2.17 + t * 0.13 + u_seed),
102                       cos(fi * 1.63 - t * 0.11)) * (0.22 + u_intensity * 0.62);
103    float falloff = mix(12.0, 2.4, u_paramA);
104    float influence = exp(-dot(p - center, p - center) * falloff);
105    color += u_colors[i] * influence;
106    weight += influence;
107  }
108  return color / weight;
109}`},{id:"paper-static-mesh-gradient",label:"Static Mesh Gradient",group:"Paper Shaders",intensityLabel:"Spread",paramLabel:"Softness",source:{label:"Paper Shaders",url:"https://shaders.paper.design/static-mesh-gradient"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
110  vec3 color = u_colors[0] * 0.2;
111  float weight = 0.2;
112  for (int i = 0; i < 8; i++) {
113    if (float(i) >= u_colorCount) break;
114    float fi = float(i);
115    vec2 center = (hash22(vec2(fi, u_seed)) - 0.5) * (0.7 + u_intensity * 1.4);
116    float influence = exp(-dot(p - center, p - center) * mix(13.0, 2.0, u_paramA));
117    color += u_colors[i] * influence;
118    weight += influence;
119  }
120  return color / weight;
121}`},{id:"paper-static-radial-gradient",label:"Static Radial Gradient",group:"Paper Shaders",intensityLabel:"Center",paramLabel:"Falloff",source:{label:"Paper Shaders",url:"https://shaders.paper.design/static-radial-gradient"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
122  vec2 center = (hash22(vec2(u_seed, 4.7)) - 0.5) * u_intensity;
123  float radius = length(p - center);
124  float ripple = (fbm(p * 2.0 + u_seed) - 0.5) * (1.0 - u_paramA) * 0.35;
125  return palette(clamp(radius * mix(1.9, 0.65, u_paramA) + ripple, 0.0, 1.0));
126}`},{id:"paper-paper-texture",label:"Paper Texture",group:"Paper Shaders",intensityLabel:"Roughness",paramLabel:"Fiber size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/paper-texture"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
127  float fiberSize = mix(260.0, 42.0, u_paramA);
128  float fibers = hash21(vec2(floor(uv.x * fiberSize), floor(uv.y * fiberSize * 0.24)) + u_seed);
129  float fineFiber = hash21(floor(uv * fiberSize * 2.7) + u_seed * 2.3);
130  float crumples = fbm(p * (2.0 + u_intensity * 4.5) + u_seed);
131  float foldAngle = atan(p.y, p.x);
132  float folds = abs(sin(foldAngle * (3.0 + floor(u_paramA * 10.0)) + crumples * 2.2));
133  folds = pow(folds, 10.0) * (0.12 + u_intensity * 0.3);
134  float drops = smoothstep(0.82, 0.98, fbm(p * 9.0 + 7.4 + u_seed)) * u_intensity;
135  float texture = clamp(0.42 + (crumples - 0.5) * u_intensity + (fibers - 0.5) * 0.34
136    + (fineFiber - 0.5) * 0.14 + folds - drops * 0.28, 0.0, 1.0);
137  return palette(texture);
138}`},{id:"paper-water",label:"Water",group:"Paper Shaders",intensityLabel:"Waves",paramLabel:"Caustics",source:{label:"Paper Shaders",url:"https://shaders.paper.design/water"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
139  vec2 q = p * (3.0 + u_intensity * 4.0);
140  q += vec2(
141    sin(q.y * 1.7 + t * 0.55),
142    cos(q.x * 1.45 - t * 0.42)
143  ) * (0.12 + u_intensity * 0.22);
144  vec2 cell = floor(q);
145  vec2 local = fract(q);
146  float nearest = 2.0;
147  for (int y = -1; y <= 1; y++) {
148    for (int x = -1; x <= 1; x++) {
149      vec2 offset = vec2(float(x), float(y));
150      vec2 point = offset + 0.5
151        + 0.38 * sin(t * 0.7 + 6.2831853 * hash22(cell + offset + u_seed))
152        - local;
153      nearest = min(nearest, dot(point, point));
154    }
155  }
156  float ripple = 0.5 + 0.5 * sin((q.x + q.y) * 2.2 - t * 1.4);
157  float caustic = pow(1.0 - smoothstep(0.0, 0.72, nearest), mix(4.0, 1.2, u_paramA));
158  return palette(clamp(ripple * (1.0 - u_paramA * 0.55) + caustic * (0.5 + u_paramA), 0.0, 1.0));
159}`},{id:"paper-image-dithering",label:"Image Dithering",group:"Paper Shaders",intensityLabel:"Color steps",paramLabel:"Pixel size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/image-dithering"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
160  float pixels = mix(190.0, 24.0, u_paramA);
161  vec2 pixel = floor(uv * pixels);
162  vec2 sampleUv = (pixel + 0.5) / pixels;
163  vec2 sampleP = (sampleUv - 0.5) * 2.0;
164  float source = 0.52
165    + 0.24 * sin(sampleP.x * 3.2 + u_seed)
166    + 0.18 * sin(sampleP.y * 4.1 - u_seed * 0.7)
167    + (fbm(sampleP * 2.6 + u_seed) - 0.5) * 0.45;
168  float threshold = fract(dot(mod(pixel, 8.0), vec2(0.75487766, 0.56984029)));
169  float steps = 2.0 + floor(u_intensity * 7.0);
170  float dithered = floor(clamp(source, 0.0, 1.0) * steps + threshold) / steps;
171  return palette(clamp(dithered, 0.0, 1.0));
172}`},{id:"paper-dithering",label:"Dithering",group:"Paper Shaders",intensityLabel:"Pattern",paramLabel:"Pixel size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/dithering"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
173  float cells = mix(180.0, 28.0, u_paramA);
174  vec2 pixel = floor(uv * cells);
175  float field = fbm(p * (1.7 + u_intensity * 4.0) + vec2(t * 0.08, -t * 0.05));
176  float threshold = fract(dot(pixel, vec2(0.75487766, 0.56984029)));
177  float steps = mix(2.0, 7.0, u_intensity);
178  float dithered = floor(field * steps + threshold) / steps;
179  return palette(dithered);
180}`},{id:"paper-dot-grid",label:"Dot Grid",group:"Paper Shaders",intensityLabel:"Distortion",paramLabel:"Dot size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/dot-grid"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
181  float cells = 8.0 + u_intensity * 25.0;
182  vec2 grid = p * cells;
183  vec2 id = floor(grid);
184  vec2 local = fract(grid) - 0.5;
185  vec2 shift = (hash22(id + u_seed) - 0.5) * u_intensity * 0.35;
186  float wave = 0.5 + 0.5 * sin(id.x * 0.6 + id.y * 0.4 + t);
187  float radius = mix(0.08, 0.42, u_paramA) * mix(0.55, 1.0, wave);
188  float dotMask = 1.0 - smoothstep(radius * 0.75, radius, length(local - shift));
189  return mix(u_colors[0], palette(wave), dotMask);
190}`},{id:"paper-warp",label:"Warp",group:"Paper Shaders",intensityLabel:"Distortion",paramLabel:"Bands",source:{label:"Paper Shaders",url:"https://shaders.paper.design/warp"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
191  vec2 q = p;
192  float distortion = 0.25 + u_intensity * 1.6;
193  q += vec2(fbm(q * 1.8 + t * 0.08), fbm(q * 1.8 - t * 0.06 + 6.1)) * distortion;
194  float bands = 2.0 + u_paramA * 12.0;
195  return palette(0.5 + 0.5 * sin((q.x + q.y * 0.55) * bands + t * 0.35));
196}`},{id:"paper-swirl",label:"Swirl",group:"Paper Shaders",intensityLabel:"Twist",paramLabel:"Arms",source:{label:"Paper Shaders",url:"https://shaders.paper.design/swirl"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
197  float radius = length(p);
198  float angle = atan(p.y, p.x) + radius * (2.0 + u_intensity * 12.0);
199  float arms = 2.0 + floor(u_paramA * 10.0);
200  float turbulence = (fbm(p * 2.4 + t * 0.08) - 0.5) * u_intensity * 2.0;
201  float value = 0.5 + 0.5 * sin(angle * arms - t + turbulence);
202  return palette(clamp(value * (1.1 - radius * 0.22), 0.0, 1.0));
203}`},{id:"paper-waves",label:"Waves",group:"Paper Shaders",intensityLabel:"Amplitude",paramLabel:"Frequency",source:{label:"Paper Shaders",url:"https://shaders.paper.design/waves"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
204  float frequency = 2.0 + u_paramA * 14.0;
205  float wave = p.y + sin(p.x * frequency + t) * (0.08 + u_intensity * 0.42);
206  wave += sin((p.x + p.y) * frequency * 0.63 - t * 0.7) * u_intensity * 0.16;
207  wave += (fbm(p * 2.0 + t * 0.04) - 0.5) * u_intensity * 0.28;
208  return palette(0.5 + 0.5 * sin(wave * 4.0));
209}`},{id:"paper-perlin-noise",label:"Perlin Noise",group:"Paper Shaders",intensityLabel:"Scale",paramLabel:"Turbulence",source:{label:"Paper Shaders",url:"https://shaders.paper.design/perlin-noise"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
210  vec2 q = p * (1.0 + u_intensity * 6.0);
211  float base = fbm(q + vec2(t * 0.08, -t * 0.05) + u_seed);
212  float turbulence = fbm(q * 2.1 + base * (1.0 + u_paramA * 4.0));
213  return palette(mix(base, turbulence, u_paramA));
214}`},{id:"paper-simplex-noise",label:"Simplex Noise",group:"Paper Shaders",intensityLabel:"Color steps",paramLabel:"Softness",source:{label:"Paper Shaders",url:"https://shaders.paper.design/simplex-noise"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
215  vec2 q = p * 0.32;
216  float first = fbm(q - vec2(0.0, t * 0.06) + u_seed);
217  float second = fbm(q * 2.0 + vec2(0.0, t * 0.064) - u_seed * 0.17);
218  float shape = clamp(0.5 * first + 0.5 * second, 0.0, 1.0);
219  float steps = 2.0 + floor(u_intensity * 18.0);
220  float stepped = floor(shape * steps) / steps;
221  float softened = mix(stepped, shape, u_paramA);
222  return palette(softened);
223}`},{id:"paper-metaballs",label:"Metaballs",group:"Paper Shaders",intensityLabel:"Blob size",paramLabel:"Gooe
223yness",source:{label:"Paper Shaders",url:"https://shaders.paper.design/metaballs"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
224  float field = 0.0;
225  for (int i = 0; i < 7; i++) {
226    float fi = float(i);
227    vec2 center = vec2(sin(t * (0.19 + fi * 0.037) + fi * 2.1 + u_seed),
228                       cos(t * (0.16 + fi * 0.043) + fi * 1.4)) * 0.63;
229    field += (0.025 + u_intensity * 0.065) / (dot(p - center, p - center) + 0.006);
230  }
231  float surface = smoothstep(mix(1.8, 0.45, u_paramA), mix(2.3, 0.8, u_paramA), field);
232  return palette(clamp(surface + field * 0.05, 0.0, 1.0));
233}`},{id:"paper-liquid-metal",label:"Liquid Metal",group:"Paper Shaders",intensityLabel:"Distortion",paramLabel:"Repetition",source:{label:"Paper Shaders",url:"https://shaders.paper.design/liquid-metal"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
234  float angle = atan(p.y, p.x);
235  float radius = length(p);
236  float shapeMode = floor(u_paramA * 3.99);
237  float circleShape = radius;
238  float diamondShape = abs(p.x) + abs(p.y);
239  float daisyShape = radius - (0.08 + u_intensity * 0.05) * cos(angle * 8.0);
240  float shape = mix(circleShape, diamondShape, step(0.5, shapeMode));
241  shape = mix(shape, daisyShape, step(1.5, shapeMode));
242  float noise = fbm(p * 3.0 + vec2(t * 0.12, -t * 0.08) + u_seed);
243  float contour = shape + (noise - 0.5) * u_intensity * 0.24;
244  float mask = 1.0 - smoothstep(0.48, 0.58, contour);
245  float repetition = 3.0 + u_paramA * 17.0;
246  float bands = 0.5 + 0.5 * sin((p.x * 0.7 + p.y * 0.3 + noise * 0.7) * repetition - t);
247  float shine = pow(bands, mix(7.0, 1.5, u_intensity));
248  vec3 metal = palette(clamp(bands * 0.6 + shine * 0.7, 0.0, 1.0));
249  float rim = exp(-abs(contour - 0.53) * 35.0);
250  return mix(u_colors[0] * 0.3, metal + rim * u_colors[3] * 0.35, mask);
251}`},{id:"paper-gem-smoke",label:"Gem Smoke",group:"Paper Shaders",intensityLabel:"Distortion",paramLabel:"Shape",source:{label:"Paper Shaders",url:"https://shaders.paper.design/gem-smoke"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
252  float angle = atan(p.y, p.x);
253  float radius = length(p);
254  float shapeMode = floor(u_paramA * 4.99);
255  float circleShape = radius;
256  float daisyShape = radius - 0.1 * cos(angle * 8.0);
257  float diamondShape = abs(p.x) + abs(p.y);
258  float metaballShape = min(length(p - vec2(0.2, 0.0)), length(p + vec2(0.2, 0.0)));
259  float shape = mix(circleShape, daisyShape, step(0.5, shapeMode));
260  shape = mix(shape, diamondShape, step(1.5, shapeMode));
261  shape = mix(shape, metaballShape, step(2.5, shapeMode));
262  vec2 smokeUv = vec2(angle * 0.55, radius * 3.2 - t * 0.11);
263  float smoke = fbm(smokeUv + vec2(t * 0.05, u_seed));
264  smoke += 0.5 * fbm(p * 5.0 + vec2(-t * 0.08, t * 0.06));
265  float distorted = shape + (smoke - 0.7) * (0.12 + u_intensity * 0.38);
266  float inside = 1.0 - smoothstep(0.4, 0.58, distorted);
267  float outerGlow = exp(-abs(distorted - 0.52) * (5.0 + (1.0 - u_intensity) * 12.0));
268  vec3 glow = palette(clamp(smoke * 0.65 + outerGlow * 0.55, 0.0, 1.0));
269  return mix(u_colors[0] * 0.25, glow, clamp(inside * 0.75 + outerGlow, 0.0, 1.0));
270}`},{id:"paper-fluted-glass",label:"Fluted Glass",group:"Paper Shaders",intensityLabel:"Distortion",paramLabel:"Flute size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/fluted-glass"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
271  float flutes = mix(42.0, 7.0, u_paramA);
272  float cell = fract((p.x + 1.0) * flutes) - 0.5;
273  float prism = sin(cell * 3.1415926) * (0.03 + u_intensity * 0.2);
274  vec2 samplePoint = p + vec2(prism, sin(p.x * flutes + t * 0.2) * prism * 0.35);
275  float field = fbm(samplePoint * 2.2 + vec2(t * 0.035, -t * 0.025) + u_seed);
276  field += 0.24 * sin(samplePoint.y * 3.0 + samplePoint.x * 1.3);
277  float highlight = pow(1.0 - abs(cell) * 2.0, mix(12.0, 2.0, u_intensity));
278  float shadow = smoothstep(0.18, 0.5, abs(cell));
279  vec3 glass = palette(clamp(field + highlight * 0.3, 0.0, 1.0));
280  return glass * (0.72 + highlight * 0.42 - shadow * 0.12);
281}`},{id:"paper-halftone-dots",label:"Halftone Dots",group:"Paper Shaders",intensityLabel:"Grid",paramLabel:"Dot size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/halftone-dots"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
282  float cells = 13.0 + u_intensity * 42.0;
283  vec2 grid = p * cells;
284  vec2 id = floor(grid);
285  vec2 local = fract(grid) - 0.5;
286  if (mod(id.y, 2.0) > 0.5) local.x += 0.5;
287  local.x = fract(local.x + 0.5) - 0.5;
288  float source = fbm(p * 2.1 + vec2(t * 0.025, -t * 0.018) + u_seed);
289  source = mix(source, 0.5 + 0.5 * sin(p.x * 2.7 + p.y * 1.9), 0.35);
290  float radius = (0.08 + source * 0.36) * mix(0.55, 1.45, u_paramA);
291  float grain = (hash21(id + u_seed) - 0.5) * u_intensity * 0.08;
292  float dotMask = 1.0 - smoothstep(radius - 0.055, radius + 0.025, length(local) + grain);
293  return mix(u_colors[0], palette(source), dotMask);
294}`},{id:"paper-halftone-cmyk",label:"Halftone CMYK",group:"Paper Shaders",intensityLabel:"Ink gain",paramLabel:"Dot size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/halftone-cmyk"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
295  float cells = mix(52.0, 10.0, u_paramA);
296  float source = clamp(0.5 + 0.28 * sin(p.x * 2.7 + u_seed)
297    + 0.22 * sin(p.y * 3.3 - u_seed) + (fbm(p * 2.0) - 0.5) * 0.35, 0.0, 1.0);
298  vec2 cyanUv = mat2(0.966, -0.259, 0.259, 0.966) * p * cells;
299  vec2 magentaUv = mat2(0.707, -0.707, 0.707, 0.707) * p * cells;
300  vec2 yellowUv = mat2(1.0, 0.0, 0.0, 1.0) * p * cells;
301  vec2 blackUv = mat2(0.259, -0.966, 0.966, 0.259) * p * cells;
302  float gain = 0.12 + u_intensity * 0.32;
303  float cyan = 1.0 - smoothstep(gain, gain + 0.08, length(fract(cyanUv) - 0.5) - source * 0.17);
304  float magenta = 1.0 - smoothstep(gain, gain + 0.08, length(fract(magentaUv) - 0.5) - (1.0 - source) * 0.16);
305  float yellow = 1.0 - smoothstep(gain, gain + 0.08, length(fract(yellowUv) - 0.5) - abs(source - 0.5) * 0.24);
306  float black = 1.0 - smoothstep(gain * 0.72, gain * 0.72 + 0.07, length(fract(blackUv) - 0.5) - (1.0 - source) * 0.1);
307  vec3 color = u_colors[0];
308  color = mix(color, u_colors[1], cyan * 0.75);
309  color = mix(color, u_colors[2], magenta * 0.72);
310  color = mix(color, u_colors[3], yellow * 0.66);
311  color = mix(color, u_colors[4], black * 0.72);
312  return color;
313}`},{id:"paper-heatmap",label:"Heatmap",group:"Paper Shaders",intensityLabel:"Contours",paramLabel:"Glow",source:{label:"Paper Shaders",url:"https://shaders.paper.design/heatmap"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
314  float field = 0.0;
315  for (int i = 0; i < 6; i++) {
316    float fi = float(i);
317    vec2 center = vec2(
318      sin(fi * 2.17 + t * (0.08 + fi * 0.012) + u_seed),
319      cos(fi * 1.43 - t * (0.07 + fi * 0.01))
320    ) * (0.2 + 0.1 * mod(fi, 3.0));
321    field += (0.045 + u_paramA * 0.06) / (dot(p - center, p - center) + 0.018);
322  }
323  field += (fbm(p * 2.4 + vec2(t * 0.025, -t * 0.02)) - 0.5) * u_intensity;
324  float bands = 3.0 + floor(u_intensity * 9.0);
325  float contour = floor(clamp(field * 0.18, 0.0, 1.0) * bands) / bands;
326  float glow = smoothstep(0.0, mix(0.35, 0.04, u_paramA), abs(fract(field * 0.65) - 0.5));
327  return palette(clamp(contour + glow * u_paramA * 0.16, 0.0, 1.0));
328}`},{id:"paper-neuro-noise",label:"Neuro Noise",group:"Paper Shaders",intensityLabel:"Filaments",paramLabel:"Glow",source:{label:"Paper Shaders",url:"https://shaders.paper.design/neuro-noise"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
329  vec2 q = p * (1.6 + u_intensity * 2.4);
330  float field = 0.0;
331  float weight = 0.55;
332  for (int i = 0; i < 6; i++) {
333    float fi = float(i);
334    q += vec2(
335      sin(q.y * (1.7 + fi * 0.09) + t * (0.35 + fi * 0.04) + u_seed),
336      cos(q.x * (1.5 + fi * 0.11) - t * (0.28 + fi * 0.03))
337    ) * (0.22 + u_intensity * 0.14);
338    float filaments = abs(sin(q.x + q.y + fi * 0.72));
339    field += weight / (0.08 + filaments);
340    weight *= 0.62;
341    q = q.yx * vec2(-1.08, 1.04);
342  }
343  float glow = 1.0 - exp(-field * (0.018 + u_paramA * 0.04));
344  return palette(clamp(glow, 0.0, 1.0));
345}`},{id:"paper-smoke-ring",label:"Smoke Ring",group:"Paper Shaders",intensityLabel:"Smoke",paramLabel:"Ring size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/smoke-ring"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
346  vec2 q = p;
347  float angle = atan(q.y, q.x);
348  float radius = length(q);
349  float smoke = fbm(vec2(angle * 0.7 + t * 0.08, radius * 3.0 - t * 0.12) + u_seed);
350  float curl = fbm(q * (2.0 + u_intensity * 3.0) + vec2(t * 0.07, -t * 0.05));
351  float target = mix(0.24, 0.72, u_paramA);
352  float width = 0.08 + u_intensity * 0.2;
353  float ring = 1.0 - smoothstep(width * 0.35, width, abs(radius + (smoke - 0.5) * 0.28 - target));
354  float haze = exp(-3.2 * radius) * curl * 0.45;
355  return palette(clamp(ring * (0.55 + smoke * 0.75) + haze, 0.0, 1.0));
356}`},{id:"paper-god-rays",label:"God Rays",group:"Paper Shaders",intensityLabel:"Ray density",paramLabel:"Bloom",source:{label:"Paper Shaders",url:"https://shaders.paper.design/god-rays"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
357  vec2 origin = vec2(0.0, -0.58);
358  vec2 q = p - origin;
359  float angle = atan(q.y, q.x);
360  float radius = length(q);
361  float density = 5.0 + u_intensity * 18.0;
362  float noise = fbm(vec2(angle * density * 0.16 + u_seed, radius * 1.7 - t * 0.08));
363  float rays = pow(max(0.0, sin(angle * density + noise * 5.0 + t * 0.16)), 5.0);
364  rays *= exp(-radius * 1.15) * (1.0 - smoothstep(0.05, 1.1, radius));
365  float bloom = exp(-radius * (9.0 - u_paramA * 6.0));
366  float v = clamp(rays * (0.8 + u_intensity) + bloom * (0.25 + u_paramA), 0.0, 1.0);
367  return palette(v);
368}`},{id:"paper-pulsing-border",label:"Pulsing Border",group:"Paper Shaders",intensityLabel:"Pulse",paramLabel:"Thickness",source:{label:"Paper Shaders",url:"https://shaders.paper.design/pulsing-border"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
369  vec2 box = vec2(0.82, 0.47);
370  vec2 d = abs(p) - box;
371  float outside = length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
372  float thickness = mix(0.018, 0.11, u_paramA);
373  float edge = 1.0 - smoothstep(thickness * 0.35, thickness, abs(outside));
374  float perimeter = atan(p.y * box.x, p.x * box.y) / 6.2831853 + 0.5;
375  float pulse = 0.5 + 0.5 * sin(perimeter * (5.0 + u_intensity * 9.0) - t * 1.8);
376  float trail = pow(pulse, mix(7.0, 2.0, u_intensity));
377  float innerGlow = exp(-abs(outside) * 24.0) * 0.32;
378  return mix(u_colors[0], palette(trail), clamp(edge + innerGlow, 0.0, 1.0));
379}`},{id:"paper-color-panels",label:"Color Panels",group:"Paper Shaders",intensityLabel:"Perspective",paramLabel:"Panels",source:{label:"Paper Shaders",url:"https://shaders.paper.design/color-panels"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
380  float perspective = 0.2 + u_intensity * 0.75;
381  float count = 3.0 + floor(u_paramA * 5.0);
382  float z = p.y + sin(p.x * 1.4 + t * 0.25) * perspective * 0.22;
383  float phase = p.x * count + z * perspective * 2.0 + t * 0.22;
384  float cell = fract(phase) - 0.5;
385  float panel = 1.0 - smoothstep(0.34, 0.49, abs(cell));
386  float bevel = 1.0 - smoothstep(0.28, 0.49, abs(cell));
387  float depth = 0.5 + 0.5 * cos((floor(phase) + z * 0.8) * 1.7);
388  float sheen = pow(max(0.0, 1.0 - abs(cell + sin(t * 0.2) * 0.25) * 2.0), 7.0);
389  vec3 colour = palette(clamp(depth + sheen * 0.45, 0.0, 1.0));
390  return mix(u_colors[0] * 0.35, colour * (0.65 + bevel * 0.5), panel);
391}`},{id:"paper-voronoi",label:"Voronoi",group:"Paper Shaders",intensityLabel:"Cells",paramLabel:"Edges",source:{label:"Paper Shaders",url:"https://shaders.paper.design/voronoi"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
392  vec2 grid = p * (3.0 + u_intensity * 9.0);
393  vec2 cell = floor(grid);
394  vec2 local = fract(grid);
395  float nearest = 8.0;
396  float second = 8.0;
397  float colourIndex = 0.0;
398  for (int y = -1; y <= 1; y++) {
399    for (int x = -1; x <= 1; x++) {
400      vec2 offset = vec2(float(x), float(y));
401      vec2 rnd = hash22(cell + offset + u_seed);
402      vec2 point = offset + 0.5 + 0.42 * sin(t * 0.3 + 6.2831853 * rnd) - local;
403      float dist = dot(point, point);
404      if (dist < nearest) {
405        second = nearest;
406        nearest = dist;
407        colourIndex = rnd.x;
408      } else if (dist < second) {
409        second = dist;
410      }
411    }
412  }
413  float edge = smoothstep(0.0, mix(0.18, 0.015, u_paramA), sqrt(second) - sqrt(nearest));
414  return mix(palette(colourIndex), u_colors[0], edge * 0.7);
415}`},{id:"paper-dot-orbit",label:"Dot Orbit",group:"Paper Shaders",intensityLabel:"Orbit",paramLabel:"Dot size",source:{label:"Paper Shaders",url:"https://shaders.paper.design/dot-orbit"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
416  float cells = 7.0 + floor(u_intensity * 15.0);
417  vec2 grid = p * cells;
418  vec2 id = floor(grid);
419  vec2 local = fract(grid) - 0.5;
420  vec2 rnd = hash22(id + u_seed);
421  float angle = t * (0.35 + rnd.x * 0.55) + rnd.y * 6.2831853;
422  float orbit = 0.06 + u_intensity * 0.26;
423  vec2 center = orbit * vec2(cos(angle), sin(angle));
424  float radius = mix(0.08, 0.32, u_paramA);
425  float dotMask = 1.0 - smoothstep(radius * 0.72, radius, length(local - center));
426  float halo = exp(-18.0 * length(local - center)) * 0.35;
427  return mix(u_colors[0], palette(rnd.x), clamp(dotMask + halo, 0.0, 1.0));
428}`},{id:"paper-spiral",label:"Spiral",group:"Paper Shaders",intensityLabel:"Twist",paramLabel:"Bands",source:{label:"Paper Shaders",url:"https://shaders.paper.design/spiral"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
429  float radius = length(p);
430  float angle = atan(p.y, p.x);
431  float twist = 3.0 + u_intensity * 13.0;
432  float bands = 3.0 + u_paramA * 15.0;
433  float smoke = (fbm(p * 2.2 + t * 0.06 + u_seed) - 0.5) * u_intensity;
434  float spiral = sin(angle * bands + radius * twist * bands - t * 1.1 + smoke * 3.0);
435  float edge = 0.5 + 0.5 * spiral;
436  float core = exp(-radius * 3.0) * 0.3;
437  return palette(clamp(edge * (1.0 - radius * 0.2) + core, 0.0, 1.0));
438}`},{id:"paper-grain-gradient",label:"Grain Gradient",group:"Paper Shaders",intensityLabel:"Shape",paramLabel:"Grain",source:{label:"Paper Shaders",url:"https://shaders.paper.design/grain-gradient"},body:`vec3 shade(vec2 uv, vec2 p, float t) {
439  vec2 q = p;
440  q.x += sin(q.y * 2.1 + t * 0.2) * (0.08 + u_intensity * 0.32);
441  q.y += cos(q.x * 2.7 - t * 0.17) * (0.06 + u_intensity * 0.26);
442  float wave = 0.5 + 0.5 * sin(q.x * 2.8 + q.y * 1.9 + fbm(q * 2.0) * 3.0);
443  float coarse = hash21(floor((uv + t * 0.002) * (90.0 + u_paramA * 260.0)) + u_seed);
444  float grain = (coarse - 0.5) * u_paramA * 0.42;
445  return palette(clamp(wave + grain, 0.0, 1.0));
446}`}],s=["Flow","Light","Blobs","Pattern","Paper Shaders"],o={"paper-mesh-gradient":["Default","Ink","Purple","Beach"],"paper-static-mesh-gradient":["Default","1960s","Sunset","Sea"],"paper-static-radial-gradient":["Default","Lo-Fi","Cross Section","Radial"],"paper-paper-texture":["Default","Cardboard","Abstract","Details"],"paper-water":["Default","Slow-mo","Abstract","Streaming"],"paper-image-dithering":["Default","Noise","Retro","Natural"],"paper-dithering":["Default","Warp","Sine Wave","Ripple","Bugs","Swirl"],"paper-grain-gradient":["Default","Wave","Dots","Truchet","Ripple","Blob"],"paper-dot-orbit":["Default","Bubbles","Shine","Hallucinatory"],"paper-dot-grid":["Default","Triangles","Tree line","Wallpaper"],"paper-warp":["Default","Cauldron Pot","Live Ink","Kelp","Nectar","Passion"],"paper-spiral":["Default","Jungle","Droplet","Swirl"],"paper-swirl":["Default","007","Opening","Candy"],"paper-waves":["Default","Groovy","Tangled up","Ride the wave"],"paper-neuro-noise":["Default","Sensation","Bloodstream","Ghost"],"paper-perlin-noise":["Default","Nintendo Water","Moss","Worms"],"paper-simplex-noise":["Default","Spots","First contact","Bubblegum"],"paper-voronoi":["Default","Lights","Cells","Bubbles"],"paper-pulsing-border":["Default","Circle","Northern lights","Solid line"],"paper-metaballs":["Default","Ink Drops","Solar","Background"],"paper-liquid-metal":["Default","Noir","Backdrop","Stripes"],"paper-gem-smoke":["Default","Circle","Daisy","Diamond","Metaballs"],"paper-fluted-glass":["Default","Abstract","Waves","Folds"],"paper-halftone-dots":["Default","LED screen","Mosaic","Round and square"],"paper-halftone-cmyk":["Default","Drops","Newspaper","Vintage"],"paper-heatmap":["Default","Sepia"],"paper-color-panels":["Default","Glass","Gradient","Opening"],"paper-smoke-ring":["Default","Line","Solar","Cloud"],"paper-god-rays":["Default","Warp","Linear","Ether"]},i={"paper-static-mesh-gradient":[1],"paper-paper-texture":[3],"paper-image-dithering":[1],"paper-swirl":[1,3],"paper-spiral":[1,2,3],"paper-grain-gradient":[1,2,4,5]};function p(e){return o[e]}function n(e){let a=o[e];if(!a)return;let t=new Set(i[e]??[]);return a.flatMap((e,a)=>t.has(a)?[]:[{index:a,label:e}])}function d(e,a){let t=o[e];if(!t)return;let r=Math.max(0,Math.min(t.length-1,Math.trunc(a))),s=[...l[e]],i=r%s.length,p=[...s.slice(i),...s.slice(0,i)];return r%2==1&&p.reverse(),{colors:p,intensity:35+17*r%58,paramA:"paper-gem-smoke"===e?[50,5,25,50,75][r]??50:28+23*r%65,speed:25+13*r%58,zoom:38+11*r%48,warp:0===r?0:12+19*r%55,detail:32+29*r%62,rotate:37*r%180,grain:0===r?12:9*r%38}}let u=r.map(e=>e.id);function c(e){return r.find(a=>a.id===e)??r[0]}function f(e){return c(e).label}function h(e){return r.filter(a=>a.group===e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.