!!ARBvp1.0 # Transform from object-space position DP4 result.position.x, state.matrix.mvp.row[0], vertex.position; DP4 result.position.y, state.matrix.mvp.row[1], vertex.position; DP4 result.position.z, state.matrix.mvp.row[2], vertex.position; DP4 result.position.w, state.matrix.mvp.row[3], vertex.position; # Transform surface normal into eye-space DP4 result.texcoord[1].x, state.matrix.modelview.invtrans.row[0], vertex.normal; DP4 result.texcoord[1].y, state.matrix.modelview.invtrans.row[1], vertex.normal; DP4 result.texcoord[1].z, state.matrix.modelview.invtrans.row[2], vertex.normal; # Copy input color so fragment shader can access it MOV result.color, vertex.color; # Copy input texture coordinate so fragment shader can access it MOV result.texcoord, vertex.texcoord; END