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.

41 lines
1.3 KiB

  1. vs.1.1
  2. # DYNAMIC: "DOWATERFOG" "0..1"
  3. # DYNAMIC: "SKINNING" "0..1"
  4. #include "macros.vsh"
  5. ;------------------------------------------------------------------------------
  6. ; Vertex blending
  7. ;------------------------------------------------------------------------------
  8. &AllocateRegister( \$worldPos );
  9. &SkinPosition( $worldPos );
  10. ;------------------------------------------------------------------------------
  11. ; Transform the position from world to view space
  12. ;------------------------------------------------------------------------------
  13. &AllocateRegister( \$projPos );
  14. dp4 $projPos.x, $worldPos, $cViewProj0
  15. dp4 $projPos.y, $worldPos, $cViewProj1
  16. dp4 $projPos.z, $worldPos, $cViewProj2
  17. dp4 $projPos.w, $worldPos, $cViewProj3
  18. mov oPos, $projPos
  19. ;------------------------------------------------------------------------------
  20. ; Fog
  21. ;------------------------------------------------------------------------------
  22. &CalcFog( $worldPos, $projPos );
  23. &FreeRegister( \$projPos );
  24. &FreeRegister( \$worldPos );
  25. ;------------------------------------------------------------------------------
  26. ; Texture coordinates
  27. ;------------------------------------------------------------------------------
  28. dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_0
  29. dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_1