Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

threejs-shaders

Skill by CloudAI-X

Guides developers writing custom GLSL shaders for three.js r186. It covers ShaderMaterial, RawShaderMaterial, uniforms, varyings, instanced attributes and extending built-in materials.

  • Score 86
  • 4.9k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install threejs-shaders

Built from the published package, never by AI.

git clone --depth 1 https://github.com/CloudAI-X/threejs-skills /tmp/threejs-skills && mkdir -p ~/.claude/skills && cp -r /tmp/threejs-skills/skills/threejs-shaders ~/.claude/skills/threejs-shaders

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install threejs-shaders in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant guidance for writing custom GLSL vertex and fragment shaders for three.js, targeting r186. It covers ShaderMaterial and RawShaderMaterial, declaring uniforms and varyings, and the shader chunks needed for correct output color and tone mapping. It also includes common patterns such as vertex displacement, Fresnel, and dissolve effects, along with how to add custom per-instance attributes to an InstancedMesh and how to modify built-in materials with onBeforeCompile.

It is aimed at developers who build custom materials or effects with three.js. The examples use WebGLRenderer. The declared description also mentions porting GLSL to TSL on WebGPU, but the provided text ends before that section. The guidance focuses on rules that cause compile errors or wrong colors, such as using GLSL ES 3.00 syntax, avoiding reserved uniform names, and including the tone mapping and color space chunks.

Written from the project's SKILL.md and checked against it.

What it can do

  • ShaderMaterial setupShows a ShaderMaterial with uniforms, a vertex shader and a fragment shader using the tone mapping and color space includes.
  • ShaderMaterial vs RawShaderMaterialExplains which declarations each material injects and when to set glslVersion to GLSL3.
  • UniformsShows how to declare float, vector, color, matrix and texture uniforms and update them each frame.
  • Output color and tone mappingExplains why shaders need the tonemapping and colorspace includes to match built-in material colors.
  • Vertex displacementShows moving vertices in the vertex shader with a sine wave on a subdivided plane.
  • Fresnel effectShows a Fresnel rim effect in world space and in view space.
  • Dissolve effectShows a noise-based dissolve that discards fragments and adds an edge color.
  • Instanced meshes and custom attributesShows how to add a custom per-instance attribute to an InstancedMesh and apply instanceMatrix.
  • Extending built-in materialsShows how to inject a uniform and vertex change into MeshStandardMaterial with onBeforeCompile.

What you need

  • three.js r186

Try asking

  • Write a ShaderMaterial that displaces a plane with a sine wave over time.
  • Add a Fresnel rim effect to my three.js mesh using a custom shader.
  • Show me how to pass a per-instance attribute to an InstancedMesh shader.

Good to know

  • Examples use WebGLRenderer; the TSL and WebGPU section is not in the provided text.
  • ShaderMaterial uses GLSL ES 3.00 and does not support WebGL 1.
  • Displacement needs a geometry with subdivisions.
  • VideoTexture must be decoded manually inside a ShaderMaterial.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/threejs-shaders/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md26 KB

Alternatives to threejs-shaders

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

threejs-shaders: common questions

Does this skill work with three.js shaders in GLSL?

Yes. It covers custom GLSL vertex and fragment shaders for three.js, with examples for ShaderMaterial and RawShaderMaterial.

Can I extend a built-in three.js material with a custom shader?

Yes. The skill shows how to use onBeforeCompile to rewrite the shader strings of a built-in material such as MeshStandardMaterial.

Why does my shader color look darker than the same hex on a built-in material?

The source says a ShaderMaterial writes its output as-is, so mid-tone colors render darker unless the fragment shader ends with the tonemapping and colorspace includes.

How do I install threejs-shaders?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is threejs-shaders free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is threejs-shaders safe to use?

It scores 86 of 100. Grades: maintenance B, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to threejs-shaders?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

threejs-shaders Install

Add to stack

Loading.