junmystery/agent-guidance-rust/godot-shaders
Claude Code and agent skill by junmystery/agent-guidance-rust
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install junmystery/agent-guidance-rust/godot-shadersSKILL.md
The same SKILL.md was published earlier as gamedev-skills/awesome-gamedev-agent-skills/godot-shaders.
Godot Shaders (4.x)
Write canvas_item (2D) and spatial (3D) shaders in the Godot Shading Language, animate with TIME/UV, expose uniforms, and read the screen. Targets Godot 4.7.
When to use
- Use when writing
.gdshadercode or aShaderMaterial: 2D effects (outline, dissolve,
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.
Core workflow
- 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.)
- Attach via a `ShaderMaterial`. Create a
ShaderMaterial, assign your.gdshader,
and put it on the node's material. Uniforms appear in the Inspector.
- Write `fragment()` to set the output:
COLOR(2D) orALBEDO/EMISSION/ALPHA
(3D). Optionally vertex() to move geometry and light() for custom lighting.
- Expose tunables as `uniform`s with hints (
source_color,hint_range) so they are
editable and correctly color-managed.
- Animate with the built-in `TIME` and sample textures with
texture(tex, UV). - Set uniforms from code with
material.set_shader_parameter("name", value).
Patterns
1. 2D (canvas_item): tint + scrolling UV
2. 2D dissolve using a noise threshold
3. 3D (spatial): emissive rim light
4. Screen-reading post effect (4.x hint, not SCREEN_TEXTURE)
Set a uniform from GDScript:
Pitfalls
- 3.x → 4.x renames.
SCREEN_TEXTUREis removed — declare
uniform sampler2D x : hint_screen_texture; and sample with SCREEN_UV. Color hints hint_color/hint_albedo→source_color; hint_white/hint_black→ hint_default_white/hint_default_black; hint_range stays. Depth/normal use hint_depth_texture / hint_normal_roughness_texture.
- Wrong output variable. In
canvas_itemwriteCOLOR; inspatialwriteALBEDO
(and EMISSION, ALPHA, ROUGHNESS, METALLIC). Writing COLOR in a spatial shader does nothing.
- Color uniforms without `source_color` are treated as raw linear values and look
wrong (washed/dark) because Godot won't sRGB-convert them.
- Object drawn in the wrong order, casts no shadow, or skips SSAO (3D) → the spatial
shader reads or writes ALPHA, which moves the whole material to the transparent pipeline even if the value is always 1.0. Don't touch ALPHA in opaque shaders; for hard cut-outs also set ALPHA_SCISSOR_THRESHOLD (alpha-scissor stays in the opaque pass).
- Sampling outside [0,1] UV without
repeat_enableclamps. Add: repeat_enableto
the sampler uniform for tiling/scroll.
- Effect jumps once an hour →
TIME(seconds since start, affected bytime_scale, not
by pausing) wraps every rendering/limits/time/time_rollover_secs (3600 by default). Pick periods that divide the rollover, or feed your own time through a uniform.
- `discard` is costly on some hardware and breaks early-Z; prefer setting
ALPHA/
COLOR.a when you can.
References
- For built-in variables per shader type, render modes,
varying, customlight(),
vertex() displacement, and the visual shader graph, read references/shading-language.md.
Related skills
shader-programming— engine-agnostic shader concepts (GLSL/HLSL).godot-3d-essentials— materials, environment, and where spatial shaders live.godot-ui-control— applying shaders to UI for effects.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/godot-shaders/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/junmystery/agent-guidance-rust/godot-shaders)