Shader

From TouchDesigner Documentation
Jump to: navigation, search


A Shader is a program held in a Text DAT that is used by a Material Operator, or MAT to define how a 3D surface looks or how a 2D image is processed.

All shaders in TouchDesigner are GLSL shaders.

Materials use TOPs and the GLSL shaders (pixel and vertex shaders) to create materials for 3D geometry.

The most commonly used shader is in the Phong MAT which contains numerous lighting and surface rendering options. The Phong MAT can output the specific GLSL shader code that represents the features being used in the material.

A GLSL TOP uses the GLSL shders for generating images.

See also Write a GLSL Material.

The OpenGL code that creates a rendered image from polygons and textures. Shaders can be made of up to three parts: Vertex Shader, Geometry Shader and/or Pixel Shader, which are either embedded inside Materials, or placed in Text DATs and referenced to a GLSL Material.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.

An Operator Family that associates a shader with a SOP or Geometry Object for rendering textured and lit objects.