threejs-shaders

Develop custom Three.js shaders with ShaderMaterial and RawShaderMaterial.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill allows developers to implement custom visual effects, modify vertices, write fragment shaders, and extend built-in materials within Three.js projects.

Core Features & Use Cases

  • Custom Visual Effects: Implement custom visual effects like glow, distortion, and wave displacements.
  • Vertex and Fragment Shaders: Write shaders for vertices and pixels to create unique rendering effects.
  • Material Extensions: Extend or create custom materials with specific properties and uniforms.
  • Use Case: Enhance your 3D models by adding a subtle glow effect or creating complex patterns on the surfaces.

Quick Start

Create a new ShaderMaterial with a vertex and fragment shader to apply custom visual effects to a 3D model.

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 visual effects in Three.js?

Custom visual effects in Three.js are created using ShaderMaterial to write GLSL vertex and fragment shaders, allowing you to implement effects like glow, distortion, and wave displacements on 3D models.

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

ShaderMaterial in Three.js automatically prepends built-in uniforms and attributes, whereas RawShaderMaterial provides a blank canvas requiring you to manually declare all GLSL variables for complete control over the rendering pipeline.

How do I pass data between vertex and fragment shaders in Three.js?

You pass data between vertex and fragment shaders in Three.js by declaring varying variables in your GLSL code, which allows the fragment shader to interpolate vertex data like positions or normals for pixel processing.

Can I extend built-in Three.js materials with custom GLSL shaders?

Yes, you can extend built-in Three.js materials by injecting custom GLSL code and manipulating uniforms, allowing you to add specific properties and custom rendering effects without rewriting the entire material.

How do I optimize Three.js shader performance for web graphics?

Optimizing shader performance for web graphics involves minimizing uniform updates, simplifying GLSL mathematical operations, and using efficient texture sampling techniques to reduce the rendering load on the GPU.