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.

24 lines
627 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. // DYNAMIC: "SHOWALPHA" "0..1"
  3. #include "common_ps_fxc.h"
  4. sampler BaseTextureSampler : register( s0 );
  5. struct PS_INPUT
  6. {
  7. float4 projPos : POSITION;
  8. float2 baseTexCoord : TEXCOORD0;
  9. };
  10. float4_color_return_type main( PS_INPUT i ) : COLOR
  11. {
  12. float4 baseColor = tex2D( BaseTextureSampler, i.baseTexCoord );
  13. #if SHOWALPHA
  14. float4 result = float4( baseColor.a, baseColor.a, baseColor.a, 1.0f );
  15. #else
  16. float4 result = float4( baseColor.rgb, 1.0f );
  17. #endif
  18. return FinalOutput( result, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  19. }