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.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-shaders-basics
LinearToSRGB visual-shader node no longer clamps to [0,1] on Mobile/Forward+.get_format() lives on Texture2D base for ImageTexture / PortableCompressedTexture2D.Batching-safe materials, scissor/dissolve, screenspace FX, and depth reconstruction — Official Docs cover first shaders and built-in glossaries.
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].if/else for dynamic states in high-performance shaders — GPUs hate branching. Use mix(), step(), and smoothstep() for mathematical, hardware-optimized selection [5, 21].if (v == 0.5) is unreliable. Use abs(a - b) < epsilon or step().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].instance uniform. This allows unique values for thousands of nodes while maintaining a single draw call (batching) [10].TIME without a speed multiplier — Fragment speed should be controllable via uniforms to ensure consistency across different gameplay states.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.fragment() that could be in vertex() — vertex() runs once per point; fragment() runs millions of times per frame. Interpolate values via varying instead.#define macros for dynamic runtime toggles — These create new shader permutations, causing massive compilation stutters when first encountered in-game. Use uniforms instead.reflect(dir, normal) on unnormalized vectors causes severe rendering artifacts and incorrect lighting math.fract() — Shifting UVs beyond 0.0-1.0 without repeat wrapping or clamping will sample edge pixels or return black, breaking texture consistency.> MANDATORY for the matching effect. Do NOT Load beginner canvas_item tint recipes or built-in variable glossaries here.
| Goal | Script |
|------|--------|
| Per-enemy hitflash without breaking batches | MANDATORY instance_uniform_hitflash.gdshader |
| Foliage wind + shadows | MANDATORY foliage_wind_sway_expert.gdshader (alpha scissor/hash — not unconditional discard) |
| Dissolve that keeps depth-prepass | MANDATORY dissolve_scissor_expert.gdshader |
| PostFX pixelate / stylize | MANDATORY screenspace_hex_pixelate.gdshader |
| Full-screen quad (Reversed-Z) | MANDATORY screenspace_full_quad.gdshader |
| Depth → world for water/fog | MANDATORY depth_world_reconstruction.gdshader |
| Grass flatten from player | global_grass_flatten.gdshader |
| UV-less cliffs/rocks | triplanar_world_mapping.gdshader |
| Unique textures on instanced meshes | instance_texture_array.gdshader |
| Vertex displacement terrain | noise_terrain_displacement.gdshader |
| Animate uniforms at runtime | shader_parameter_animator.gd |
| VFX port template | vfx_port_shader.gdshader |
Golden path for cutouts/dissolve: ALPHA_SCISSOR / alpha hash (see dissolve + foliage scripts) — not discard for optimization. NEVER list explains why.
Instance-uniform flashes; one material, many unique intensities.
Mask dissolve with ALPHA_SCISSOR for depth-prepass + shadows.
World-space wind sway for foliage batches.
global uniform player interaction flattening grass.
hint_screen_texture stylized postFX.
Reversed-Z-safe full-rect post pass.
hint_depth_texture → world position.
World-axis projection without UVs.
sampler2DArray + instance uniform for unique batched textures.
Vertex noise displacement.
Validated VFX shader template.
Tween/runtime uniform animation without AnimationPlayer.
Pre-warm shader pipelines during loading screens to avoid first-frame stutter.
vertex(); pass via varying.hint_source_color.> LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in scripts/ — never delete, only move.
| Topic | Reference |
|-------|-----------|
| 2D dissolve/wave/outline | 2d-effect-recipes.md |
| 3D toon + vignette | 3d-and-postfx-recipes.md |
| Uniforms / built-ins | uniforms-and-builtins.md |
| Fog, compute, warmup | expert-advanced-patterns.md |
> 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.
canvas_item built-ins (UV, COLOR, TEXTURE, SCREEN_UV) for sprites, UI, and 2D post FX.spatial built-ins (ALBEDO, NORMAL, instance uniform, depth/screen textures) for materials and full-screen quads.set_shader_parameter / instance parameter API used by animators and hit-flash batching.hint_screen_texture, and compositing patterns for pixelate/vignette-style FX.VisualShaderNodeCustom extensibility covered in the expert patterns..gdshader assets.ALBEDO/EMISSION/light() output interacts with Forward+, GI, and fog volumes.instance uniform and avoiding unique materials.Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video
App Store and Google Play screenshot creation with exact platform specs. Covers iOS/Android dimensions, gallery ordering, device mockups, and preview videos. Use for: app store optimization, ASO, app screenshots, app preview, play store listing. Triggers: app store screenshots, aso, app store optimization, play store screenshots, app preview, app listing, ios screenshots, android screenshots, app store images, app mockup, device mockup, app gallery, store listing
Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Supports reference images for style transfer and character consistency. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', 'same style as', 'keep the style', or any request needing visual content.
Generate and save images using Pollinations.ai's free, open-source API. No signup required. Supports URL-based generation, custom parameters (width, height, model, seed), and automatic file saving. Perfect for quick prototypes, marketing assets, and creative workflows.
| Create AI marketing videos for ads, promos, product launches, and brand content. product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video
Use when building App Store screenshot pages, generating exportable marketing screenshots for iOS apps, or creating programmatic screenshot generators with Next.js. Triggers on app store, screenshots, marketing assets, html-to-image, phone mockup.
Anti-AI-slop design skill for greenfield pages, audits, redesigns, and design extraction from URLs or screenshots. Use when the user asks to build a new app or landing page, wants to redesign something, invokes Hallmark by name, or uses audit/redesign/study.
Launch and supervise OpenShell gator agents. Use when starting gator on issues or PRs, checking gator sandboxes, building the gator sandbox image, restarting stuck gators, inspecting gator logs, or experimenting with gator harness/model overrides. Trigger keywords - launch gator, start gator, run gator, gator sandbox, supervised gator, gator logs, restart gator.
Take thedivergentai/godot-shaders-basics from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.