Agent skill

Godot Shaders Basics

by thedivergentai in thedivergentai/GD-Agentic-Skills

Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials.

LGPL-3.0Auto-check passedGame Development

Install Godot Shaders Basics

skills CLI
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-shaders-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedivergentai/GD-Agentic-Skills godot-shaders-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot-shaders-basics .claude/skills/godot-shaders-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-shaders-basics
GitHub stars
821
Token cost
~3.3k tokens
SKILL.md length
945 words
Files
19 (incl. scripts, references)
Skills in repo
98
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials.

  • Draw-call batching breaks
  • SKILL.md covers NEVER Do in Shaders, Scenario → Script Triggers, Available Scripts and Expert Pointers, plus 2 more sections
  • Discard vs depth-prepass
  • Foliage shadows

What it does

Godot Shaders Basics is an agent skill from thedivergentai/GD-Agentic-Skills. Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including scripts and reference files (for example `references/2d-effect-recipes.md`, `references/3d-and-postfx-recipes.md` and `references/expert-advanced-patterns.md`).

It sits in Game Development, covering Game development and Shaders. It works with Godot. The repository describes itself as: The official "Long-Term Memory" for Godot 4.7+ AI Agents. A high-density library of 99 expert skills and 27 genre blueprints, providing audited, strictly typed GDScript patterns… The licence is LGPL-3.0.

When your agent uses it

  • Draw-call batching breaks
  • Discard vs depth-prepass
  • Foliage shadows
  • Post-process quads

Example prompts

  • “/godot-shaders-basics”

What it can do on your machine

Read from SKILL.md and the folder at commit 4c4d0ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 13 files in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot Shaders Basics loads about 3.3k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 122 tokens; SKILL.md has 945 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~122
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from thedivergentai/GD-Agentic-Skills at commit 4c4d0ff, republished under its LGPL-3.0 licence (© thedivergentai). 945 words, ~3,251 tokens.

