Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.
.claude/skills/itamarzand88-webgpu-threejs-tsl/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -11% | 0% |
<!-- source: webgpu-threejs-tsl — https://raw.githubusercontent.com/dgreenheck/webgpu-claude-skill/main/skills/webgpu-threejs-tsl/SKILL.md -->
TSL (Three.js Shading Language) is a node-based shader abstraction that lets you write GPU shaders in JavaScript instead of GLSL/WGSL strings.
javascriptimport * as THREE from 'three/webgpu'; import { color, time, oscSine } from 'three/tsl'; const renderer = new THREE.WebGPURenderer(); await renderer.init(); const material = new THREE.MeshStandardNodeMaterial(); material.colorNode = color(0xff0000).mul(oscSine(time));
docs/core-concepts.md - Types, operators, uniforms, control flowdocs/materials.md - Node materials and all propertiesdocs/compute-shaders.md - GPU compute with instanced arraysdocs/post-processing.md - Built-in and custom effectsdocs/wgsl-integration.md - Custom WGSL functionsdocs/device-loss.md - Handling GPU device loss and recoverydocs/limits-and-features.md - WebGPU device limits and optional featuresexamples/basic-setup.js - Minimal WebGPU projectexamples/custom-material.js - Custom shader materialexamples/particle-system.js - GPU compute particlesexamples/post-processing.js - Effect pipelineexamples/earth-shader.js - Complete Earth with atmospheretemplates/webgpu-project.js - Starter project templatetemplates/compute-shader.js - Compute shader templateREFERENCE.md - Quick reference cheatsheetjavascript// Always use the WebGPU entry point import * as THREE from 'three/webgpu'; import { /* TSL functions */ } from 'three/tsl';
Replace standard material properties with TSL nodes:
javascriptmaterial.colorNode = texture(map); // instead of material.map material.roughnessNode = float(0.5); // instead of material.roughness material.positionNode = displaced; // vertex displacement
TSL uses method chaining for operations:
javascript// Instead of: sin(time * 2.0 + offset) * 0.5 + 0.5 time.mul(2.0).add(offset).sin().mul(0.5).add(0.5)
Use Fn() for reusable shader logic:
javascriptconst fresnel = Fn(([power = 2.0]) => { const nDotV = normalWorld.dot(viewDir).saturate(); return float(1.0).sub(nDotV).pow(power); });
webgpu_)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,263 | 8,909 | -42% | 1 | 1 | 0% | 3,422 | 3,247 | -5% | 0 | 0 | — |
case-02 | fail→pass | 10,081 | 5,674 | -44% | 1 | 1 | 0% | 2,459 | 2,356 | -4% | 0 | 0 | — |
case-03 | fail→pass | 8,765 | 5,221 | -40% | 1 | 1 | 0% | 1,949 | 2,039 | +5% | 0 | 0 | — |
case-20 | pass→pass | 9,955 | 11,463 | +15% | 1 | 1 | 0% | 2,555 | 3,731 | +46% | 0 | 0 | — |
case-04 | pass→pass | 5,758 | 2,282 | -60% | 1 | 1 | 0% | 1,221 | 1,324 | +8% | 0 | 0 | — |
case-05 | pass→pass | 4,566 | 2,111 | -54% | 1 | 1 | 0% | 1,007 | 1,287 | +28% | 0 | 0 | — |
case-06 | pass→pass | 8,484 | 7,705 | -9% | 1 | 1 | 0% | 1,797 | 2,789 | +55% | 0 | 0 | — |
case-07 | pass→pass | 5,447 | 3,267 | -40% | 1 | 1 | 0% | 1,399 | 1,665 | +19% | 0 | 0 | — |
case-08 | pass→pass | 10,827 | 8,026 | -26% | 1 | 1 | 0% | 2,421 | 2,790 | +15% | 0 | 0 | — |
case-09 | fail→pass | 7,368 | 4,836 | -34% | 1 | 1 | 0% | 1,769 | 1,989 | +12% | 0 | 0 | — |
case-10 | fail→pass | 9,004 | 4,963 | -45% | 1 | 1 | 0% | 2,170 | 1,921 | -11% | 0 | 0 | — |
case-11 | pass→pass | 5,192 | 1,561 | -70% | 1 | 1 | 0% | 1,085 | 1,166 | +7% | 0 | 0 | — |
case-12 | pass→pass | 6,514 | 2,022 | -69% | 1 | 1 | 0% | 1,360 | 1,316 | -3% | 0 | 0 | — |
case-13 | pass→pass | 6,973 | 4,663 | -33% | 1 | 1 | 0% | 1,619 | 1,884 | +16% | 0 | 0 | — |
case-14 | pass→pass | 4,804 | 3,172 | -34% | 1 | 1 | 0% | 1,081 | 1,566 | +45% | 0 | 0 | — |
case-15 | pass→pass | 5,561 | 1,968 | -65% | 1 | 1 | 0% | 1,117 | 1,296 | +16% | 0 | 0 | — |
case-21 | pass→pass | 16,211 | 14,383 | -11% | 1 | 1 | 0% | 4,020 | 4,601 | +14% | 0 | 0 | — |
case-16 | pass→pass | 2,719 | 1,814 | -33% | 1 | 1 | 0% | 521 | 1,238 | +138% | 0 | 0 | — |
case-17 | pass→pass | 5,473 | 4,224 | -23% | 1 | 1 | 0% | 1,163 | 1,772 | +52% | 0 | 0 | — |
case-18 | fail→fail | 6,924 | 7,571 | +9% | 1 | 1 | 0% | 1,419 | 2,420 | +71% | 0 | 0 | — |
case-19 | pass→pass | 3,328 | 2,039 | -39% | 1 | 1 | 0% | 743 | 1,216 | +64% | 0 | 0 | — |
case-22 | pass→pass | 9,225 | 7,006 | -24% | 1 | 1 | 0% | 2,111 | 2,558 | +21% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.