This skill helps an agent write shaders in the Godot Shading Language: choosing the shader type, writing the right output variables, exposing uniforms with hints and wiring a ShaderMaterial in a scene file or from code.
It includes patterns for a scrolling tint, an emissive rim, a screen-reading blur and a headless script that compiles every .gdshader and surfaces SHADER ERROR lines. A gotcha list covers porting 3.x shaders, washed-out colours, transparent sorting and time rollover.
What You Get
- A core workflow from picking canvas_item or spatial to exposing uniforms, wiring the material and checking compilation
- Shader patterns for a tinted scrolling UV, an emissive rim on an opaque material and a screen-reading blur
- A headless GDScript that finds every .gdshader, forces compilation and prints errors for grep
- A gotcha list for 3.x renames, wrong output variables, missing source_color, transparent pipeline side effects and UV clamping
Common Use Cases
- Writing a new .gdshader for a sprite or 3D mesh
- Fixing a SHADER ERROR in the Output panel
- Porting a Godot 3 shader that uses SCREEN_TEXTURE
- Setting shader parameters from GDScript
What Makes It Unique
The skill gives a way to check shaders without a window: a headless script that forces the compiler to run and a grep on the log. It lists the Godot 4 renames that break old shaders and the subtle cases, such as writing ALPHA moving a material into the transparent pipeline, that make objects sort wrong.
Under The Hood
The agent loads the SKILL.md and, when needed, a reference on built-ins, render modes and light functions. It writes .gdshader files and a small GDScript compile test into your project, runs the Godot binary headless with output redirected to a log file, and searches the log with grep. If you wired a material by editing a scene file it also runs the Python project checker from a sibling skill. It fetches no web pages and calls no APIs; the headless run does not use the GPU driver, so the skill asks you to look at the result in the real renderer.