Skills shader-dev
🎨

shader-dev

Safe

Shader Craft — GLSL Shader Techniques

Generate complete, production-ready GLSL shaders for real-time visual effects — from ray-marched 3D scenes to fluid simulations — all running in the browser with WebGL2.

Supports: Claude Codex Code(CC)
🥉 73 Bronze
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "shader-dev". Create a kaleidoscope pattern using polar UV manipulation with a Voronoi color palette

Expected outcome:

  • Complete HTML page with WebGL2 canvas
  • Fragment shader with polar/log-polar coordinate transformation
  • Voronoi/Worley noise function for cell pattern generation
  • Cosine color palette mapping for vibrant colors
  • Kaleidoscope symmetry via angular repetition (e.g., 8-fold symmetry)
  • Animated time-based rotation for dynamic visual effect

Using "shader-dev". Build a path-traced global illumination scene with soft shadows and color bleeding

Expected outcome:

  • Complete path tracer with Monte Carlo sampling
  • SDF scene definition with multiple objects and materials
  • Diffuse and specular BSDF sampling
  • Russian roulette path termination
  • Accumulation buffer for progressive rendering
  • Tonemapping and display for converged image

Security Audit

Safe
v1 • 4/16/2026

This skill consists entirely of GLSL shader reference documentation (36 markdown files in techniques/ and reference/ directories). Detected risk factors (external_commands, scripts, filesystem, network) are false positives triggered by code examples in markdown documentation. The skill contains no executable scripts, no network requests, no filesystem operations, and no external command invocations. All code samples are GLSL shader snippets for educational/reference purposes. Safe to publish.

75
Files scanned
37,722
Lines analyzed
0
findings
1
Total audits
No security issues found
Audited by: claude

Quality Score

38
Architecture
100
Maintainability
87
Content
50
Community
100
Security
83
Spec Compliance

What You Can Build

Interactive Shader Art & Demoscene

Create mesmerizing visual art pieces, demoscene productions, or generative art installations using GLSL shaders that run in real-time in a web browser. Combine techniques like ray marching, procedural noise, and domain warping to produce unique visuals.

WebGL Game Effects & Shaders

Implement game-ready visual effects including water/ocean surfaces, terrain rendering, particle systems for fire/sparks/snow, post-processing pipelines, and atmospheric lighting — all running client-side in WebGL2.

Scientific Visualization & Simulation

Build GPU-accelerated visualizations for scientific data: fluid dynamics simulations, N-body gravity simulations, cellular automata, reaction-diffusion patterns, and volumetric cloud/fog rendering.

Try These Prompts

Ray-Marched SDF Scene
Create a standalone HTML page with a ray-marched SDF scene featuring several geometric objects (spheres, boxes, torus) combined with smooth minimum (smin). Add soft shadows, ambient occlusion, and a three-light outdoor lighting model. Include camera orbit controls via mouse.
Procedural Landscape
Generate a WebGL2 shader that renders a procedural landscape. Use heightfield ray marching with FBM terrain (6 octaves with derivatives for erosion-like detail). Add biplanar texturing, height-based atmospheric scattering with Rayleigh/Mie, and Gerstner wave ocean at sea level. Apply ACES tone mapping and 2x SSAA.
Fluid Simulation with Multi-Pass
Build a fluid simulation using a Navier-Stokes solver in GLSL with multi-pass ping-pong framebuffers. Include advection, diffusion, pressure projection (Jacobi iteration), and mouse interaction for adding dye/velocity. Use a color palette to visualize the flow field.
Particle System Effects
Create a stateless particle system shader for a fire effect. Use procedural noise for turbulence, a warm color palette for the gradient from bright yellow to deep red, and proper alpha blending. Include a second layer of sparks using a separate particle system with gravity.

Best Practices

  • Always respect performance budgets: ≤ 128 ray march steps, ≤ 32 volume samples, ≤ 6 FBM octaves, ≤ 1000 nested loop iterations per pixel
  • Declare functions before use in GLSL — unlike C/C++, GLSL doesn't support forward declarations in all implementations
  • Use the multipass-buffer technique for effects requiring state persistence across frames (fluid sim, path tracing, particle systems)
  • Adapt ShaderToy code properly: wrap mainImage() in main(), use gl_FragCoord instead of fragCoord, declare out vec4 fragColor
  • Prefer const over #define for values — GLSL macros can't use function calls and have limitations

