xps.1.1 ; c0 - bumplight color ; c1 - specular shininess ; c2 - material color and alpha tex t0 tex t1 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 mov r1, t1 mul r0, t0, r1 ; diffuse texture times lighting mul r1.a, t1.a, c0.a ; test the bumpmap ;mov r0.rgb, t0.rgb xfc zero_sat, zero_sat, r0_sat, zero_sat, zero_sat, zero_sat, 1-r1.a ; no extra final combiner