threejs-shaders

Create custom GLSL shaders with Three.js ShaderMaterial and RawShaderMaterial.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Three.js developers often need to implement custom shading that goes beyond built-in materials, requiring direct GLSL control for advanced visuals.

Core Features & Use Cases

  • ShaderMaterial and RawShaderMaterial provide full vertex/fragment shader access, uniforms, and varyings for bespoke rendering.
  • Includes patterns, techniques, and extension points to create unique visual effects, procedurals, and shader-driven UI elements in Three.js.
  • Use cases include prototyping novel graphics, teaching GLSL concepts, and building interactive shader-driven scenes for web experiences.

Quick Start

Create a ShaderMaterial with a simple vertex/fragment shader and assign it to a mesh, then update uniforms in your animation loop.

Frequently Asked Questions about threejs-shaders

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

FAQPage Schema
How do I write custom GLSL shaders in Three.js?

To write custom GLSL shaders in Three.js, use ShaderMaterial or RawShaderMaterial to define vertex and fragment shaders, pass data via uniforms and varyings, and assign the material to a mesh for bespoke rendering.

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

ShaderMaterial in Three.js provides full vertex and fragment shader access with some built-in uniforms automatically injected. RawShaderMaterial gives complete low-level GLSL control without built-in Three.js prefixes, requiring manual attribute and uniform declarations.

When do I need custom shaders instead of built-in Three.js materials?

You need custom shaders when your Three.js project requires unique visual effects or procedural generation that goes beyond built-in materials, allowing precise control over the rendering pipeline for real-time web visuals.

How do I update shader uniforms in a Three.js animation loop?

To update shader uniforms in Three.js, define them in your ShaderMaterial properties and modify their values directly inside your animation loop to create dynamic, real-time visual effects across web platforms.

Can I use WebGL2 features with Three.js ShaderMaterial?

Yes, Three.js ShaderMaterial supports WebGL2 integration, enabling advanced GLSL shading techniques and precise control over rendering pipelines for interactive and shader-driven web experiences.

What are varyings used for in Three.js GLSL shaders?

Varyings in Three.js GLSL shaders pass interpolated data from the vertex shader to the fragment shader, enabling bespoke rendering and unique visual effects by sharing computed values across the rendering pipeline.