Avoid

  • Exceeding performance budgets — loops over 1000 iterations per pixel will freeze the browser
  • Using #define macros for computed values — the GLSL preprocessor can't evaluate function calls in macros
  • Accessing uniforms that may be optimized away by the compiler — always ensure uniforms are used in the fragment output
  • Nesting ray marching or volume sampling inside another loop — this multiplies complexity and exceeds GPU time limits

Frequently Asked Questions

Can I use ShaderToy shaders directly with this skill?
Not directly — ShaderToy uses a different entry point (mainImage) and has built-in uniforms. The skill includes WebGL2 adaptation rules to convert ShaderToy code: wrap mainImage in main(), use gl_FragCoord, declare fragColor output, and add #version 300 es. The webgl-pitfalls technique covers common conversion errors.
What's the difference between techniques/ and reference/ directories?
techniques/ contains concise implementation guides with core principles, code templates, and step-by-step instructions. reference/ contains the same topics with deeper math derivations, extended theory, and advanced patterns. Start with techniques/, then consult reference/ for deeper understanding.
How do I combine multiple shader techniques?
Use the Quick Recipes section in SKILL.md for common combinations (e.g., Photorealistic SDF Scene = sdf-3d + ray-marching + lighting-model + shadows + AO + atmospheric-scattering + post-processing). Each technique file is modular — read multiple files and combine their code patterns in a single shader.
Why do I need multipass rendering for some effects?
Some effects (fluid simulation, path tracing, particle systems) require reading the previous frame's output. WebGL2 framebuffers with ping-pong (two alternating FBOs) allow you to render to a texture, then read that texture in the next frame. The multipass-buffer technique explains the setup.
Will these shaders work on mobile devices?
WebGL2 is supported on most modern mobile browsers, but mobile GPUs have lower performance budgets. Reduce ray march steps (≤ 64 instead of 128), FBM octaves (≤ 4), and avoid heavy nested loops. Test on target devices.
How do I debug GLSL shader errors?
Use the visual debugging techniques from SKILL.md: output normals as colors (nor * 0.5 + 0.5), visualize ray march step counts, check UV coordinates, and isolate lighting contributions. The webgl-pitfalls technique covers common GLSL compilation errors like function signature mismatch and reserved word usage.

Developer Details

File structure

📁 reference/

📄 ambient-occlusion.md

📄 analytic-ray-tracing.md

📄 anti-aliasing.md

📄 atmospheric-scattering.md

📄 camera-effects.md

📄 cellular-automata.md

📄 color-palette.md

📄 csg-boolean-operations.md

📄 domain-repetition.md

📄 domain-warping.md

📄 fluid-simulation.md

📄 fractal-rendering.md

📄 lighting-model.md

📄 matrix-transform.md

📄 multipass-buffer.md

📄 normal-estimation.md

📄 particle-system.md

📄 path-tracing-gi.md

📄 polar-uv-manipulation.md

📄 post-processing.md

📄 procedural-2d-pattern.md

📄 procedural-noise.md

📄 ray-marching.md

📄 sdf-2d.md

📄 sdf-3d.md

📄 sdf-tricks.md

📄 shadow-techniques.md

📄 simulation-physics.md

📄 sound-synthesis.md

📄 terrain-rendering.md

📄 texture-mapping-advanced.md

📄 texture-sampling.md

📄 volumetric-rendering.md

📄 voronoi-cellular-noise.md

📄 voxel-rendering.md

📄 water-ocean.md

📄 webgl-pitfalls.md

📁 techniques/

📄 ambient-occlusion.md

📄 analytic-ray-tracing.md

📄 anti-aliasing.md

📄 atmospheric-scattering.md

📄 camera-effects.md

📄 cellular-automata.md

📄 color-palette.md

📄 csg-boolean-operations.md

📄 domain-repetition.md

📄 domain-warping.md

📄 fluid-simulation.md

📄 fractal-rendering.md

📄 lighting-model.md

📄 matrix-transform.md

📄 multipass-buffer.md

📄 normal-estimation.md

📄 particle-system.md

📄 path-tracing-gi.md

📄 polar-uv-manipulation.md

📄 post-processing.md

📄 procedural-2d-pattern.md

📄 procedural-noise.md

📄 ray-marching.md

📄 sdf-2d.md

📄 sdf-3d.md

📄 sdf-tricks.md

📄 shadow-techniques.md

📄 simulation-physics.md

📄 sound-synthesis.md

📄 terrain-rendering.md

📄 texture-mapping-advanced.md

📄 texture-sampling.md

📄 volumetric-rendering.md

📄 voronoi-cellular-noise.md

📄 voxel-rendering.md

📄 water-ocean.md

📄 webgl-pitfalls.md

📄 SKILL.md