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 ;mul r1, t2, c1 ; specular shininess ;mul r0, r1, t1.a ; specular lighting ;add r1, r0, t1 ; add in spec to bumped diffuse mov r1, t1 ;mov r0, t2 ; test just spec only mul r0, t0, r1 ; diffuse texture times lighting mul r1.a, t1.a, c1.a ; test the bumpmap ;mov r0.rgb, t0.rgb xfc r0_sat, c2_sat, zero_sat, zero_sat, zero_sat, zero_sat, 1-r1.a ; no extra final combiner