Skip to content
SkillModel-led6,730 tokens in use

threejs-shaders

Gives an AI coding agent current three.js r186 knowledge of custom GLSL shaders, shader chunks, extended built-in materials and TSL node materials.

4,322 stars on the repository MIT LicenseCloudAI-X/threejs-skills · skills/threejs-shaders
npx skills add cloudai-x/threejs-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing threejs-shaders costs

71tokens idle
6,730tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter12/15
  • Structure17/25
  • Examples15/15
  • Output10/15
  • Size13/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Fair
  • Development activity68
  • Maintenance40
  • Community52
  • Maturity32
  • Momentum40

threejs-shaders covers writing custom shaders for three.js. Its quick start builds a ShaderMaterial with a time uniform, a color uniform, a varying for UV coordinates and a fragment shader that animates a wave, ending with the tone mapping and color space includes.

It explains how ShaderMaterial and RawShaderMaterial differ, how three.js compiles shaders as GLSL ES 3.00, and how to reproduce the same effects with node materials and TSL on WebGPU.

What You Get

  • A runnable ShaderMaterial with an animated time uniform
  • An explanation of ShaderMaterial versus RawShaderMaterial and the GLSL version three.js prepends
  • Coverage of shader chunks, extending built-in materials and instanced attributes
  • Notes on migrating older GLSL, including names that no longer compile
  • TSL and node material versions of the same effects for WebGPU

Common Use Cases

  • Writing an animated surface effect
  • Moving vertices in a vertex shader
  • Extending a standard material with a few custom lines
  • Passing per-instance data to a shader
  • Porting a GLSL shader to TSL

What Makes It Unique

It covers both shader paths, GLSL for WebGL and TSL for WebGPU, which matches the current three.js guidance for custom materials. It also lists the specific cases where older GLSL fails to compile, such as an extension line or a variable named texture. It is pinned to r186.

Under The Hood

The skill is a single SKILL.md of explanation and JavaScript examples with embedded GLSL, with no scripts, and it tells the agent to run no commands. The agent reads it and writes three.js and shader code into your project. It fetches nothing and writes no files itself.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers