xps.1.1 ; c0 - bumplight color ; c1 - specular shininess ; c2 - material color and alpha tex t0 tex t1 tex t2 dp3 r1, t0_bx2, v0_bx2 ; dot product of vertex light vector and normal map mad t0, r1_sat, c0, v1 ; mul by the light color adding the rest of the lights add r1, t1, t2 ;mov r1, t2 ;mul r0, t0, r1 ; diffuse texture times lighting mul r1.a, t1.a, c0.a xfc 1-fog.a, fog, prod, zero, t0, t1, 1-r1.a ; no extra final combiner