Binding Semantics
¡Predefined “names”
¡POSITION, NORMAL, etc.
¡
struct VertexInput {
float4 position : POSITION;
float3 normal   : NORMAL;
}
void NormalShade(VertexInput input,
out float4 outPosition : POSITION,
out float3 outColor    : COLOR,
    const uniform float4x4 modelViewProjMatrix) {
outPosition = mul(modelViewProjMatrix, input.position);
outColor = abs(input.normal);
}
The input bound to NORMAL corresponds to the value passed into glNormal3f().
Similary, the input/output bound to COLOR corresponds to the value passed into glColor3f().
Information on how to pass information from OpenGL to CG later.
How normal and position are different and are transformed differently too.