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.

referencesuniforms-and-builtins.md

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

Uniforms and built-in variables

Uniform hints

uniform float intensity : hint_range(0.0, 1.0) = 0.5;
uniform vec4 tint_color : source_color = vec4(1.0);
uniform sampler2D noise_texture;

Runtime: material.set_shader_parameter("intensity", 0.8)

canvas_item built-ins

  • UV, COLOR, TEXTURE, TIME, SCREEN_UV

spatial built-ins

  • ALBEDO, NORMAL, ROUGHNESS, METALLIC

WHY uniforms beat hardcoding

// GOOD — tweakable in inspector
uniform float speed = 1.0;
void fragment() { COLOR.r = sin(TIME * speed); }

// BAD — requires shader recompile to tune
void fragment() { COLOR.r = sin(TIME * 2.5); }

Move invariant math to vertex(); pass via varying.

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