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.

35 lines
1.2 KiB

  1. vs.1.1
  2. # DYNAMIC: "DOWATERFOG" "0..1"
  3. # DYNAMIC: "SKINNING" "0..1"
  4. ;------------------------------------------------------------------------------
  5. ; Constants specified by the app
  6. ; c0 = (0, 1, 2, 0.5)
  7. ; c1 = (1/2.2, 3, 255, overbright factor)
  8. ; c2 = camera position *in world space*
  9. ; c4-c7 = modelViewProj matrix (transpose)
  10. ; c8-c11 = ViewProj matrix (transpose)
  11. ; c12-c15 = model->view matrix (transpose)
  12. ; c16 = [fogStart, fogEnd, fogRange, 1.0/fogRange]
  13. ; $SHADER_SPECIFIC_CONST_0-$SHADER_SPECIFIC_CONST_1 = Base texture transform
  14. ; $SHADER_SPECIFIC_CONST_2-$SHADER_SPECIFIC_CONST_3 = Mask texture transform
  15. ;------------------------------------------------------------------------------
  16. #include "macros.vsh"
  17. ;------------------------------------------------------------------------------
  18. ; Vertex blending
  19. ;------------------------------------------------------------------------------
  20. &AllocateRegister( \$worldPos );
  21. &SkinPosition( $worldPos );
  22. ; Transform the position from world to view space
  23. dp4 oPos.x, $worldPos, $cViewProj0
  24. dp4 oPos.y, $worldPos, $cViewProj1
  25. dp4 oPos.z, $worldPos, $cViewProj2
  26. dp4 oPos.w, $worldPos, $cViewProj3
  27. &FreeRegister( \$worldPos );