Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// TouchDesigner vertex shader
// struct and data to fragment shader
out VS_OUT{
vec4 position;
vec3 normal;
vec4 color;
vec2 uv;
} vs_out;
void main(){
// packing data for passthrough to fragment shader
vs_out.position = TDDeform(P);
vs_out.normal = TDDeformNorm(N);
vs_out.color = Cd;
vs_out.uv = uv[0].st;
gl_Position = TDWorldToProj(vs_out.position);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment