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.

47 lines
1.0 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. // STATIC: "X360APPCHOOSER" "0..1" [= 0]
  3. #include "common_vs_fxc.h"
  4. struct VS_INPUT
  5. {
  6. float3 vPos : POSITION;
  7. float2 vBaseTexCoord : TEXCOORD0;
  8. #if X360APPCHOOSER
  9. float4 vColor : COLOR0;
  10. #endif
  11. };
  12. struct VS_OUTPUT
  13. {
  14. float4 projPos : POSITION;
  15. float2 baseTexCoord : TEXCOORD0;
  16. float2 ZeroTexCoord : TEXCOORD1;
  17. float2 bloomTexCoord : TEXCOORD2;
  18. #if X360APPCHOOSER
  19. float4 vColor : TEXCOORD3;
  20. #endif
  21. };
  22. float4 Texel_Sizes : register (SHADER_SPECIFIC_CONST_0);
  23. VS_OUTPUT main( const VS_INPUT v )
  24. {
  25. VS_OUTPUT o = ( VS_OUTPUT )0;
  26. o.projPos = float4( v.vPos, 1.0f );
  27. o.baseTexCoord = v.vBaseTexCoord;
  28. o.ZeroTexCoord=float2(0,0);
  29. o.bloomTexCoord.x=v.vBaseTexCoord.x+Texel_Sizes.z;
  30. o.bloomTexCoord.y=v.vBaseTexCoord.y+Texel_Sizes.w;
  31. #if X360APPCHOOSER
  32. o.vColor.rgba = v.vColor.rgba;
  33. o.projPos.xyzw = mul( float4( v.vPos.xyz, 1.0f ), cModelViewProj );
  34. #endif
  35. return o;
  36. }