godot-shader
Skill29 starsChanged 6 months agoMITView on GitHub
Godot 4 shaders, materials, visual effects, and rendering customization: Godot shading language (.gdshader), visual shader graphs, particle shaders, material setup, post-processing, and GPU performance optimization. Use when working on Godot 4 rendering for: (1) Writing or optimizing .gdshader files, (2) Designing visual shader graphs, (3) Creating particle effects or GPU-driven VFX, (4) Configuring render pipelines (Forward+/Mobile/Compatibility), (5) Optimizing draw calls and shader complexity, (6) Setting up post-processing.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mattstruble/skillstheir own version, first seen Jul 22, 2026
- alexmeckes/godot-claude-skillstheir own version, first seen Jan 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- alexmeckes/godot-claude-skills★ 35same name
- mattstruble/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- godot-csharpSkill
- godot-gdextensionSkill
- godot-gdscriptSkill
- godotSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 10 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use for: PC, console, high-end mobile
- Distinctive: line 28
Use for: mobile devices, low-end hardware
- Distinctive: line 33
Use for: web exports, very old hardware (OpenGL 3.3/WebGL 2)
- Distinctive: line 34
No compute shaders — plan visual design around this if targeting web
- Very specific: line 44
Use #include (Godot 4.3+) or #define for shared functions
- Distinctive: line 75
All uniforms must have descriptive names and appropriate hints
- Distinctive: line 77
No magic numbers — use named constants or documented uniform values
- Very specific: line 82
Use when a spatial shader is unnecessary
- Very specific: line 88
Use when StandardMaterial3D doesn't have a needed feature
- Distinctive: line 93
Use sparingly — each overlay adds a draw call per mesh
- Very specific: line 109
Use GPUParticles3D/GPUParticles2D for large counts (100+)
- Very specific: line 110
Write shader_type particles for custom behavior
- Very specific: line 112
Use TRANSFORM for position, VELOCITY for movement, COLOR/CUSTOM for data
- Very specific: line 115
Use CPUParticles3D/CPUParticles2D for small counts (<50) or Compatibility renderer
- Very specific: line 120
Use visibility_aabb to cull off-screen particles
- Distinctive: line 134
Use sparingly — each effect adds a full-screen pass
- Distinctive: line 142
Use for: heat distortion, underwater, damage vignette, blur effects
- Very specific: line 154
Use hint_default_white/hint_default_black for optional textures
- Very specific: line 155
Avoid dynamic branching in fragment shaders — use mix() and step() instead
- Distinctive: line 175
Not using mipmaps on textures sampled at varying distances
- Very specific: line 178
Not setting render_priority on transparent materials — incorrect sort order
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Godot Shader Specialist
Godot 4 shaders, materials, visual effects, rendering customization, and GPU performance. Covers the Godot shading language, visual shader graphs, particle shaders, materials, post-processing, and render pipeline selection.
Renderer Selection
Forward+ (Default for Desktop)
- Use for: PC, console, high-end mobile
- Features: clustered lighting, volumetric fog, SDFGI, SSAO, SSR, glow
- Supports unlimited real-time lights via clustered rendering
- Best visual quality, highest GPU cost
Mobile Renderer
- Use for: mobile devices, low-end hardware
- Features: limited lights per object (8 omni + 8 spot), no volumetrics
- Lower precision, fewer post-process options
Compatibility Renderer
- Use for: web exports, very old hardware (OpenGL 3.3/WebGL 2)
- No compute shaders — plan visual design around this if targeting web
- Most limited feature set
Shader File Standards
- One shader per file — file name matches material purpose
- Naming:
[type]_[category]_[name].gdshaderspatial_env_water.gdshader(3D environment water)canvas_ui_healthbar.gdshader(2D UI health bar)particles_combat_sparks.gdshader(particle effect)
- Use
#include(Godot 4.3+) or#definefor shared functions
Shader Types
| Type | Use |
shader_type spatial | 3D mesh rendering |
shader_type canvas_item | 2D sprites, UI elements |
shader_type particles | GPU particle behavior |
shader_type fog | Volumetric fog effects |
shader_type sky | Procedural sky rendering |
Code Standards
shader_type spatial;
// Uniforms with hints for artist-exposed parameters
uniform vec4 albedo_color : source_color = vec4(1.0);
uniform float roughness : hint_range(0.0, 1.0) = 0.5;
uniform sampler2D albedo_texture : source_color, filter_linear_mipmap, repeat_enable;
uniform sampler2D normal_map : hint_normal, filter_linear_mipmap, repeat_enable;
// Group uniforms for inspector organization — Godot 4.3+
group_uniforms Albedo;
uniform vec4 albedo_color : source_color = vec4(1.0);
uniform sampler2D albedo_texture : source_color, filter_linear_mipmap, repeat_enable;
group_uniforms Normal;
uniform sampler2D normal_map : hint_normal, filter_linear_mipmap, repeat_enable;- All uniforms must have descriptive names and appropriate hints
- Comment non-obvious calculations, especially math-heavy sections
- No magic numbers — use named constants or documented uniform values
Material Setup
StandardMaterial3D
- Use when a
spatialshader is unnecessary - Features: albedo, metallic/roughness, emission, normal, AO, detail maps
- Performance: significantly cheaper than custom shaders
- Good for 80%+ of project materials
ShaderMaterial
- Use when
StandardMaterial3Ddoesn't have a needed feature - Attach a
.gdshaderfile or useShaderMaterialfor code-defined shaders
Material Overlay
- Adds an extra render pass on a
MeshInstance3D - Use sparingly — each overlay adds a draw call per mesh
- Good for: damage flash, selection highlight, temporary effects
Post-4.3 Rendering Changes
From the godot skill references — key changes the model may not know:
- 4.6: D3D12 default on Windows (was Vulkan), glow processes BEFORE tonemapping, SSR overhauled, AgX tonemapper has new white point/contrast controls
- 4.5: Shader Baker (pre-compile to eliminate startup hitching), SMAA 1x, stencil buffer support, bent normal maps, specular occlusion
- 4.4: Shader texture types changed from
Texture2DtoTexture
Particle Systems
GPU Particles (preferred)
- Use
GPUParticles3D/GPUParticles2Dfor large counts (100+) - Write
shader_type particlesfor custom behavior - Particle shader controls: spawn, velocity, color over lifetime, size over lifetime
- Use
TRANSFORMfor position,VELOCITYfor movement,COLOR/CUSTOMfor data
CPU Particles
- Use
CPUParticles3D/CPUParticles2Dfor small counts (<50) or Compatibility renderer - Simpler setup — use inspector properties
Particle Performance
- Set
lifetimeto minimum needed - Use
visibility_aabbto cull off-screen particles - LOD: reduce particle count at distance
- Target: all particle systems combined < 2ms GPU time
Post-Processing
WorldEnvironment
WorldEnvironmentnode withEnvironmentresource for scene-wide effects- Configure: glow, tone mapping, SSAO, SSR, fog, adjustments
- Multiple environments for different areas (indoor vs outdoor)
Compositor Effects (4.3+)
- Custom full-screen effects via
CompositorEffectscripts - Access screen texture, depth, normals for custom passes
- Use sparingly — each effect adds a full-screen pass
Screen-Space Shaders
uniform sampler2D screen_texture : hint_screen_texture;
uniform sampler2D depth_texture : hint_depth_texture;- Apply via
ColorRectorTextureRectcovering the viewport - Use for: heat distortion, underwater, damage vignette, blur effects
Performance Optimization
Draw Call Management
MultiMeshInstance3Dfor repeated objects — batches draw callsMeshInstance3D.material_overlaysparingly — extra draw call per mesh- Merge static geometry where possible
- Profile draw calls with Profiler and
Performance.get_monitor()
Shader Complexity
- Minimize texture samples in fragment shaders — expensive on mobile
- Use
hint_default_white/hint_default_blackfor optional textures - Avoid dynamic branching in fragment shaders — use
mix()andstep()instead - Pre-compute expensive operations in vertex shader when possible
- LOD materials: simplified shaders for distant objects
Render Budgets (60 FPS target)
| Subsystem | Budget |
| Geometry rendering | 4-6ms |
| Lighting | 2-3ms |
| Shadows | 2-3ms |
| Particles/VFX | 1-2ms |
| Post-processing | 1-2ms |
| UI | < 1ms |
Common Shader Anti-Patterns
- Texture reads in a loop — exponential cost
- Full precision (
highp) everywhere on mobile — usemediump/lowpwhere possible - Dynamic branching on per-pixel data — unpredictable on GPUs
- Not using mipmaps on textures sampled at varying distances
- Overdraw from transparent objects without depth pre-pass
- Post-processing effects sampling screen texture multiple times — blur should be two-pass
- Not setting
render_priorityon transparent materials — incorrect sort order
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

