xps.1.1 ; c0 - bumplight color ; c1 - specular shininess 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 ; spec fetch times spec level mul r0, r1, t1.a ; specular lighting via mask add r1, r0, t1 ; add in spec to bumped diffuse ;mov r1, r0 ; test just spec only ;mul r0, t0, r1 ; diffuse texture times lighting ;mul r0, t0, t1 ; diffuse texture times lighting ;mov r0.a, t2.a ; set alpha to 1 ;xfc r0_sat, c2_sat, zero_sat, zero_sat, zero_sat, zero_sat, c2_sat.a ; final modulate of tint color and alpha for blending xfc c2_sat, r0_sat, zero_sat, zero_sat, zero_sat, zero_sat, c2_sat.a ; final modulate of tint color and alpha for blending ; test the bumpmap mov r0.rgb, t0.rgb