!!ARBvp1.0
OPTION ARB_position_invariant;
ATTRIB iN = vertex.normal;
PARAM mvit[4] = {state.matrix.modelview.invtrans};
OUTPUT oN = result.texcoord[7];
DP4 oN.x, mvit[0], iN;
DP4 oN.y, mvit[1], iN;
DP4 oN.z, mvit[2], iN;
MOV result.color, vertex.color;
END
!!ARBfp1.0
ATTRIB iP = fragment.position;
ATTRIB iC = fragment.color;
ATTRIB iN = fragment.texcoord[7];
PARAM amb = {0.5, 0.3, 0.036, 1.0};
PARAM l0pos = state.light[0].position;
TEMP toL, tmpC, n1;
OUTPUT oC = result.color;
ADD toL, l0pos, -iP;
DP3 toL.w, toL, toL;
RSQ toL.w, toL.w;
DP3 n1.w, iN, iN;
RSQ n1.w, n1.w;
MUL n1.xyz, n1.w, iN;
MUL toL.xyz, toL.w, toL;
DP3_SAT tmpC, toL, n1;
MAD tmpC, tmpC, iC, amb;
MOV tmpC.w, 1;
MOV oC, tmpC;
END
Per-pixel Lambert diffuse with ambient (ARBvp1.0 & ARBfp1.0). Works on Intel GMA945