Skip to content

Instantly share code, notes, and snippets.

@raganmd
Created March 22, 2018 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raganmd/b1c313e57ece3d052e28c694807f9d70 to your computer and use it in GitHub Desktop.
Save raganmd/b1c313e57ece3d052e28c694807f9d70 to your computer and use it in GitHub Desktop.
// TouchDesigner frag shader
// struct and data from our vertex shader
in VS_OUT{
vec4 position;
vec3 normal;
vec4 color;
vec2 uv;
} fs_in;
// color buffer assignments
layout (location = 0) out vec4 o_position;
layout (location = 1) out vec4 o_normal;
layout (location = 2) out vec4 o_color;
layout (location = 3) out vec4 o_uv;
void main(){
o_position = fs_in.position;
o_normal = vec4( fs_in.normal, 1.0 );
o_color = fs_in.color;
o_uv = vec4( fs_in.uv, 0.0, 1.0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment