godot-shaders-vfx
Skill54 starsChanged 14 days agoMITView on GitHub
Shaders and VFX in Godot 4.7 - shading language (spatial, canvas_item, particles, sky, fog), instance/global uniforms, screen/depth textures, stencil_mode, includes, ready effects (dissolve, outline, water, toon), GPU particles, compositor effects, shader stutter fixes, headless shader validation. Use for .gdshader files, materials effects or particles.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- nick-vas/hyperdottheir own version, first seen Nov 22, 2026
- MindsMaster/godot-claude-code-skillstheir own version, first seen Oct 25, 2026
- vl4dt/godot-skillstheir own version, first seen Jun 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- vl4dt/godot-skills★ 8same name
- MindsMaster/godot-claude-code-skills★ 3same name
- nick-vas/hyperdot★ 1same 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-2dSkill
- godot-3d-gameplaySkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-inputSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-performanceSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-testing-debugSkill
- godot-uiSkill
- godot-xrSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Use GPUParticles2D/3D + ParticleProcessMaterial by default (they work on all renderers in 4.x).
- Distinctive: line 36
Prefer Environment features (glow, fog, adjustments with a LUT, DOF) before writing custom post effects.
- Very specific: line 41
Keep the number of unique shaders and material variants low.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Shaders and VFX (4.7)
Validate after every edit: python scripts/shader_check.py [paths] compiles each .gdshader with the engine's shader compiler, headless, and returns {file, line, msg}. Errors inside #included .gdshaderinc files point at the include. Looks still need a real GPU, so ask the user to check them visually.
Shading language essentials
- The first line is
shader_type spatial | canvas_item | particles | sky | fog;. Entry points arevertex(),fragment(),light()(custom lighting) andstart()/process()(particles). render_mode(spatial):unshaded,cull_disabled,depth_draw_always,blend_add,diffuse_toon,specular_toon,world_vertex_coords, … An invalid mode is a compile error, so the checker catches it.- Uniform hints:
source_color(required on color and albedo textures, or colors come out wrong),hint_range(a, b, step),hint_normal,hint_default_white/black,filter_nearest,repeat_enable. Group them in the inspector withgroup_uniforms Name;…group_uniforms;. - Screen reads:
uniform sampler2D s : hint_screen_texture, filter_linear_mipmap;,hint_depth_textureandhint_normal_roughness_texture(Forward+). They replaceSCREEN_TEXTURE/DEPTH_TEXTUREfrom Godot 3. canvas_item screen reads need aBackBufferCopyonly when several effects stack. - Per-instance values without duplicating materials:
instance uniform float flash;set withset_instance_shader_parameter("flash", 1.0)(3D). Project-wide values:global uniform vec4 wind;declared in Project Settings → Shader Globals and set withRenderingServer.global_shader_parameter_set. varyingpasses data from vertex to fragment.#include "res://shaders/lib.gdshaderinc",#defineand#ifdefwork. Godot shaders are GLSL-like but not GLSL: there are noin/outglobals, and built-ins are UPPERCASE (ALBEDO,UV,VERTEX,NORMAL,TIME,SCREEN_UV,MODEL_MATRIX,INV_VIEW_MATRIX).- Stencil (4.5+):
stencil_mode write, compare_always, 1;on the mask material,stencil_mode read, compare_equal, 1;on the revealed one (portals, x-ray, outlines). StandardMaterial3D has ready-madeSTENCIL_MODE_OUTLINE/XRAYpresets. - Visual shaders are for artists. When writing shaders as an agent, use text
.gdshaderfiles: they're diffable and checkable.
Particles
- Use
GPUParticles2D/3D+ParticleProcessMaterialby default (they work on all renderers in 4.x). UseCPUParticles*only for exact CPU control or many tiny emitters in the Compatibility renderer (convert withconvert_from_particles). - One-shot bursts:
one_shot = true,explosiveness = 1,emitting = true, then free onfinished. Pre-warm ambient effects withpreprocess. - Shape the effect with
emission_shape,color_ramp(Gradient),scale_curve,turbulence_enabled, sub-emitters (on collision or end) and trails (trail_enabled+ ribbon or tube mesh). 4.7 adds 3D particle scale and rotation:use_scale_3d,use_rotation_3d. - Collision:
collision_modeon the material, plusGPUParticlesCollisionBox3D/Sphere3D/SDF3D/HeightField3Dnodes in the level. Attractors:GPUParticlesAttractor*3D. - Set
visibility_aabb/visibility_rectlarge enough, or particles pop out of view (Particles menu → Generate AABB). Useamount_ratioto scale intensity without a restart. - Spawn from code:
emit_particle(xform, velocity, color, custom, flags)withamountas the pool size, for impacts at arbitrary points.
Post-processing
- Simple: a full-screen
ColorRect(canvas_item shader withhint_screen_texture) on aCanvasLayer. That's enough for vignettes, CRT and color grading LUTs. - Proper 3D post:
Compositor+CompositorEffect(experimental; Forward+ and Mobile) running a compute shader throughRenderingDeviceatEFFECT_CALLBACK_TYPE_POST_TRANSPARENTand similar points. See the reference skeleton. - Prefer Environment features (glow, fog, adjustments with a LUT, DOF) before writing custom post effects.
Shader stutter (first-time compile hitches)
- 4.4+ uses ubershaders and pipeline precompilation automatically.
- 4.5+ has the shader baker: turn on the export option
shader_baker/enabledper preset (api_lookup.py --search shader_baker). It pre-compiles for the target driver, with much faster first loads on D3D12 and Metal. - Keep the number of unique shaders and material variants low. Toggling
#define-style features at runtime creates new pipelines. Uniform changes are free.
Common effects (see the reference)
dissolve with an edge glow, hit flash (instance uniform), 2D outline, spatial rim and fresnel, scrolling-UV water with depth fade, toon light(), vertex wind sway with a global uniform, full-screen vignette, stencil x-ray.
Shader library (validated by shader_check in the tests): references/shaders.md. VFX scripts (impact burst, flash driver, compositor effect skeleton): references/vfx.md
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.

