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.

17 lines
401 B

  1. ; STATIC: "TEXTURE2" "0..1"
  2. ps.1.1
  3. def c4, 0.33333f, 0.33333f, 0.33333f, 0.33333f
  4. tex t0 ; base color
  5. tex t1 ; texture 2
  6. mul r0, t0, v0
  7. #if TEXTURE2
  8. mul r0, t1, r0
  9. #endif
  10. mul r1.rgb, r0, r0 ; base * base
  11. lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
  12. dp3 r1.rgb, r0, c4 ; color greyscaled
  13. lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
  14. mul r0.rgb, r0, c3 ; tint