threejs-shaders

Create and integrate custom GLSL shaders into Three.js scenes.

2|1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/huangzida/skills --skill threejs-shaders-huangzida
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-shaders
Source: https://github.com/huangzida/skills/tree/main/threejs-shaders
Command: npx skills add https://github.com/huangzida/skills --skill threejs-shaders-huangzida

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating and integrating bespoke GLSL shaders inside Three.js to extend or replace built-in materials.

Core Features & Use Cases

  • ShaderMaterial vs RawShaderMaterial: choose between a managed shader pipeline or full control over shaders.
  • Uniforms and GLSL Tools: manage uniforms, varyings, and common GLSL functions to implement effects.
  • Use Case: build custom lighting, post-processing-like effects, vertex displacement, and procedural visuals in a Three.js scene.

Quick Start

Create a ShaderMaterial in your Three.js scene using your own vertex and fragment shader code and render a live demo.

Frequently Asked Questions about threejs-shaders

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom GLSL shaders in Three.js to extend built-in materials?

To create custom GLSL shaders in Three.js, you write your own vertex and fragment shader code and integrate it into a scene using ShaderMaterial. This extends built-in materials to achieve dynamic, real-time graphics effects.

What is the difference between ShaderMaterial and RawShaderMaterial in Three.js?

ShaderMaterial provides a managed shader pipeline that integrates with Three.js built-in uniforms and attributes, while RawShaderMaterial offers full control over shaders without automatic injection of Three.js built-in variables.

How can I implement vertex displacement and procedural visuals using Three.js ShaderMaterial?

You can implement vertex displacement and procedural visuals by writing custom GLSL code in the vertex and fragment pipelines. Managing uniforms and varyings within ShaderMaterial passes the necessary data to achieve these real-time effects.

Do I need to know GLSL to build custom Three.js shaders for real-time graphics?

Yes, building custom Three.js shaders requires knowledge of GLSL, Three.js ShaderMaterial options, and shader injection techniques to successfully implement dynamic materials and shader-based effects across vertex and fragment pipelines.

What are the limitations of using Three.js ShaderMaterial for post-processing-like effects?

While ShaderMaterial can create post-processing-like effects, it is primarily designed for extending built-in materials on individual objects rather than comprehensive screen-space post-processing pipelines, which may require specific scene rendering setups.