Counter Strike : Global Offensive Source Code
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.

34 lines
1.0 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. &AllocateRegister( \$worldNormal );
  10. &SkinPositionAndNormal( $worldPos, $worldNormal );
  11. ;------------------------------------------------------------------------------
  12. ; Transform the position from world to view space
  13. ;------------------------------------------------------------------------------
  14. &AllocateRegister( \$projPos );
  15. dp4 $projPos.x, $worldPos, $cViewProj0
  16. dp4 $projPos.y, $worldPos, $cViewProj1
  17. dp4 $projPos.z, $worldPos, $cViewProj2
  18. dp4 $projPos.w, $worldPos, $cViewProj3
  19. mov oPos, $projPos
  20. &FreeRegister( \$worldPos );
  21. ; stick the normal in the color channel
  22. mov oD0.xyz, $worldNormal.xyz
  23. mov oD0.w, $cOne ; make sure all components are defined
  24. &FreeRegister( \$projPos );
  25. &FreeRegister( \$worldNormal );