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.

28 lines
538 B

  1. #include "common_vs_fxc.h"
  2. struct VS_INPUT
  3. {
  4. float2 vSrcCoord : TEXCOORD0;
  5. float4 vMorphWeights : TEXCOORD1;
  6. };
  7. struct VS_OUTPUT
  8. {
  9. float4 vDestCoord : POSITION;
  10. float4 vMorphWeights : TEXCOORD0;
  11. };
  12. VS_OUTPUT main( const VS_INPUT v )
  13. {
  14. VS_OUTPUT o = ( VS_OUTPUT )0;
  15. // FIXME: Want these to be in pixel centers!
  16. float2 projSpace = v.vSrcCoord.xy;
  17. projSpace *= 2.0f;
  18. projSpace -= 1.0f;
  19. projSpace.y *= -1.0f;
  20. o.vDestCoord = float4( projSpace.x, projSpace.y, 0.0f, 1.0f );
  21. o.vMorphWeights = v.vMorphWeights;
  22. return o;
  23. }