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.
Use the webgpu-threejs-tsl skill to create a minimal example for the Three.js project at `<project-path>`. Use the `three/webgpu` and `three/tsl` entry points, initialize `WebGPURenderer`, and create a red `MeshStandardNodeMaterial` animated with `oscSine(time)`. Replace `<project-path>` with the actual project path and keep the result focused on this basic setup.
Required inputs
`<project-path>`: replace with the existing Three.js project path
A project using the recommended Three.js r171+ compatibility level and the required `three/webgpu` import-map entry
A supported WebGPU browser target
Suggested template by Skill Leaderboard, grounded in the linked source. Task evidence ↗
SKILL.md
name: webgpu-threejs-tsldescription: 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.
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 flow
docs/materials.md - Node materials and all properties
docs/compute-shaders.md - GPU compute with instanced arrays
docs/post-processing.md - Built-in and custom effects
docs/wgsl-integration.md - Custom WGSL functions
docs/device-loss.md - Handling GPU device loss and recovery
docs/limits-and-features.md - WebGPU device limits and optional features
Examples
examples/basic-setup.js - Minimal WebGPU project
examples/custom-material.js - Custom shader material