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.

35 lines
1019 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. // Includes =======================================================================================
  3. #include "common_vs_fxc.h"
  4. // Input values ===================================================================================
  5. struct VS_INPUT
  6. {
  7. float3 vPos : POSITION;
  8. float2 vBaseTexCoord : TEXCOORD0;
  9. };
  10. // Interpolated values ============================================================================
  11. struct VS_OUTPUT
  12. {
  13. float4 projPos : POSITION;
  14. float2 vUv0 : TEXCOORD0;
  15. };
  16. // Main ===========================================================================================
  17. VS_OUTPUT main( const VS_INPUT i )
  18. {
  19. VS_OUTPUT o;
  20. o.projPos.xyzw = float4( i.vPos.xyz, 1.0f );
  21. o.vUv0.xy = i.vBaseTexCoord.xy;
  22. #ifdef _PS3
  23. // Account for OpenGL's flipped y coordinate and expanded z range [-1,1] instead of [0,1]
  24. o.projPos.y = -o.projPos.y;
  25. o.projPos.z = 2.0f * o.projPos.z - o.projPos.w;
  26. #endif // _PS3
  27. return o;
  28. }