# godot-shaders-basics

Supplies Godot shader patterns for draw-call batching, post-processing, and foliage. Useful when building hit-flashes or screen passes without depth glitches.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 688 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-shaders-basics/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-shaders-basics

## What it does

This skill equips coding agents with practical rules for Godot Shading Language. It focuses on engine rendering bottlenecks rather than introductory color math. The model learns to configure instance uniforms for enemy nodes. This preserves single draw calls.

Included shader templates handle foliage wind sway and world position reconstruction from depth textures. Full-screen screen-space passes account for Godot 4.3 requirements. Because the engine uses Reversed-Z depth, screen quads require `POSITION = vec4(VERTEX.xy, 1.0, 1.0)` to prevent unwanted clipping.

Dynamic `if/else` checks are replaced by hardware-friendly functions like `step()` and `mix()`. Invariant calculations move to the vertex stage so fragment code remains lean.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-shaders-basics -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-shaders-basics/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-shaders-basics/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-shaders-basics -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-shaders-basics/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-shaders-basics -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-shaders-basics/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-shaders-basics
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-shaders-basics/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-shaders-basics -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-shaders-basics
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-shaders-basics/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-shaders-basics -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-shaders-basics/SKILL.md

## When to use it
- implement damage flashes on instanced meshes without breaking batches
- render screen-space post-process quads correctly in Godot 4.3 Reversed-Z
- reconstruct world coordinates using scene depth textures
- build foliage wind motion while preserving shadow casting via alpha scissor

## Example prompts
- Write a Godot hitflash shader using instance uniforms to preserve draw call batching
- Generate a full-screen quad shader compatible with Godot 4.3 Reversed-Z depth
- Build a dissolve shader that keeps shadows and depth prepass using alpha scissor

## Similar
- [godot-shaders](https://affpapa.org/en/nevibecode/skills/godot-shaders.md) — skill · 6500 installs
- [godot-gdscript](https://affpapa.org/en/nevibecode/skills/godot-gdscript.md) — skill · 6500 installs
- [godot-ui](https://affpapa.org/en/nevibecode/skills/godot-ui.md) — skill · 2700 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [godot-asset-generator](https://affpapa.org/en/nevibecode/skills/godot-asset-generator.md) — skill · 1000 installs
- [spritecook-use-assets-in-godot](https://affpapa.org/en/nevibecode/skills/spritecook-use-assets-in-godot.md) — skill · 555 installs

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 50 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