Download SKILL.mdSave it as .claude/skills/godot-shaders-basics/SKILL.md (or your agent's skills folder). This skill also uses 18 other files; get the full folder from GitHub.
name
godot-shaders-basics
description
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHA_SCISSOR, hint_screen_texture, hint_depth_texture, global uniform, sampler2DArray, canvas_item, spatial, post-processing.

NEVER Do in Shaders

  • NEVER use discard unconditionally for optimization — It prevents the depth prepass from working effectively. A discarded pixel still costs vertex processing; sometimes not rendering the object is better [1].
  • NEVER use if/else for dynamic states in high-performance shaders — GPUs hate branching. Use mix(), step(), and smoothstep() for mathematical, hardware-optimized selection [5, 21].
  • NEVER compare floats exactly — Hardware precision varies; if (v == 0.5) is unreliable. Use abs(a - b) < epsilon or step().
  • NEVER use standard Alpha Blending for massive foliage — It prevents shadows and SSR. Use Alpha Scissor or Alpha Hash (dithering) to enable depth prepass and shadow casting [7].
  • NEVER hardcode POSITION to vec4(VERTEX, 1.0) for full-screen quads in 4.3+ — Godot 4.3 uses Reversed-Z depth; this will cause clipping. Use POSITION = vec4(VERTEX.xy, 1.0, 1.0) [8, 9].
  • NEVER duplicate materials to change one color/value on many enemies — Use instance uniform. This allows unique values for thousands of nodes while maintaining a single draw call (batching) [10].
  • NEVER use TIME without a speed multiplier — Fragment speed should be controllable via uniforms to ensure consistency across different gameplay states.
  • NEVER forget hint_source_color for color uniforms — Without it, the engine treats colors as linear math, leading to incorrect gamma and washed-out visuals in the inspector.
  • NEVER calculate complex math in fragment() that could be in vertex() — vertex() runs once per point; fragment() runs millions of times per frame. Interpolate values via varying instead.
  • NEVER use #define macros for dynamic runtime toggles — These create new shader permutations, causing massive compilation stutters when first encountered in-game. Use uniforms instead.
  • NEVER forget to normalize vectors — Using reflect(dir, normal) on unnormalized vectors causes severe rendering artifacts and incorrect lighting math.
  • NEVER modify UV without bounds checking or fract() — Shifting UVs beyond 0.0-1.0 without repeat wrapping or clamping will sample edge pixels or return black, breaking texture consistency.

Scenario → Script Triggers

MANDATORY for the matching effect. Do NOT Load beginner canvas_item tint recipes or built-in variable glossaries here.

GoalScript
Per-enemy hitflash without breaking batchesMANDATORY instance_uniform_hitflash.gdshader
Foliage wind + shadowsMANDATORY foliage_wind_sway_expert.gdshader (alpha scissor/hash — not unconditional discard)
Dissolve that keeps depth-prepassMANDATORY dissolve_scissor_expert.gdshader
PostFX pixelate / stylizeMANDATORY screenspace_hex_pixelate.gdshader
Full-screen quad (Reversed-Z)MANDATORY screenspace_full_quad.gdshader
Depth → world for water/fogMANDATORY depth_world_reconstruction.gdshader
Grass flatten from playerglobal_grass_flatten.gdshader
UV-less cliffs/rockstriplanar_world_mapping.gdshader
Unique textures on instanced meshesinstance_texture_array.gdshader
Vertex displacement terrainnoise_terrain_displacement.gdshader
Animate uniforms at runtimeshader_parameter_animator.gd
VFX port templatevfx_port_shader.gdshader

Golden path for cutouts/dissolve: ALPHA_SCISSOR / alpha hash (see dissolve + foliage scripts) — not discard for optimization. NEVER list explains why.

Available Scripts

instance_uniform_hitflash.gdshader

Instance-uniform flashes; one material, many unique intensities.

dissolve_scissor_expert.gdshader

Mask dissolve with ALPHA_SCISSOR for depth-prepass + shadows.

foliage_wind_sway_expert.gdshader

World-space wind sway for foliage batches.

global_grass_flatten.gdshader

global uniform player interaction flattening grass.

screenspace_hex_pixelate.gdshader

hint_screen_texture stylized postFX.

screenspace_full_quad.gdshader

Reversed-Z-safe full-rect post pass.

depth_world_reconstruction.gdshader

hint_depth_texture → world position.

triplanar_world_mapping.gdshader

World-axis projection without UVs.

instance_texture_array.gdshader

sampler2DArray + instance uniform for unique batched textures.

noise_terrain_displacement.gdshader

Vertex noise displacement.

vfx_port_shader.gdshader

Validated VFX shader template.

shader_parameter_animator.gd

Tween/runtime uniform animation without AnimationPlayer.

shader_warmup_loader.gd

Pre-warm shader pipelines during loading screens to avoid first-frame stutter.

Expert Pointers

  • Move invariant math to vertex(); pass via varying.
  • Color uniforms need hint_source_color.
  • Prefer Official Docs for shading-language builtins; this skill owns batching, scissor, screenspace, and depth routing.

Deep recipes (on demand)

LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in scripts/ — never delete, only move.

TopicReference
2D dissolve/wave/outline2d-effect-recipes.md
3D toon + vignette3d-and-postfx-recipes.md
Uniforms / built-insuniforms-and-builtins.md
Fog, compute, warmupexpert-advanced-patterns.md
Show full SKILL.md (381 more words)Show less

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.

Official Documentation
  • Introduction to shaders — Entry map of shader types, render modes, and when to use ShaderMaterial vs StandardMaterial3D.
  • Shading language — Core GLSL-like syntax: uniforms, hints, varyings, built-ins, and preprocessor rules used throughout this skill.
  • CanvasItem shaders — 2D canvas_item built-ins (UV, COLOR, TEXTURE, SCREEN_UV) for sprites, UI, and 2D post FX.
  • Spatial shaders — 3D spatial built-ins (ALBEDO, NORMAL, instance uniform, depth/screen textures) for materials and full-screen quads.
  • Your first 2D shader — Minimal canvas_item workflow from ShaderMaterial attach through fragment tinting.
  • Your first 3D shader — Minimal spatial workflow and conversion path from StandardMaterial3D into writable shaders.
  • ShaderMaterial — Runtime set_shader_parameter / instance parameter API used by animators and hit-flash batching.
  • Custom post-processing — Screen-reading shaders, hint_screen_texture, and compositing patterns for pixelate/vignette-style FX.
  • Advanced post-processing — Depth buffer, reversed-Z, and world reconstruction needed for water/fog/debug visualizers.
  • Compute shaders — RenderingDevice GPGPU path for particle sims and other non-fragment workloads.
  • Using VisualShaders — Graph editor + VisualShaderNodeCustom extensibility covered in the expert patterns.
  • GPU optimization — Overdraw, transparency, and batching guidance that motivates alpha scissor, instance uniforms, and vertex-vs-fragment cost.
Prerequisites
  • godot-project-foundations — Nodes, Resources, and project layout required before attaching ShaderMaterials and shipping .gdshader assets.
  • godot-resource-data-patterns — Sharing vs duplicating ShaderMaterial/Shader Resources so uniforms and instance parameters stay batch-friendly.
Complements
  • godot-3d-materials — StandardMaterial3D/ORM first; graduate to spatial shaders for triplanar, dissolve, and instance-uniform effects.
  • godot-3d-lighting — How custom ALBEDO/EMISSION/light() output interacts with Forward+, GI, and fog volumes.
  • godot-particles — Particle process/draw materials and alpha pipelines that must match scissor/hash vs blend choices from this skill.
  • godot-2d-animation — CanvasItem shader hooks for stylized 2D motion, outline, and dissolve on animated sprites.
  • godot-camera-systems — Camera near/far and view/projection matrices that screen-space and depth-reconstruction shaders depend on.
  • godot-performance-optimization — Draw-call batching, MultiMesh, and GPU budgets that justify instance uniform and avoiding unique materials.
  • godot-debugging-profiling — GPU/overdraw profilers and debug views to validate shader cost and depth/normal visualizers.
Downstream / consumers
  • godot-procedural-generation — Procedural meshes/terrain consume noise displacement, triplanar, and UV-less spatial patterns from this skill.
  • godot-3d-world-building — Large environment props apply foliage wind, grass flatten, and world-projection shaders at level scale.
  • godot-genre-open-world — Open-world foliage interaction, distance FX, and shared-material batching consume these shader templates.
Master
  • godot-master — Library router and mirrored module entry for cross-skill discovery.

© thedivergentai, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 18 other files (scripts, references) in skills/godot-shaders-basics of thedivergentai/GD-Agentic-Skills.

  • SKILL.md
  • references/2d-effect-recipes.md
  • references/3d-and-postfx-recipes.md
  • references/expert-advanced-patterns.md
  • references/migration-notes.md
  • references/uniforms-and-builtins.md
  • scripts/depth_world_reconstruction.gdshader
  • scripts/dissolve_scissor_expert.gdshader
  • scripts/foliage_wind_sway_expert.gdshader
  • scripts/global_grass_flatten.gdshader
  • scripts/instance_texture_array.gdshader
  • scripts/instance_uniform_hitflash.gdshader
  • scripts/noise_terrain_displacement.gdshader
  • scripts/screenspace_full_quad.gdshader
  • scripts/screenspace_hex_pixelate.gdshader
  • scripts/shader_parameter_animator.gd
  • scripts/shader_warmup_loader.gd
  • scripts/triplanar_world_mapping.gdshader
  • scripts/vfx_port_shader.gdshader

Open the folder on GitHubat commit 4c4d0ff

Compare with similar skills

Godot Shaders Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot Shaders Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot Shaders Basics this skillthedivergentai/GD-Agentic-Skills821—~3.3kAutomated safety check: PassLGPL-3.0
Shader Basicsjame581/GodotPrompter805—~3.7kAutomated safety check: PassMIT
Godot Shader Fundamentals925236118/AlphaAgent103—~1.5kAutomated safety check: PassMIT
Godot Shadersgamedev-skills/awesome-gamedev-agent-skills1.4k—~1.4kAutomated safety check: PassApache-2.0
Scenario Godot Shadersscenario-labs/skills946—~4.9kAutomated safety check: PassMIT
Gamedev Shadersericrisco/rsc-harness180—~3.6kAutomated safety check: PassMIT

Similar skills

  • Shader Basics

    jame581/GodotPrompter

    A skill your agent uses when implementing shaders — Godot shader language, visual shaders, common visual recipes, and post-processing effects

    805 GitHub stars~3.7k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Godot Shader Fundamentals

    925236118/AlphaAgent

    Godot 4 Shader 基础语法与数学,包含类型系统、Uniform变量、内置函数及实用技巧. An agent skill from 925236118/AlphaAgent.

    103 GitHub stars~1.5k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Godot Shaders

    gamedev-skills/awesome-gamedev-agent-skills

    Write Godot 4.7 shaders in the Godot Shading Language: canvasitem shaders for 2D and spatial shaders for 3D, with vertex/fragment functions, uniforms (sourcecolor, hintrange), TIME/UV animation, and…

    1.4k GitHub stars~1.4k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Scenario Godot Shaders

    scenario-labs/skills

    A skill your agent uses when writing or fixing Godot 4.7 shaders: .gdshader code (spatial, canvasitem, particles, sky, fog), VisualShader graphs built in code, stylized or toon water, dissolve or…

    946 GitHub stars~4.9k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Gamedev Shaders

    ericrisco/rsc-harness

    A skill your agent uses when authoring or debugging a shader, material, VFX, or full-screen post-process in a game engine — Godot 4.x .gdshader, Unity 6 URP/HDRP, Unreal 5.x Materials, effect…

    180 GitHub stars~3.6k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed

More from thedivergentai/GD-Agentic-Skills

All 98 skills in this repo
  • Godot 2D Animation

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs.

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot 3D World Building

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.

    821 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 2D To 3D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control…

    821 GitHub stars~4.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 3D To 2D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for simplifying 3D games to 2D including dimension reduction strategies, 2.5D fake-depth, isometric ports, camera flattening, physics conversion, 3D-to-sprite art pipeline, and…

    821 GitHub stars~4.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Agent Vision

    thedivergentai/GD-Agentic-Skills

    Agentic eyes for Godot work: cross-platform screenshot CLI (asset/region/window/screen) to budgeted WebP, TEMP editor viewport bridge under .gdskills/, and Taste Receptor Atlas v2 (~237…

    821 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Animation Tree Mastery

    thedivergentai/GD-Agentic-Skills

    Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance…

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Godot Shaders Basics

What does Godot Shaders Basics do?

Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Godot Shaders Basics is an agent skill from thedivergentai/GD-Agentic-Skills. Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials.

When should I use Godot Shaders Basics?

Godot Shaders Basics fits situations like: draw-call batching breaks; discard vs depth-prepass; foliage shadows; post-process quads.

How do I install Godot Shaders Basics in Claude Code?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-shaders-basics -a claude-code`. Or copy the skill folder (skills/godot-shaders-basics in thedivergentai/GD-Agentic-Skills) into .claude/skills/godot-shaders-basics in your project. Claude Code loads it when a task matches its description.

How do I install Godot Shaders Basics in Codex?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-shaders-basics -a codex`. Or copy the skill folder (skills/godot-shaders-basics in thedivergentai/GD-Agentic-Skills) into .agents/skills/godot-shaders-basics in your project. Codex loads it when a task matches its description.

Can I use Godot Shaders Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-shaders-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-shaders-basics, .gemini/skills/godot-shaders-basics, .github/skills/godot-shaders-basics and .opencode/skills/godot-shaders-basics in your project.

What does Godot Shaders Basics need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot Shaders Basics is instructions for the agent only.

Does Godot Shaders Basics access the network?

SKILL.md names 1 domain. As links in the text: docs.godotengine.org. This is read from the text; nothing was executed.

Is Godot Shaders Basics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Godot Shaders Basics use?

Godot Shaders Basics is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot Shaders Basics use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Godot Shaders Basics?

Skills that share tags, products or a category with Godot Shaders Basics: Shader Basics (jame581/GodotPrompter, 805 stars), Godot Shader Fundamentals (925236118/AlphaAgent, 103 stars), Godot Shaders (gamedev-skills/awesome-gamedev-agent-skills, 1.4k stars) and Scenario Godot Shaders (scenario-labs/skills, 946 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot Shaders Basics?

thedivergentai (a GitHub user) maintains it in thedivergentai/GD-Agentic-Skills, which has 821 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 9, 2026.

Source: thedivergentai/GD-Agentic-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.