Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// 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