Back to Skills

shader-programming

Write game shaders from cross-engine fundamentals — the vertex→fragment pipeline, coordinate spaces, UV math, and common 2D/3D effects (tint, UV scroll, dissolve, outline, fresnel rim, vignette) in GLSL with HLSL equivalents. Use when the user mentions shaders, fragment/pixel shader, vertex shader, UV, GLSL, HLSL, or effects like dissolve, outline, or rim light.

567stars44forksUpdated 8/20/2026

Security Assessment

Safe(97/100)
Security Score97/100

About shader-programming

shader-programming is a cross-engine game-development skill that teaches writing GPU shaders from portable fundamentals — the vertex→fragment pipeline, coordinate spaces, UV math, and how common 2D/3D effects are built — in GLSL with HLSL equivalents. It solves the recurring confusion of shader authoring by grounding the reader in concepts that port across engines, where only the language dialect and built-in variable names change, and it defers to engine-specific docs (godot-shaders, Unity/Unreal material docs) for exact syntax.

The core workflow covers knowing which pipeline stage you're in, tracking coordinate spaces (model → world → view → clip), driving effects with UVs and a time uniform, working per-pixel with branch-light math (mix, step, smoothstep, clamp) rather than divergent if-branches, passing data via uniforms and varyings while keeping texture samples few, and verifying visually on target hardware. It provides annotated GLSL fragment patterns — texture sampling and tint, frame-rate-independent UV scrolling, dissolve with a glowing edge from a noise threshold, and a Fresnel rim light — each with HLSL notes. A references/effects.md file adds full outline, vignette, and color-grading shaders, a GLSL↔HLSL function/type mapping table, and per-engine notes. A dedicated Pitfalls section calls out mixing coordinate spaces, forgetting to normalize interpolated vectors, cross-engine UV flips, heavy branching, discard defeating early-Z, and mobile precision issues.

The target users are game developers and technical artists who want to understand or write vertex/fragment shaders, build effects like tint, scroll, dissolve, outline, rim light, and vignette, or translate a shader between GLSL, HLSL, and engines. It is a concept-and-reference skill focused on transferable knowledge rather than any single engine's toolchain.

FAQ

Which shading languages does it use?

It teaches in GLSL with HLSL equivalents, and includes a GLSL↔HLSL function and type mapping (for example mix↔lerp, fract↔frac, texture()↔.Sample(), vec2↔float2) plus column- vs row-major matrix notes.

Is it tied to a specific engine?

No, it is cross-engine and teaches portable fundamentals. For an engine's exact shader language and built-ins it defers to godot-shaders or the engine's material docs, and mentions Godot, Unity, and Unreal conventions.

What effects does it cover?

Tint/recolor, scrolling textures, dissolve with a glowing edge, outlines (2D sprite and 3D), Fresnel/rim light, vignette, and color grading. The SKILL.md sketches several and references/effects.md holds the full versions.

What common shader bugs does it warn about?

Mixing coordinate spaces, forgetting to normalize interpolated normals/directions, cross-engine UV V-flips, heavy branching and dynamic loops stalling the GPU, discard defeating early-Z on tiled mobile GPUs, and precision issues (highp vs mediump) on mobile.

Who is this for?

Game developers and technical artists who want to reason about the GPU pipeline and UVs, write vertex/fragment shaders, build common effects, or translate a shader concept between GLSL, HLSL, and engines.

All Files

2 files
SKILL.md6.6 KB
View
references/effects.md5.0 KB
View

Install shader-programming

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill