OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-shaders
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.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-shaders
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.
.gdshader code or a ShaderMaterial: 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.
shader_type canvas_item; for 2D
(Sprite2D, TextureRect, anything CanvasItem) or shader_type spatial; for 3D
materials. (particles, sky, fog also exist.)ShaderMaterial. Create a ShaderMaterial, assign your .gdshader,
and put it on the node's material. Uniforms appear in the Inspector.fragment() to set the output: COLOR (2D) or ALBEDO/EMISSION/ALPHA
(3D). Optionally vertex() to move geometry and light() for custom lighting.uniforms with hints (source_color, hint_range) so they are
editable and correctly color-managed.TIME and sample textures with texture(tex, UV).material.set_shader_parameter("name", value).Set a uniform from GDScript:
SCREEN_TEXTURE is removed — declare
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.canvas_item write COLOR; in spatial write ALBEDO
(and EMISSION, ALPHA, ROUGHNESS, METALLIC). Writing COLOR in a spatial shader
does nothing.source_color are treated as raw linear values and look
wrong (washed/dark) because Godot won't sRGB-convert them.ALPHA < 1.0 to blend, add a render mode or set
the material transparency; otherwise it's opaque/cut.repeat_enable clamps. Add : repeat_enable to
the sampler uniform for tiling/scroll.TIME is seconds since start and keeps growing — wrap with fract()/mod() for
periodic effects to avoid precision drift.discard is costly on some hardware and breaks early-Z; prefer setting ALPHA/
COLOR.a when you can.varying, custom light(),
vertex() displacement, and the visual shader graph, read
references/shading-language.md.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.