Webgpu Threejs Tsl
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.
- Скачивания
- 3
- В избранном
- 0
- Комментарии
- 0
- Просмотры
- 2
Установить скилл
Добавьте инструмент одной командой или скачайте проверенный архив версии.
npx skills add dgreenheck/webgpu-claude-skill --skill webgpu-threejs-tsl- Версия
- 1.0.0+af2319bd01bb
- Автор
- Владимир Ломтев
- Репозиторий
- dgreenheck/webgpu-claude-skill
Как установить
- 1Скопируйте команду из блока установки.
- 2Запустите её в терминале из каталога проекта.
Документация
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 displacement
Method 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_)
Требования и возможности
Источник пакета
https://github.com/dgreenheck/webgpu-claude-skill/tree/af2319bd01bb7cc881267a9ef42cafdaf5e9029d/skills/webgpu-threejs-tsl
Файлы версии
| Путь | Размер | SHA256 |
|---|---|---|
| REFERENCE.md | 9053 | aa3e1828e9d02f35... |
| SKILL.md | 3202 | 734ac9724c9dae2a... |
| docs/compute-shaders.md | 15640 | a1bdeae07261a81e... |
| docs/core-concepts.md | 10969 | 6370958d89a16c5f... |
| docs/device-loss.md | 9198 | 6549cedb1dfe2658... |
Частые вопросы
- Как установить Webgpu Threejs Tsl?
- Используйте команду
npx skills add dgreenheck/webgpu-claude-skill --skill webgpu-threejs-tslили скачайте ZIP-архив. - Можно ли скачать Webgpu Threejs Tsl бесплатно?
- Да, опубликованную версию можно скачать из маркетплейса бесплатно.
Похожие инструменты
Смотреть все2ГИС: Статическая карта 2ГИССформировать PNG-карту с точками, линиями или полигонами.2ГИС: Пешеходный маршрут 2ГИСПостроить пешеходный маршрут между точками.2ГИС: Обратное геокодирование 2ГИСНайти адрес и объекты рядом с заданными координатами.2ГИС: Карточка организации 2ГИСПолучить подробные данные объекта по идентификатору.
Комментарии
Войдите, чтобы оставить комментарий.
Комментариев пока нет.