‹header›
‹date/time›
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
‹footer›
‹#›
VP20… limited to 128 instructions
96 read only vectors and 12 read-write vectors
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…
Register combiners – fp20 profile.
texutre + arithmetic operations. 4 texture instructions + 8 arithmetic instructions
Do simple complete example on board if time permits