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.

28 lines
541 B

  1. ps.1.4
  2. def c0, 1.0f, 1.0f, 1.0f, 1.0f
  3. def c2, 0.2f, 0.2f, 0.2f, 0.2f
  4. texld r0, t0
  5. texld r1, t1
  6. texld r2, t2
  7. texld r3, t3
  8. texld r4, t4
  9. // The mul has to happen here first because we overflow otherwise
  10. mul r0.r, r0.a, c2.a
  11. mad r0.r, r1.a, c2.a, r0.r
  12. mad r0.r, r2.a, c2.a, r0.r
  13. mad r0.r, r3.a, c2.a, r0.r
  14. mad r0.r, r4.a, c2.a, r0.r
  15. ; To accomplish shadow fading, subtract vertex alpha from texture alpha
  16. ; color channel isn't used...
  17. sub_sat r0.a, r0.r, v0.a
  18. ; Blend between white and the constant color...
  19. lrp r0.rgba, 1-r0.a, c0, c1