All skills
thedivergentai avatar

/godot-shaders-basics

@9d6e91e

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.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-shaders-basics

This session only. Nothing lands on disk.

referencesmigration-notes.md

≈834 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Migration notes: godot-shaders-basics

Incremental upgrade for topics this skill covers. Apply one hop, stabilize/test, then next. Never skip hops.

If the project is < 4.0, follow godot-version-migration era bridges (legacy → 3→4) until 4.0, then these hops. Official 3→4: Upgrading from Godot 3 to Godot 4.

3.x → 4.0

Official: Upgrading from Godot 3 to Godot 4

  • Rename .shader → .gdshader; update references.
  • hint_albedo/hint_color → source_color; filter/repeat on uniforms.
  • Particles shaders: start()/process() instead of vertex().
  • Custom light() and matrix builtins changed — visual QA required.

4.0 → 4.1

Official: Upgrading to Godot 4.1

  • RenderingServer.global_shader_parameter_get_list / RD shader version lists return Array[StringName].
  • RenderingDevice.draw_list_begin storage_textures typed as Array[RID].

4.1 → 4.2

Official: Upgrading to Godot 4.2

  • Mesh format upgrade — re-test shader variants on upgraded mesh surfaces.
  • RenderingDevice BarrierMask enum values changed.

4.2 → 4.3

Official: Upgrading to Godot 4.3

  • Reverse Z depth — custom spatial shaders comparing depth or using POSITION.z may break; migrate depth sampling.
  • Decal modulate converted sRGB→linear — shader/decal color inputs shift.
  • RenderingDevice barrier/draw_list API simplified (post_barrier params removed).

4.3 → 4.4

Official: Upgrading to Godot 4.4

  • RenderingDevice.draw_list_begin signature overhauled (params removed + breadcrumb).
  • Shader default texture parameter types use Texture / TextureLayered.
  • VisualShader cubemap / Texture2DArray nodes use TextureLayered.
  • VisualShaderNodeVec4Constant input type → Vector4 — recreate constant nodes.

4.4 → 4.5

Official: Upgrading to Godot 4.5

  • RenderingServer.instance_reset_physics_interpolation / instance_set_interpolated removed.

4.5 → 4.6

Official: Upgrading to Godot 4.6

  • Glow default blend Screen (brighter) — shader output may look hotter against default bloom.
  • Sky reflection roughness_layers default 7 (was 8).

4.6 → 4.7

Official: Upgrading to Godot 4.7

  • LinearToSRGB visual shader no longer clamps [0,1] on Mobile/Forward+.
  • Texture2D.get_format() unified on base class — branch format-specific shader paths on the base API.
  • Image.save_exr* gain color_image / max_linear_value optionals.

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    Error: AI Analysis failed - API error after retries

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1/3 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-shaders-basics