- The vertex processor operates on a stream of vertices, and the fragment processor operates on a stream of fragments.
- The vertex program is executed once for each vertex, and the fragment program is executed once for each fragment.
- varying input :
+ For example, the varying inputs to a vertex program are the per-vertex values that are specified in vertex arrays. For a fragment program, the varying inputs are the interpolants, such as texture coordinates.
- uniform input :
+ Uniform inputs are used for values that are specified separately from the main stream of input data, and dont change with each stream element.
- In a fixed-function graphics pipeline, the set of possible per-vertex inputs is small and predefined. This predefined set of inputs is exposed to the application through the graphics API. For example, OpenGL 1.4 provides the ability to specify a vertex array of normal vectors
- L'utilisateur peut configurer les données des vertex spécialement, et y ajouter n'importe quoi.
+ Binding semantics implicitly specify the mapping of varying inputs to particular hardware registers
- on peut spécifier directement les binding semantics dans la fonction en tant que paramètres
- The following binding semantics are available in all Cg vertex profiles for output from vertex programs:
+ POSITION, PSIZE, FOG, COLOR0COLOR1, and TEXCOORD0TEXCOORD7.
- Some fragment profiles also support the DEPTH output semantic, which allows the depth value of the fragment to be modified, and some support additional color outputs for hardware that supports multiple render targets (MRTs)