@poolzin/pool-bot 2026.1.37 → 2026.1.39
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 +9 -98
- package/dist/agents/tools/memory-tool.js +1 -2
- package/dist/agents/workspace.js +1 -5
- package/dist/build-info.json +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -17
- package/dist/commands/doctor-state-integrity.js +2 -14
- package/dist/config/types.js +0 -1
- package/dist/config/zod-schema.js +0 -6
- package/dist/discord/monitor/message-handler.process.js +6 -4
- package/dist/gateway/client.js +0 -14
- package/dist/gateway/server.impl.js +0 -4
- package/dist/memory/index.js +0 -5
- package/dist/memory/manager.js +2 -25
- package/dist/slack/monitor/message-handler/prepare.js +10 -4
- package/dist/slack/monitor/slash.js +10 -4
- package/extensions/memory-core/package.json +0 -3
- package/package.json +3 -2
- package/skills/webgpu-threejs-tsl/REFERENCE.md +0 -283
- package/skills/webgpu-threejs-tsl/SKILL.md +0 -91
- package/skills/webgpu-threejs-tsl/docs/compute-shaders.md +0 -404
- package/skills/webgpu-threejs-tsl/docs/core-concepts.md +0 -453
- package/skills/webgpu-threejs-tsl/docs/materials.md +0 -353
- package/skills/webgpu-threejs-tsl/docs/post-processing.md +0 -434
- package/skills/webgpu-threejs-tsl/docs/wgsl-integration.md +0 -324
- package/skills/webgpu-threejs-tsl/examples/basic-setup.js +0 -87
- package/skills/webgpu-threejs-tsl/examples/custom-material.js +0 -170
- package/skills/webgpu-threejs-tsl/examples/earth-shader.js +0 -292
- package/skills/webgpu-threejs-tsl/examples/particle-system.js +0 -259
- package/skills/webgpu-threejs-tsl/examples/post-processing.js +0 -199
- package/skills/webgpu-threejs-tsl/templates/compute-shader.js +0 -305
- package/skills/webgpu-threejs-tsl/templates/webgpu-project.js +0 -276
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
# TSL Post-Processing
|
|
2
|
-
|
|
3
|
-
Post-processing applies effects to the rendered image. TSL provides both built-in effects and the ability to create custom effects.
|
|
4
|
-
|
|
5
|
-
## Basic Setup
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
import * as THREE from 'three/webgpu';
|
|
9
|
-
import { pass } from 'three/tsl';
|
|
10
|
-
|
|
11
|
-
// Create renderer
|
|
12
|
-
const renderer = new THREE.WebGPURenderer();
|
|
13
|
-
await renderer.init();
|
|
14
|
-
|
|
15
|
-
// Create post-processing
|
|
16
|
-
const postProcessing = new THREE.PostProcessing(renderer);
|
|
17
|
-
|
|
18
|
-
// Create scene pass
|
|
19
|
-
const scenePass = pass(scene, camera);
|
|
20
|
-
const scenePassColor = scenePass.getTextureNode('output');
|
|
21
|
-
|
|
22
|
-
// Output (passthrough)
|
|
23
|
-
postProcessing.outputNode = scenePassColor;
|
|
24
|
-
|
|
25
|
-
// Render with post-processing
|
|
26
|
-
function animate() {
|
|
27
|
-
postProcessing.render(); // Not renderer.render()
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Built-in Effects
|
|
32
|
-
|
|
33
|
-
### Bloom
|
|
34
|
-
|
|
35
|
-
```javascript
|
|
36
|
-
import { bloom } from 'three/addons/tsl/display/BloomNode.js';
|
|
37
|
-
|
|
38
|
-
const scenePass = pass(scene, camera);
|
|
39
|
-
const scenePassColor = scenePass.getTextureNode('output');
|
|
40
|
-
|
|
41
|
-
// Add bloom
|
|
42
|
-
const bloomPass = bloom(scenePassColor);
|
|
43
|
-
|
|
44
|
-
// Configure
|
|
45
|
-
bloomPass.threshold.value = 0.5; // Brightness threshold
|
|
46
|
-
bloomPass.strength.value = 1.0; // Bloom intensity
|
|
47
|
-
bloomPass.radius.value = 0.5; // Blur radius
|
|
48
|
-
|
|
49
|
-
// Combine original + bloom
|
|
50
|
-
postProcessing.outputNode = scenePassColor.add(bloomPass);
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Gaussian Blur
|
|
54
|
-
|
|
55
|
-
```javascript
|
|
56
|
-
import { gaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
|
|
57
|
-
|
|
58
|
-
const blurred = gaussianBlur(scenePassColor, vec2(2.0)); // Blur strength
|
|
59
|
-
postProcessing.outputNode = blurred;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### FXAA (Anti-aliasing)
|
|
63
|
-
|
|
64
|
-
```javascript
|
|
65
|
-
import { fxaa } from 'three/addons/tsl/display/FXAANode.js';
|
|
66
|
-
|
|
67
|
-
postProcessing.outputNode = fxaa(scenePassColor);
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### SMAA (Anti-aliasing)
|
|
71
|
-
|
|
72
|
-
```javascript
|
|
73
|
-
import { smaa } from 'three/addons/tsl/display/SMAANode.js';
|
|
74
|
-
|
|
75
|
-
postProcessing.outputNode = smaa(scenePassColor);
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Depth of Field
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
import { dof } from 'three/addons/tsl/display/DepthOfFieldNode.js';
|
|
82
|
-
|
|
83
|
-
const scenePass = pass(scene, camera);
|
|
84
|
-
const colorNode = scenePass.getTextureNode('output');
|
|
85
|
-
const depthNode = scenePass.getTextureNode('depth');
|
|
86
|
-
|
|
87
|
-
const dofPass = dof(colorNode, depthNode, {
|
|
88
|
-
focus: 5.0, // Focus distance
|
|
89
|
-
aperture: 0.025, // Aperture size
|
|
90
|
-
maxblur: 0.01 // Maximum blur
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
postProcessing.outputNode = dofPass;
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Motion Blur
|
|
97
|
-
|
|
98
|
-
```javascript
|
|
99
|
-
import { motionBlur } from 'three/addons/tsl/display/MotionBlurNode.js';
|
|
100
|
-
|
|
101
|
-
const scenePass = pass(scene, camera);
|
|
102
|
-
const velocityPass = scenePass.getTextureNode('velocity');
|
|
103
|
-
|
|
104
|
-
const motionBlurPass = motionBlur(scenePassColor, velocityPass);
|
|
105
|
-
postProcessing.outputNode = motionBlurPass;
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Screen Space Reflections (SSR)
|
|
109
|
-
|
|
110
|
-
```javascript
|
|
111
|
-
import { ssr } from 'three/addons/tsl/display/SSRNode.js';
|
|
112
|
-
|
|
113
|
-
const scenePass = pass(scene, camera);
|
|
114
|
-
const colorNode = scenePass.getTextureNode('output');
|
|
115
|
-
const depthNode = scenePass.getTextureNode('depth');
|
|
116
|
-
const normalNode = scenePass.getTextureNode('normal');
|
|
117
|
-
|
|
118
|
-
const ssrPass = ssr(colorNode, depthNode, normalNode, camera);
|
|
119
|
-
postProcessing.outputNode = ssrPass;
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Ambient Occlusion (SSAO)
|
|
123
|
-
|
|
124
|
-
```javascript
|
|
125
|
-
import { ao } from 'three/addons/tsl/display/AmbientOcclusionNode.js';
|
|
126
|
-
|
|
127
|
-
const scenePass = pass(scene, camera);
|
|
128
|
-
const depthNode = scenePass.getTextureNode('depth');
|
|
129
|
-
const normalNode = scenePass.getTextureNode('normal');
|
|
130
|
-
|
|
131
|
-
const aoPass = ao(depthNode, normalNode, camera);
|
|
132
|
-
postProcessing.outputNode = scenePassColor.mul(aoPass);
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Film Grain
|
|
136
|
-
|
|
137
|
-
```javascript
|
|
138
|
-
import { film } from 'three/addons/tsl/display/FilmNode.js';
|
|
139
|
-
|
|
140
|
-
const filmPass = film(scenePassColor, {
|
|
141
|
-
intensity: 0.5,
|
|
142
|
-
grayscale: false
|
|
143
|
-
});
|
|
144
|
-
postProcessing.outputNode = filmPass;
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Outline
|
|
148
|
-
|
|
149
|
-
```javascript
|
|
150
|
-
import { outline } from 'three/addons/tsl/display/OutlineNode.js';
|
|
151
|
-
|
|
152
|
-
const outlinePass = outline(scene, camera, selectedObjects, {
|
|
153
|
-
edgeStrength: 3.0,
|
|
154
|
-
edgeGlow: 0.0,
|
|
155
|
-
edgeThickness: 1.0,
|
|
156
|
-
visibleEdgeColor: new THREE.Color(0xffffff),
|
|
157
|
-
hiddenEdgeColor: new THREE.Color(0x190a05)
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
postProcessing.outputNode = scenePassColor.add(outlinePass);
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Chromatic Aberration
|
|
164
|
-
|
|
165
|
-
```javascript
|
|
166
|
-
import { chromaticAberration } from 'three/addons/tsl/display/ChromaticAberrationNode.js';
|
|
167
|
-
|
|
168
|
-
const caPass = chromaticAberration(scenePassColor, {
|
|
169
|
-
offset: vec2(0.002, 0.002)
|
|
170
|
-
});
|
|
171
|
-
postProcessing.outputNode = caPass;
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Color Adjustments
|
|
175
|
-
|
|
176
|
-
### Grayscale
|
|
177
|
-
|
|
178
|
-
```javascript
|
|
179
|
-
import { grayscale } from 'three/tsl';
|
|
180
|
-
|
|
181
|
-
postProcessing.outputNode = grayscale(scenePassColor);
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Saturation
|
|
185
|
-
|
|
186
|
-
```javascript
|
|
187
|
-
import { saturation } from 'three/tsl';
|
|
188
|
-
|
|
189
|
-
// 0 = grayscale, 1 = normal, 2 = oversaturated
|
|
190
|
-
postProcessing.outputNode = saturation(scenePassColor, 1.5);
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Hue Shift
|
|
194
|
-
|
|
195
|
-
```javascript
|
|
196
|
-
import { hue } from 'three/tsl';
|
|
197
|
-
|
|
198
|
-
// Shift hue by radians
|
|
199
|
-
postProcessing.outputNode = hue(scenePassColor, time.mul(0.5));
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Vibrance
|
|
203
|
-
|
|
204
|
-
```javascript
|
|
205
|
-
import { vibrance } from 'three/tsl';
|
|
206
|
-
|
|
207
|
-
postProcessing.outputNode = vibrance(scenePassColor, 0.5);
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### Posterize
|
|
211
|
-
|
|
212
|
-
```javascript
|
|
213
|
-
import { posterize } from 'three/tsl';
|
|
214
|
-
|
|
215
|
-
// Reduce color levels
|
|
216
|
-
postProcessing.outputNode = posterize(scenePassColor, 8);
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Sepia
|
|
220
|
-
|
|
221
|
-
```javascript
|
|
222
|
-
import { sepia } from 'three/addons/tsl/display/SepiaNode.js';
|
|
223
|
-
|
|
224
|
-
postProcessing.outputNode = sepia(scenePassColor);
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### 3D LUT
|
|
228
|
-
|
|
229
|
-
```javascript
|
|
230
|
-
import { lut3D } from 'three/addons/tsl/display/Lut3DNode.js';
|
|
231
|
-
|
|
232
|
-
const lutTexture = new THREE.Data3DTexture(lutData, size, size, size);
|
|
233
|
-
postProcessing.outputNode = lut3D(scenePassColor, lutTexture, size);
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## Custom Post-Processing
|
|
237
|
-
|
|
238
|
-
### Basic Custom Effect
|
|
239
|
-
|
|
240
|
-
```javascript
|
|
241
|
-
import { Fn, screenUV, float, vec4 } from 'three/tsl';
|
|
242
|
-
|
|
243
|
-
const customEffect = Fn(() => {
|
|
244
|
-
const color = scenePassColor.toVar();
|
|
245
|
-
|
|
246
|
-
// Invert colors
|
|
247
|
-
color.rgb.assign(float(1.0).sub(color.rgb));
|
|
248
|
-
|
|
249
|
-
return color;
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
postProcessing.outputNode = customEffect();
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### Vignette Effect
|
|
256
|
-
|
|
257
|
-
```javascript
|
|
258
|
-
const vignette = Fn(() => {
|
|
259
|
-
const color = scenePassColor.toVar();
|
|
260
|
-
|
|
261
|
-
// Distance from center
|
|
262
|
-
const uv = screenUV;
|
|
263
|
-
const dist = uv.sub(0.5).length();
|
|
264
|
-
|
|
265
|
-
// Vignette falloff
|
|
266
|
-
const vignette = float(1.0).sub(dist.mul(1.5)).clamp(0, 1);
|
|
267
|
-
|
|
268
|
-
color.rgb.mulAssign(vignette);
|
|
269
|
-
return color;
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
postProcessing.outputNode = vignette();
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### CRT/Scanline Effect
|
|
276
|
-
|
|
277
|
-
```javascript
|
|
278
|
-
const crtEffect = Fn(() => {
|
|
279
|
-
const color = scenePassColor.toVar();
|
|
280
|
-
const uv = screenUV;
|
|
281
|
-
|
|
282
|
-
// Scanlines
|
|
283
|
-
const scanline = uv.y.mul(screenSize.y).mul(0.5).sin().mul(0.1).add(0.9);
|
|
284
|
-
color.rgb.mulAssign(scanline);
|
|
285
|
-
|
|
286
|
-
// Slight RGB offset
|
|
287
|
-
const r = texture(scenePassColor, uv.add(vec2(0.002, 0))).r;
|
|
288
|
-
const b = texture(scenePassColor, uv.sub(vec2(0.002, 0))).b;
|
|
289
|
-
color.r.assign(r);
|
|
290
|
-
color.b.assign(b);
|
|
291
|
-
|
|
292
|
-
// Vignette
|
|
293
|
-
const dist = uv.sub(0.5).length();
|
|
294
|
-
color.rgb.mulAssign(float(1.0).sub(dist.mul(0.5)));
|
|
295
|
-
|
|
296
|
-
return color;
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
postProcessing.outputNode = crtEffect();
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### Pixelate Effect
|
|
303
|
-
|
|
304
|
-
```javascript
|
|
305
|
-
const pixelSize = uniform(8.0);
|
|
306
|
-
|
|
307
|
-
const pixelate = Fn(() => {
|
|
308
|
-
const uv = screenUV;
|
|
309
|
-
const pixelUV = uv.mul(screenSize).div(pixelSize).floor().mul(pixelSize).div(screenSize);
|
|
310
|
-
return texture(scenePassColor, pixelUV);
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
postProcessing.outputNode = pixelate();
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Edge Detection (Sobel)
|
|
317
|
-
|
|
318
|
-
```javascript
|
|
319
|
-
const sobelEdge = Fn(() => {
|
|
320
|
-
const uv = screenUV;
|
|
321
|
-
const texelSize = vec2(1.0).div(screenSize);
|
|
322
|
-
|
|
323
|
-
// Sample 3x3 kernel
|
|
324
|
-
const tl = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(-1, -1)))));
|
|
325
|
-
const tc = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(0, -1)))));
|
|
326
|
-
const tr = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(1, -1)))));
|
|
327
|
-
const ml = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(-1, 0)))));
|
|
328
|
-
const mr = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(1, 0)))));
|
|
329
|
-
const bl = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(-1, 1)))));
|
|
330
|
-
const bc = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(0, 1)))));
|
|
331
|
-
const br = luminance(texture(scenePassColor, uv.add(texelSize.mul(vec2(1, 1)))));
|
|
332
|
-
|
|
333
|
-
// Sobel operators
|
|
334
|
-
const gx = tl.add(ml.mul(2)).add(bl).sub(tr).sub(mr.mul(2)).sub(br);
|
|
335
|
-
const gy = tl.add(tc.mul(2)).add(tr).sub(bl).sub(bc.mul(2)).sub(br);
|
|
336
|
-
|
|
337
|
-
const edge = sqrt(gx.mul(gx).add(gy.mul(gy)));
|
|
338
|
-
|
|
339
|
-
return vec4(vec3(edge), 1.0);
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
postProcessing.outputNode = sobelEdge();
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
## Multiple Render Targets (MRT)
|
|
346
|
-
|
|
347
|
-
Access multiple buffers from the scene pass:
|
|
348
|
-
|
|
349
|
-
```javascript
|
|
350
|
-
import { mrt, output } from 'three/tsl';
|
|
351
|
-
|
|
352
|
-
const scenePass = pass(scene, camera);
|
|
353
|
-
|
|
354
|
-
// Set up MRT
|
|
355
|
-
scenePass.setMRT(mrt({
|
|
356
|
-
output: output, // Color output
|
|
357
|
-
normal: normalView, // View-space normals
|
|
358
|
-
depth: depth // Depth buffer
|
|
359
|
-
}));
|
|
360
|
-
|
|
361
|
-
// Access individual targets
|
|
362
|
-
const colorTexture = scenePass.getTextureNode('output');
|
|
363
|
-
const normalTexture = scenePass.getTextureNode('normal');
|
|
364
|
-
const depthTexture = scenePass.getTextureNode('depth');
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
## Chaining Effects
|
|
368
|
-
|
|
369
|
-
```javascript
|
|
370
|
-
const scenePass = pass(scene, camera);
|
|
371
|
-
const color = scenePass.getTextureNode('output');
|
|
372
|
-
|
|
373
|
-
// Chain multiple effects
|
|
374
|
-
let output = color;
|
|
375
|
-
|
|
376
|
-
// 1. Apply bloom
|
|
377
|
-
const bloomPass = bloom(output);
|
|
378
|
-
output = output.add(bloomPass.mul(0.5));
|
|
379
|
-
|
|
380
|
-
// 2. Apply color grading
|
|
381
|
-
output = saturation(output, 1.2);
|
|
382
|
-
|
|
383
|
-
// 3. Apply vignette
|
|
384
|
-
const dist = screenUV.sub(0.5).length();
|
|
385
|
-
const vignette = float(1.0).sub(dist.mul(0.5));
|
|
386
|
-
output = output.mul(vignette);
|
|
387
|
-
|
|
388
|
-
// 4. Apply FXAA
|
|
389
|
-
output = fxaa(output);
|
|
390
|
-
|
|
391
|
-
postProcessing.outputNode = output;
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
## Conditional Effects
|
|
395
|
-
|
|
396
|
-
```javascript
|
|
397
|
-
const effectEnabled = uniform(true);
|
|
398
|
-
|
|
399
|
-
const conditionalEffect = Fn(() => {
|
|
400
|
-
const color = scenePassColor;
|
|
401
|
-
return select(effectEnabled, grayscale(color), color);
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
postProcessing.outputNode = conditionalEffect();
|
|
405
|
-
|
|
406
|
-
// Toggle at runtime
|
|
407
|
-
effectEnabled.value = false;
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
## Transitions
|
|
411
|
-
|
|
412
|
-
```javascript
|
|
413
|
-
import { transition } from 'three/addons/tsl/display/TransitionNode.js';
|
|
414
|
-
|
|
415
|
-
const scenePassA = pass(sceneA, camera);
|
|
416
|
-
const scenePassB = pass(sceneB, camera);
|
|
417
|
-
|
|
418
|
-
const transitionProgress = uniform(0);
|
|
419
|
-
|
|
420
|
-
const transitionPass = transition(
|
|
421
|
-
scenePassA.getTextureNode('output'),
|
|
422
|
-
scenePassB.getTextureNode('output'),
|
|
423
|
-
transitionProgress,
|
|
424
|
-
texture(transitionTexture) // Optional transition texture
|
|
425
|
-
);
|
|
426
|
-
|
|
427
|
-
postProcessing.outputNode = transitionPass;
|
|
428
|
-
|
|
429
|
-
// Animate transition
|
|
430
|
-
function animate() {
|
|
431
|
-
transitionProgress.value = Math.sin(time) * 0.5 + 0.5;
|
|
432
|
-
postProcessing.render();
|
|
433
|
-
}
|
|
434
|
-
```
|