ai-behavior-trees-util…
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Write Godot 4.7 shaders in the Godot Shading Language: canvas_item shaders for 2D and spatial shaders for 3D, with vertex/fragment functions, uniforms (source_color, hint_range), TIME/UV animation, and screen-reading via hint_screen_texture. Use when authoring .gdshader files,
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-shaders --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/godot-shadersContext preview
The summary Claude sees to decide when to auto-load this skill.
Write Godot 4.7 shaders in the Godot Shading Language: canvas_item shaders for 2D and spatial shaders for 3D, with vertex/fragment functions, uniforms (source_color, hint_range), TIME/UV animation, and screen-reading via hint_screen_texture. Use when authoring .gdshader files,
name: godot-shaders description: > Write Godot 4.7 shaders in the Godot Shading Language: canvas_item shaders for 2D and spatial shaders for 3D, with vertex/fragment functions, uniforms (source_color, hint_range), TIME/UV animation, and screen-reading via hint_screen_texture. Use when authoring .gdshader files, writing fragment/vertex code, making 2D/3D visual effects, or porting 3.x shaders (SCREEN_TEXTURE, hint_color) to 4.x.
Write `canvas_item` (2D) and `spatial` (3D) shaders in the Godot Shading Language, animate with `TIME`/`UV`, expose `uniform`s, and read the screen. Targets **Godot 4.7**.
flash, water), 3D surface shaders (rim light, toon, scrolling UV), or screen-space post effects.
**When *not* to use:** the cross-engine *concepts* of shading (UVs, vertex/fragment theory) → `shader-programming`; particles/VFX nodes → general 3D; non-shader visuals.
1. **Pick the shader type** on the first line: `shader_type canvas_item;` for 2D (Sprite2D, TextureRect, anything `CanvasItem`) or `shader_type spatial;` for 3D materials. (`particles`, `sky`, `fog` also exist.) 2. **Attach via a `ShaderMaterial`.** Create a `ShaderMaterial`, assign your `.gdshader`, and put it on the node's `material`. Uniforms appear in the Inspector. 3. **Write `fragment()`** to set the output: `COLOR` (2D) or `ALBEDO`/`EMISSION`/`ALPHA` (3D). Optionally `vertex()` to move geometry and `light()` for custom lighting. 4. **Expose tunables as `uniform`s** with hints (`source_color`, `hint_range`) so they are editable and correctly color-managed. 5. **Animate with the built-in `TIME`** and sample textures with `texture(tex, UV)`. 6. **Set uniforms from code** with `material.set_shader_parameter("name", value)`.
shader_type canvas_item;
uniform vec4 tint : source_color = vec4(1.0); // source_color = sRGB-correct color
uniform float scroll_speed : hint_range(0.0, 2.0) = 0.3;
void fragment() {
vec2 uv = UV;
uv.x += TIME * scroll_speed; // scroll horizontally over time
COLOR = texture(TEXTURE, uv) * tint; // TEXTURE = the node's texture
}shader_type canvas_item;
uniform sampler2D noise : repeat_enable; // a NoiseTexture2D
uniform float amount : hint_range(0.0, 1.0) = 0.0;
void fragment() {
vec4 tex = texture(TEXTURE, UV);
float n = texture(noise, UV).r;
if (n < amount) {
discard; // cut the pixel away
}
COLOR = tex;
}shader_type spatial;
uniform vec4 base_color : source_color = vec4(0.2, 0.5, 1.0, 1.0);
uniform vec3 rim_color : source_color = vec3(0.6, 0.8, 1.0);
uniform float rim_power : hint_range(0.5, 8.0) = 3.0;
void fragment() {
ALBEDO = base_color.rgb;
// VIEW and NORMAL are view-space built-ins; rim is strong at grazing angles.
float rim = pow(1.0 - dot(NORMAL, VIEW), rim_power);
EMISSION = rim_color * rim;
}shader_type canvas_item;
// 4.x: declare the screen as a uniform with hint_screen_texture.
uniform sampler2D screen_tex : hint_screen_texture, filter_linear_mipmap;
uniform float blur : hint_range(0.0, 4.0) = 1.0;
void fragment() {
vec2 px = SCREEN_PIXEL_SIZE * blur;
vec4 c = texture(screen_tex, SCREEN_UV);
c += texture(screen_tex, SCREEN_UV + vec2(px.x, 0.0));
c += texture(screen_tex, SCREEN_UV - vec2(px.x, 0.0));
COLOR = c / 3.0;
}Set a uniform from GDScript:
$Sprite2D.material.set_shader_parameter("amount", 0.7)`uniform sampler2D x : hint_screen_texture;` and sample with `SCREEN_UV`. Color hints `hint_color`→`source_color`; `hint_albedo`/`hint_white`→`source_color`; `hint_range` stays. Depth/normal use `hint_depth_texture` / `hint_normal_roughness_texture`.
(and `EMISSION`, `ALPHA`, `ROUGHNESS`, `METALLIC`). Writing `COLOR` in a spatial shader does nothing.
wrong (washed/dark) because Godot won't sRGB-convert them.
the material transparency; otherwise it's opaque/cut.
the sampler uniform for tiling/scroll.
periodic effects to avoid precision drift.
`COLOR.a` when you can.
`vertex()` displacement, and the visual shader graph, read `references/shading-language.md`.
<img src="docs/assets/banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Repo: gamedev-skills/awesome-gamedev-agent-skills
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX…
Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and…
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites, tilesets, backgrounds, UI art,…
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and…
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair…