/tdmcp-skills:td-glsl-shadersfrom TDMCP Skills
Provides GLSL shader patterns for TouchDesigner — glslmultiTOP, glslMAT, glslPOP. Covers docked DAT setup, uniform conventions, and naming rules for GPU shaders.
Ships in TDMCP Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Custom GPU shaders in TouchDesigner. Three contexts: TOP (image processing), MAT (materials), POP (particle compute). See reference.md for built-in uniforms, functions, and template shaders.
glslmultiTOP (prefer over glslTOP) — image processing, procedural textures, compute. Supports >3 inputs and POP buffer readsglslMAT — custom materials with vertex + pixel shaders, TD lighting systemglslPOP / glsladvancedPOP — per-point GPU compute on particle data (see td-pop-family skill). Compute shader API (P[idx], TDIn_P(), N[idx]) documented in td-pop-family reference.md. For glsladvancedPOP (multi-class, index buffer, extra outputs), see glsladvancedPOP.md. Custom attributes via attr sequence — buffer name is Color (capital C), auto-declared (see td-pop-family skill)uName, Samplers sName, Functions CapitalCase(), Locals camelCase, Constants UPPER_SNAKE#define TEX_FEEDBACK 0Creating a glslmultiTOP auto-docks <name>_pixel, <name>_compute, <name>_info and auto-wires
pixeldat to <name>_pixel.
Name the TOP at creation (glsl_<shader>) so the docks inherit the prefix
(glsl_<shader>_pixel, …) and pixeldat is already correct — no rename, no repoint. (Docked refs
snapshot at creation; renaming the TOP later does NOT follow them.)
glsl_<shader>._compute for a pixel shader).<name>_pixel (already wired to pixeldat).<name>_info for compile-error visibility.glslPOP/glslcopyPOP: always write shaders into the auto-docked DATs (<name>_compute, <name>_ptCompute). Never create separate textDATs for POP shaders. Delete unused docked DATs (e.g. _vertCompute, _primCompute if not writing vert/prim shaders).
glslMAT: See td-mat-family skill for docked DAT setup and placement. Use #ifdef TD_VERTEX_SHADER / #ifdef TD_PIXEL_SHADER guards in combined shader DAT. See reference.md for MAT vertex/pixel functions and templates.
Up to 32 uniform vectors via operator parameters (vec0name, vec0valuex, etc.).
TOP/MAT: uniforms are NOT auto-declared. Setting vec0name=uTime does nothing unless the shader has uniform float uTime;. TD infers the type from the GLSL declaration.
Color uniforms → Colors page (TOP/MAT): for a uniform vec4 color, use the Colors sequence (color0name + color0rgbr/g/b + color0alpha) instead of the Vectors page — a 4-component RGBA uniform with a color-picker swatch. Same rule: type is inferred from the GLSL declaration, so declare uniform vec4 uName; or it reads zero. (Samplers live on the Samplers page, fixed arrays on Arrays.)
POP (glslPOP/glslcopyPOP): uniforms ARE auto-declared as float. Do NOT redeclare them — causes "Redeclaration" compile error. Cannot override the type to vec3 etc.; use constants or sampler inputs for multi-component data.
To use N uniforms, first set the sequence block count, then access vec0name, vec1name, etc.
vec vs const Sequencesvec sequence — runtime uniforms, GPU reads value each frame. Use for any parameter that changes at runtime (expressions, custom pars, animated values)const sequence — baked into shader source, triggers full recompilation on every value change. Use ONLY for truly static compile-time constantsconst with expression-driven values recompiles each frame and produces threshold jumps instead of smooth interpolationTDOutputSwizzle() on all color outputs — wrong channel ordering without it#version statement — TD auto-injects ittexture() not texture2D() — old GLSL 1.20 names don't worknonuniformEXT() for dynamically-indexed sampler arrays (Vulkan requirement)TDDeform(TDPos()) — raw TDPos() breaks instancingrgba32float format for data textures — 8-bit clamps to [0,1]resolutionw/resolutionhconstantTOP (clear) → feedbackTOP → glslmultiTOP → nullTOP. feedbackTOP top par must reference the downstream null.
npasses on glslmultiTOP for iterative solversSync the pixel DAT to disk — the fast way to author: edit the .glsl on disk, TD recompiles.
set_dat_content(file_content, file_path, file_type='glsl') call writes the file and sets
file/syncfile. The auto-docked pixel DAT already has language=glsl; a textDAT you create
yourself needs language=glsl set (set_dat_content doesn't set it).code/glsl/<comp>/<subcomp>/<dat_name>.glsl
(e.g. /project1/MyEffect/glsl_raymarch_pixel → code/glsl/MyEffect/glsl_raymarch_pixel.glsl)See the td-dat-family skill for the full canonical flow.
<name>_info for compile errors — .errors() only shows "Compile failed"; read the docked infoDAT for actual line numbers and error detailsme.time.step doesn't exist, use 1.0/me.time.rate or absTime.stepSecondscentroid in GLSL — reserved keyword in GLSL 4.60, use ctr or similarresolution par — use resolutionw/resolutionh + outputresolution='custom' (or 'useinput'). Setting resolution errors with 'td.ParCollection' object has no attribute 'resolution' and halts build_network mid-wayWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
19 skills in this plugin
/td-build-planningPlan TouchDesigner builds — scout networks, decide operators, allocate positions, phase work. Use before any multi-operator build./td-chop-familyBuild CHOP chains for audio, LFOs, animation, and data-driven control. Use when creating CHOPs or driving parameters from CHOPs./td-colabCollaborative mode — you're a thinking partner in TouchDesigner, not a builder. Load when you're sliding into auto-building or need to reset the collaborative frame.npx claudepluginhub touchdesigner/tdmcpskills --plugin tdmcp-skillsOther plugins' skills for the same job