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.

24 lines
528 B

  1. ps.1.1
  2. ; t0:
  3. ; texture: dudv map
  4. ; texcoords: dudvmap texcoords
  5. ; t1:
  6. ; texture: refraction render target
  7. ; texcoords:
  8. tex t0 ; sample dudv map
  9. texbem t1, t0 ; refraction
  10. tex t2 ; The normal map
  11. tex t3 ; Normalize the tangent-space vector to the eye
  12. ; dot eye-vector with per-pixel normal from t2
  13. dp3_sat r1.rgba, t2_bx2, t3_bx2
  14. mul r0.a, 1-r1.a, 1-r1.a ; squared
  15. mul r0.a, r0.a, r0.a ; quartic
  16. mul r0.rgb, t1, c0
  17. +mul_sat r0.a, r0.a, 1-r1.a ; quintic
  18. add_sat r0.a, r0.a, v0.a ; cheap water distance