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.
Give usage examples on board.
float3 vec = float3(1, 1, 0);
float3 position = mul(modelViewProjMatrix,
input.position).xyz;
float4x4 matrix;
matrix.m_33;
Swizzling
Can return color output (different from
previous vertex program).
The program procedurally generates a sin wave
w.r.t. x.
Position and normal values interpolated from
vertices…
Can capture specular highlight within triangle
this way…