Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
785 B

  1. ps.1.1
  2. ; base texture
  3. tex t0
  4. ; normalmap
  5. tex t1
  6. ; rgb - tangent space light direction for first light
  7. texcoord t2
  8. ; rgb - tangent space light direction for second light
  9. texcoord t3
  10. ; v0.rgb : ambient color
  11. ; c5 : light 1 color
  12. ; c6 : light 2 color
  13. ; first local light
  14. dp3_sat r0.rgb, t1_bx2, t2_bx2 ; n dot l
  15. +mov r0.a, t0.a ; Get the output color alpha from the base texture
  16. mad r0.rgb, c5, r0, v0 ; mult by light color add add ambient color
  17. ; second local light
  18. dp3_sat r1, t1_bx2, t3_bx2 ; n dot l
  19. mad r0.rgb, c6, r1, r0 ; mult by light color and add first local light
  20. ; c1 = A
  21. ; c2 = B
  22. ; c3 = C
  23. ; D = 0
  24. ;mad_x2 r1.rgb, c1, r0, c2
  25. ;mad_x2 r1.rgb, r1, r0, c3
  26. ;mul_x4 r0.rgb, r1, r0
  27. ;mul_x2 r0.rgb, r0, t0 ; mult by texture and overbright
  28. mov_x2 r0.rgb, r0