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.

22 lines
682 B

  1. ps.1.4
  2. ; premultiplied by .25 so that they fit in [-1,1] and use _x4 to scale back up.
  3. def c0, 0.29103088375, 0.3989486695, 0.0f, -0.217663765
  4. def c1, 0.29103088375, -0.20336914075, -0.09786224375, 0.132426262
  5. def c2, 0.29103088375, 0.0f, 0.5044555665, -0.2704172135
  6. def c3, 1.0f, 0.0f, 0.0f, 1.0f
  7. texld r0, t0 ; Y
  8. texld r1, t1 ; cR
  9. texld r2, t2 ; cB
  10. mov r3.x, r0 ; get Y into x
  11. mov r3.y, r1 ; get cR into y
  12. +mov r3.w, c3.x ; set w to 1 for the 4th component of the dp4
  13. mov r3.z, r2 ; get cB into z
  14. +mov r0.a, c3.a ; set output alpha to one. . .don't really care since we aren't alpha blending.
  15. dp4_x4_sat r0.r, r3, c0
  16. dp4_x4_sat r0.g, r3, c1
  17. dp4_x4_sat r0.b, r3, c2