agentleFS
rheadshrheadsh/audiovisual-production-skills/td-glsl/SKILL.md

td-glsl

Skill40 starsChanged 5 months agoMITView on GitHub

Write GLSL shaders for TouchDesigner's GLSL TOP, GLSL MAT, and GLSL COMP operators. Use when creating pixel shaders, vertex shaders, compute shaders, visual effects, image processing, generative art, GPU computations, or working with .glsl/.frag files for TouchDesigner.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. eltallerdepiyamas/claude-skills★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    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 repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write GLSL shaders optimized for TouchDesigner's shader operators.

    line 8
  2. Distinctive:

    Every TouchDesigner pixel shader needs:

    line 12
  3. Distinctive:

    When providing shaders, always include:

    line 80
  4. Distinctive:

    Start with basic template

    line 105
  5. Distinctive:

    Add uniforms (declare + configure)

    line 106

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TouchDesigner GLSL Shader Writing

Write GLSL shaders optimized for TouchDesigner's shader operators.

Quick Start

Every TouchDesigner pixel shader needs:

// 1. Uniforms - Only declare what YOU need
uniform float uTime;

// 2. Output - Must be global, before main()
out vec4 fragColor;

// 3. Main function
void main() {
    vec4 color = texture(sTD2DInputs[0], vUV.st);
    fragColor = TDOutputSwizzle(color);
}

Critical Rules

  1. Output declaration: out vec4 fragColor; must be global (before main())
  2. Never declare: sTD2DInputs[], vUV, vP, vN - TouchDesigner provides these
  3. Always use: TDOutputSwizzle() for final output
  4. Uniforms workflow: Declare in GLSL + Configure in TD parameter pages

Automatic Variables (DO NOT Declare)

sTD2DInputs[0]     // Input textures - just use them!
vUV.st             // UV coordinates (0-1)
vP, vN, vColor     // Position, normal, vertex color

Must Declare and Configure

TouchDesigner does NOT provide automatic uniforms. You must:

  1. Declare in shader: uniform float uTime;
  2. Configure in TD UI (Vectors page):
    • Name: uTime
    • Type: float
    • Value: absTime.seconds

Common Patterns

See examples/PATTERNS.md for ready-to-use templates:

  • Basic texture sampling
  • Time-based animation
  • Multi-input blending
  • Generative patterns
  • Feedback loops
  • Displacement effects

TouchDesigner Functions

// Output (required)
TDOutputSwizzle(vec4 color)

// Noise
TDSimplexNoise(vec2 p)
TDPerlinNoise(vec3 p)

// Color conversion
TDHSVToRGB(vec3 hsv)
TDRGBToHSV(vec3 rgb)

Response Format

When providing shaders, always include:

  1. GLSL Code with comments
  2. TouchDesigner Setup instructions:
    • Which parameter page (Vectors, Colors, CHOP Uniforms)
    • Uniform names and types
    • Values or expressions (e.g., absTime.seconds)

Common Errors

See reference/TROUBLESHOOTING.md for solutions to:

  • 'fragColor' : undeclared identifier
  • 'sTD2DInputs' : redefinition
  • 'uTime' : undeclared identifier
  • Uniforms with no effect
  • Black/incorrect output

Additional Resources

  • reference/FUNCTIONS.md - Complete API reference
  • reference/BEST-PRACTICES.md - Optimization & organization
  • examples/COMPLETE.md - Full shader examples

Writing Process

  1. Start with basic template
  2. Add uniforms (declare + configure)
  3. Implement shader logic
  4. Test incrementally
  5. Optimize when working

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.