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.

31 lines
946 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. //paired with "unlitgeneric_vs20"
  3. #include "common_ps_fxc.h"
  4. sampler BaseTextureSampler : register( s0 );
  5. struct PS_INPUT
  6. {
  7. float2 vTexCoord0 : TEXCOORD0;
  8. float4 vColor : COLOR0;
  9. #if defined( _X360 ) //matching pixel shader inputs to vertex shader outputs to avoid shader patches
  10. float2 vTexCoord1 : TEXCOORD1;
  11. float2 vTexCoord2 : TEXCOORD2;
  12. float2 vTexCoord3 : TEXCOORD3;
  13. float4 worldPos_projPosZ : TEXCOORD7; // Necessary for pixel fog
  14. #endif
  15. };
  16. #ifdef _PS3
  17. float4_color_return_type main( PS_INPUT i ) : COLOR
  18. #else // _PS3
  19. HALF4 main( PS_INPUT i ) : COLOR
  20. #endif // !_PS3
  21. {
  22. //relevant data is in the alpha channel, modulate vertex alpha by texture alpha
  23. float returnAlpha = tex2D( BaseTextureSampler, i.vTexCoord0 ).a * i.vColor.a;
  24. return FinalOutput( float4( 1.0f, 1.0f, 1.0f, returnAlpha ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  25. }