From the Cg tutorial the following vertex and fragment programs for per-fragment shading are defined as:
void C5E2v_fragmentLighting(float4 position : POSITION,
float3 normal : NORMAL,
out float4 oPosition : POSITION,
out float3 objectPos : TEXCOORD0,
out float3 oNormal : TEXCOORD1,
uniform float4x4 modelViewProj)
As can be seen it read from the two registers POSITION and NORMAL. At the end of the program it writes to the three registers POSITION, TEXCOORD0 and TEXCOORD1. But the following fragmentprogram only read from last two registers:
TEXCOORD0,
TEXCOORD1
as can be seen below:
void C5E3f_basicLight(float4 position : TEXCOORD0,
float3 normal : TEXCOORD1,
out float4 color : COLOR,
...
Why does the vertex program write to a register (POSITION) that the following fragment program does not read from?