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.

40 lines
1.2 KiB

  1. vs.1.1
  2. # STATIC: "HALF_LAMBERT" "0..1"
  3. # DYNAMIC: "DOWATERFOG" "0..1"
  4. # DYNAMIC: "LIGHT_COMBO" "0..21"
  5. # DYNAMIC: "SKINNING" "0..1"
  6. #include "macros.vsh"
  7. ;------------------------------------------------------------------------------
  8. ; Vertex blending
  9. ;------------------------------------------------------------------------------
  10. &AllocateRegister( \$worldPos );
  11. &AllocateRegister( \$worldNormal );
  12. &SkinPositionAndNormal( $worldPos, $worldNormal );
  13. ;------------------------------------------------------------------------------
  14. ; Transform the position from model to proj
  15. ;------------------------------------------------------------------------------
  16. &AllocateRegister( \$projPos );
  17. dp4 $projPos.x, $worldPos, $cViewProj0
  18. dp4 $projPos.y, $worldPos, $cViewProj1
  19. dp4 $projPos.z, $worldPos, $cViewProj2
  20. dp4 $projPos.w, $worldPos, $cViewProj3
  21. mov oPos, $projPos
  22. &CalcFog( $worldPos, $projPos );
  23. &FreeRegister( \$projPos );
  24. ;------------------------------------------------------------------------------
  25. ; Lighting
  26. ;------------------------------------------------------------------------------
  27. &DoLighting( $worldPos, $worldNormal );
  28. &FreeRegister( \$worldPos );
  29. &FreeRegister( \$worldNormal );