!!ARBvp1.0

PARAM viewMatrix[4] = { state.matrix.modelview };
PARAM projectionMatrix[4] = { state.matrix.projection };
PARAM one = {1, 1, 1, 1};

TEMP positionWorld;     # Vertex position in world space
TEMP positionView;      # Vertex position in view space

# Transform the position into world space
DP4 positionWorld.x, vertex.position, vertex.texcoord[1];
DP4 positionWorld.y, vertex.position, vertex.texcoord[2];
DP4 positionWorld.z, vertex.position, vertex.texcoord[3];
MOV positionWorld.w, one;

# Transform the position into view space
DP4 positionView.x, positionWorld, viewMatrix[0];
DP4 positionView.y, positionWorld, viewMatrix[1];
DP4 positionView.z, positionWorld, viewMatrix[2];
MOV positionView.w, one;

# Transform the position into screen space
DP4 result.position.x, positionView, projectionMatrix[0];
DP4 result.position.y, positionView, projectionMatrix[1];
DP4 result.position.z, positionView, projectionMatrix[2];
DP4 result.position.w, positionView, projectionMatrix[3];

# Output the color
MOV result.color, vertex.color;

# Output the texture coordinate
MOV result.texcoord, vertex.texcoord;

END
