webgpu-threejs-tsl
Skill41 starsChanged 7 months agoMITView on GitHub
Reference WebGPU APIs, TSL syntax, node materials, WGSL integration, compute shaders, and post-processing in Three.js. For complete particle canvases use threejs-particle-canvas; for GLSL shaders use rocaille-shader. Triggers on TSL shader, WebGPU renderer, node material, WGSL, GPU compute, WebGPU setup.
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 73
Use Fn() for reusable shader logic:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WebGPU Three.js with TSL
TSL (Three.js Shading Language) is a node-based shader abstraction that lets you write GPU shaders in JavaScript instead of GLSL/WGSL strings.
Quick Start
import * 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));Skill Contents
Documentation
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 features
Examples
examples/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 atmosphere
Templates
templates/webgpu-project.js- Starter project templatetemplates/compute-shader.js- Compute shader template
Reference
REFERENCE.md- Quick reference cheatsheet
Key Concepts
Import Pattern
// Always use the WebGPU entry point
import * as THREE from 'three/webgpu';
import { /* TSL functions */ } from 'three/tsl';Node Materials
Replace standard material properties with TSL nodes:
material.colorNode = texture(map); // instead of material.map
material.roughnessNode = float(0.5); // instead of material.roughness
material.positionNode = displaced; // vertex displacementMethod Chaining
TSL uses method chaining for operations:
// Instead of: sin(time * 2.0 + offset) * 0.5 + 0.5
time.mul(2.0).add(offset).sin().mul(0.5).add(0.5)Custom Functions
Use Fn() for reusable shader logic:
const fresnel = Fn(([power = 2.0]) => {
const nDotV = normalWorld.dot(viewDir).saturate();
return float(1.0).sub(nDotV).pow(power);
});When to Use This Skill
- Setting up Three.js with WebGPU renderer
- Creating custom shader materials with TSL
- Writing GPU compute shaders
- Building post-processing pipelines
- Migrating from GLSL to TSL
- Implementing visual effects (particles, water, terrain, etc.)
Resources
- Three.js TSL Wiki
- WebGPU Examples (files prefixed with
webgpu_)
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- JetBrains/skills★ 38676% same
- Roentek/Claude_Code_Boilerplate_Framework★ 487% same
- angyal168/logos-protocol★ 287% same
- jaron-goh-centr/claude-skills★ 087% same
- navigotechsolutions-labs/claude-agent-skills-hub★ 087% same
- stjarnstrom/claude-skills★ 086% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository99 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agents-md-managerSkill
- architecture-md-builderSkill
- autoresearchSkill
- claude-agent-sdkSkill
- claude-md-managerSkill
- claude-usageSkill
- dag-typesafeSkill
- fableSkill
- glossarySkill
- openrouter-usageSkill
- react-best-practicesSkill
- skill-optimizerSkill
- stop-slopSkill
- tamarruSkill
- test-harness-auditorSkill
- user-model-builderSkill
- atmosphere-shaderSkill
- component-gallerySkill
- conductor-motionSkill
- design-auditSkill
- design-critiqueSkill
- design-mdSkill
- design-polishSkill
- gemini-claude-resonanceSkill
- gemini-forgeSkill
- gpt-atelierSkill
- grainientSkill
- image-forgeSkill
- image-wellSkill
- meshySkill
- mindnode-uiSkill
- minoan-frontend-designSkill
- nano-banana-proSkill
- overwatch-slidedeckSkill
- paper-designSkill
- particle-swarm-simSkill
- pellicolaSkill
- photo-to-slack-emojiSkill
- pretextSkill
- recordlySkill
- rocaille-shaderSkill
- scroll-cinemaSkill
- shadcnSkill
- shapeSkill
- smolvlmSkill
- speak-responseSkill
- sprite-forgeSkill
- threejs-particle-canvasSkill
- vellum-editorialSkill
- agent-browserSkill
- beautiful-mermaidSkill
- classical-887Skill
- claude-peersSkill
- cloudflareSkill
- codex-ctoSkill
- codex-orchestratorSkill
- disc-forgeSkill
- figma-mcpSkill
- linkedin-exportSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

