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.

30 lines
586 B

  1. // DYNAMIC: "COMPRESSED_VERTS" "0..1"
  2. #include "common_vs_fxc.h"
  3. struct VS_INPUT
  4. {
  5. float4 vPos : POSITION;
  6. float4 vTexCoord0 : TEXCOORD0;
  7. };
  8. struct VS_OUTPUT
  9. {
  10. float4 vProjPos : POSITION;
  11. float2 vUv0 : TEXCOORD0;
  12. };
  13. VS_OUTPUT main( const VS_INPUT i )
  14. {
  15. VS_OUTPUT o;
  16. o.vProjPos.xyzw = mul( i.vPos.xyzw, cModelViewProj );
  17. o.vUv0.xy = i.vTexCoord0.xy;
  18. #ifdef _PS3
  19. // Account for OpenGL's flipped y coordinate and expanded z range [-1,1] instead of [0,1]
  20. o.vProjPos.y = -o.vProjPos.y;
  21. o.vProjPos.z = 2.0f * o.vProjPos.z - o.vProjPos.w;
  22. #endif // _PS3
  23. return o;
  24. }