/visual-effects:glsl-shadersfrom visual-effects
Comprehensive GLSL shader techniques for stunning real-time visual effects (ShaderToy-compatible, WebGL2): ray marching, SDF modeling, fluid simulation, particle systems, procedural generation, lighting, post-processing, and more. Use when a user asks for a GLSL or ShaderToy shader, a raymarched SDF scene, fluid or ink, procedural noise, a bloom or tone-map pass, or a fix for a WebGL2 shader compile error.
Ships in visual-effects. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A unified skill covering 36 GLSL shader techniques (ShaderToy-compatible) for real-time visual effects.
/shader-dev <request>
$ARGUMENTS contains the user's request (e.g. "create a raymarched SDF scene with soft shadows").
shader-dev/
├── SKILL.md # Core skill (this file)
├── techniques/ # Implementation guides (read per routing table)
│ ├── ray-marching.md # Sphere tracing with SDF
│ ├── sdf-3d.md # 3D signed distance functions
│ ├── lighting-model.md # PBR, Phong, toon shading
│ ├── procedural-noise.md # Perlin, Simplex, FBM
│ └── ... # 34 more technique files
└── reference/ # Detailed guides (read as needed)
├── ray-marching.md # Math derivations & advanced patterns
├── sdf-3d.md # Extended SDF theory
├── lighting-model.md # Lighting math deep-dive
├── procedural-noise.md # Noise function theory
└── ... # 34 more reference files
techniques/ — each file contains core principles, implementation steps, and complete code templatesreference/| User wants to create... | Primary technique | Combine with |
|---|---|---|
| 3D objects / scenes from math | ray-marching + sdf-3d | lighting-model, shadow-techniques |
| Complex 3D shapes (booleans, blends) | csg-boolean-operations | sdf-3d, ray-marching |
| Infinite repeating patterns in 3D | domain-repetition | sdf-3d, ray-marching |
| Organic / warped shapes | domain-warping | procedural-noise |
| Fluid / smoke / ink effects | fluid-simulation | multipass-buffer |
| Particle effects (fire, sparks, snow) | particle-system | procedural-noise, color-palette |
| Physically-based simulations | simulation-physics | multipass-buffer |
| Game of Life / reaction-diffusion | cellular-automata | multipass-buffer, color-palette |
| Ocean / water surface | water-ocean | atmospheric-scattering, lighting-model |
| Terrain / landscape | terrain-rendering | atmospheric-scattering, procedural-noise |
| Clouds / fog / volumetric fire | volumetric-rendering | procedural-noise, atmospheric-scattering |
| Sky / sunset / atmosphere | atmospheric-scattering | volumetric-rendering |
| Realistic lighting (PBR, Phong) | lighting-model | shadow-techniques, ambient-occlusion |
| Shadows (soft / hard) | shadow-techniques | lighting-model |
| Ambient occlusion | ambient-occlusion | lighting-model, normal-estimation |
| Path tracing / global illumination | path-tracing-gi | analytic-ray-tracing, multipass-buffer |
| Precise ray-geometry intersections | analytic-ray-tracing | lighting-model |
| Voxel worlds (Minecraft-style) | voxel-rendering | lighting-model, shadow-techniques |
| Noise / FBM textures | procedural-noise | domain-warping |
| Tiled 2D patterns | procedural-2d-pattern | polar-uv-manipulation |
| Voronoi / cell patterns | voronoi-cellular-noise | color-palette |
| Fractals (Mandelbrot, Julia, 3D) | fractal-rendering | color-palette, polar-uv-manipulation |
| Color grading / palettes | color-palette | — |
| Bloom / tone mapping / glitch | post-processing | multipass-buffer |
| Multi-pass ping-pong buffers | multipass-buffer | — |
| Texture / sampling techniques | texture-sampling | — |
| Camera / matrix transforms | matrix-transform | — |
| Surface normals | normal-estimation | — |
| Polar coords / kaleidoscope | polar-uv-manipulation | procedural-2d-pattern |
| 2D shapes / UI from SDF | sdf-2d | color-palette |
| Procedural audio / music | sound-synthesis | — |
| SDF tricks / optimization | sdf-tricks | sdf-3d, ray-marching |
| Anti-aliased rendering | anti-aliasing | sdf-2d, post-processing |
| Depth of field / motion blur / lens effects | camera-effects | post-processing, multipass-buffer |
| Advanced texture mapping / no-tile textures | texture-mapping-advanced | terrain-rendering, texture-sampling |
| WebGL2 shader errors / debugging | webgl-pitfalls | — |
fragCoord, main() wrapper, function order, macro limitations, uniform nullAll technique files use ShaderToy GLSL style. When generating standalone HTML pages, apply these adaptations:
canvas.getContext("webgl2")#version 300 es, fragment shader adds precision highp float;out vec4 fragColor;attribute → in, varying → outvarying → in, gl_FragColor → fragColor, texture2D() → texture()gl_FragCoord.xy instead of fragCoord (WebGL2 does not have fragCoord built-in)// WRONG
vec2 uv = (2.0 * fragCoord - iResolution.xy) / iResolution.y;
// CORRECT
vec2 uv = (2.0 * gl_FragCoord.xy - iResolution.xy) / iResolution.y;
void mainImage(out vec4 fragColor, in vec2 fragCoord)void main() entry point — always wrap mainImage:void mainImage(out vec4 fragColor, in vec2 fragCoord) {
// shader code...
fragColor = vec4(col, 1.0);
}
void main() {
mainImage(fragColor, gl_FragCoord.xy);
}
// WRONG — getAtmosphere() calls getSunDirection() before it's defined
vec3 getAtmosphere(vec3 dir) { return getSunDirection(); } // Error!
vec3 getSunDirection() { return normalize(vec3(1.0)); }
// CORRECT — define callee first
vec3 getSunDirection() { return normalize(vec3(1.0)); }
vec3 getAtmosphere(vec3 dir) { return getSunDirection(); } // Works
#define cannot use function calls — use const instead:// WRONG
#define SUN_DIR normalize(vec3(0.8, 0.4, -0.6))
// CORRECT
const vec3 SUN_DIR = vec3(0.756, 0.378, -0.567); // Pre-computed normalized value
<script> tags, ensure #version is the first character — use .trim():const fs = document.getElementById("fs").text.trim();
gl.getUniformLocation() to return null — always use uniforms in a way the compiler cannot optimize out#define macros in some ES versionsterrainM(vec2) need XZ components — use terrainM(pos.xz + offset) not terrainM(pos + offset)When generating a standalone HTML page:
body { margin: 0; overflow: hidden; background: #000; }iTime, iResolution, iMouse, iFramelet/const variables must be declared at the top of the <script> block, before any function that references them:
// 1. State variables FIRST
let frameCount = 0;
let startTime = Date.now();
// 2. Canvas/GL init, shader compile, FBO creation
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl2");
// ...
// 3. Functions and event bindings LAST
function resize() {
/* can now safely reference frameCount */
}
function render() {
/* ... */
}
window.addEventListener("resize", resize);
Reason: let/const have a Temporal Dead Zone — referencing them before declaration throws ReferenceError, causing a white screen.
float fbm(vec3 p), cannot call fbm(uv) with a vec2patch, cast, sample, filter, input, output, common, partition, activevec3 x = 1.0 is illegal — use vec3 x = vec3(1.0); cannot use .z to access a vec2if/else insteadDeployment environments may use headless software rendering with limited GPU power. Stay within these limits:
Common effect combinations — complete rendering pipelines assembled from technique modules.
Visual debugging methods — temporarily replace your output to diagnose issues.
| What to check | Code | What to look for |
|---|---|---|
| Surface normals | col = nor * 0.5 + 0.5; | Smooth gradients = correct normals; banding = epsilon too large |
| Ray march step count | col = vec3(float(steps) / float(MAX_STEPS)); | Red hotspots = performance bottleneck; uniform = wasted iterations |
| Depth / distance | col = vec3(t / MAX_DIST); | Verify correct hit distances |
| UV coordinates | col = vec3(uv, 0.0); | Check coordinate mapping |
| SDF distance field | col = (d > 0.0 ? vec3(0.9,0.6,0.3) : vec3(0.4,0.7,0.85)) * (0.8 + 0.2*cos(150.0*d)); | Visualize SDF bands and zero-crossing |
| Checker pattern (UV) | col = vec3(mod(floor(uv.x*10.)+floor(uv.y*10.), 2.0)); | Verify UV distortion, seams |
| Lighting only | col = vec3(shadow); or col = vec3(ao); | Isolate shadow/AO contributions |
| Material ID | col = palette(matId / maxMatId); | Verify material assignment |
evals/evals.json (opens in a new tab)reference/ambient-occlusion.md (opens in a new tab)reference/analytic-ray-tracing.md (opens in a new tab)reference/anti-aliasing.md (opens in a new tab)reference/atmospheric-scattering.md (opens in a new tab)reference/camera-effects.md (opens in a new tab)reference/cellular-automata.md (opens in a new tab)reference/color-palette.md (opens in a new tab)reference/csg-boolean-operations.md (opens in a new tab)reference/domain-repetition.md (opens in a new tab)reference/domain-warping.md (opens in a new tab)reference/fluid-simulation.md (opens in a new tab)reference/fractal-rendering.md (opens in a new tab)reference/lighting-model.md (opens in a new tab)reference/matrix-transform.md (opens in a new tab)reference/multipass-buffer.md (opens in a new tab)reference/normal-estimation.md (opens in a new tab)reference/particle-system.md (opens in a new tab)reference/path-tracing-gi.md (opens in a new tab)reference/polar-uv-manipulation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
7 skills in this plugin
/blender-simulation-workflowCreate, diagnose, bake, and validate deterministic Blender physics simulations including fluid, smoke, fire, rigid bodies, cloth, soft bodies, particles, and hair. Use when a request involves physical dynamics, collision, cache baking, fluid or volume output, simulation handoff, or rendering a simulation./fire-smoke-vfxBuild fire and smoke effects as one visual language in Three.js. Use for fire skills, fireballs, fire waves or breath, fire tornadoes, burning ground, wildfire fronts, smoke columns, embers, "realistic fire", "inferno"./threejs-bloomAdds bloom (the glow around bright light) to a Three.js WebGPU/TSL scene using scene-linear HDR input. Covers optical full-scene glare, selective or hybrid emissive contributors, transparent contribution blending, and viewport, exposure and performance gates for BloomNode. Use when a user asks for bloom, glow, halos or a glare pass in a Three.js or WebGPU scene, or when bloom looks wrong on emissive or transparent objects./threejs-particles-trails-and-effectsBuilds GPU particle systems, ribbon or history trails and other effects in Three.js WebGPU/TSL, with a representation-first approach that chooses the motion and pool layout before the visuals. Covers analytic or recurrent particle motion, stable-slot or scan-compacted GPU pools, flow-conforming shells and wakes, dissolving debris, and effect-specific HDR and depth integration. Use when a user asks for sparks, debris, trails, a wake or a particle effect in a Three.js or WebGPU scene./threejs-physicsIntegrates Rapier or another physics engine with Three.js, including colliders, fixed timesteps and render synchronization. Use when a user asks to add physics, gravity, collisions, rigid bodies or a Rapier world to a Three.js scene, or when a fast body passes through a collider or resting bodies are unstable./visual-effects-guideStart here for visual effects work. Routes a request to the right visual-effects skill (fire and smoke, GLSL shaders, Three.js bloom, particles and trails, Three.js physics, Blender simulation bakes) and sequences several of them into a workflow with the input and output of each step. Use when a user asks how to make a fireball, flames, smoke, sparks, debris, a glow or bloom, a physics scene, a shader, or a Blender fluid or cloth simulation, or asks which VFX approach fits.npx claudepluginhub frzxw/supercharger --plugin visual-effects