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.

32 lines
546 B

  1. ; STATIC: "DETAIL" "0..1"
  2. ; STATIC: "BLENDMODULATETEXTURE" "0..1"
  3. ps.1.4
  4. def c1, 3.0, -2.0, 0.5, 0.5
  5. texld r0, t0
  6. texld r1, t1
  7. texld r2, t2
  8. #if DETAIL
  9. texld r3, t3 ; detail
  10. #endif
  11. #if BLENDMODULATETEXTURE
  12. texld r4, t4 ; detail
  13. #endif
  14. #if BLEND_MODULATETEXTURE
  15. sub r5.a, v0.a, r4.g
  16. add_sat r5.a, r5.a, c1.a
  17. mad r6.a, c1.g, r5.a, c1.r
  18. mul r6.a, r6.a, r5.a
  19. mul r5.a, r6.a, r5.a
  20. #else
  21. mov_sat r5.a, v0.a
  22. #endif
  23. lrp r0, r5.a, r1, r0
  24. mul r0, r0, r2
  25. #if DETAIL
  26. mul_x2 r0.rgb, r0, r3
  27. #endif
  28. mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)