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.

28 lines
915 B

  1. // STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC]
  2. // STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX]
  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 fogFactorW : COLOR1;
  14. float4 worldPos_projPosZ : TEXCOORD7; // Necessary for pixel fog
  15. #endif
  16. };
  17. HALF4 main( PS_INPUT i ) : COLOR
  18. {
  19. //relevant data is in the alpha channel, modulate vertex alpha by texture alpha
  20. float returnAlpha = tex2D( BaseTextureSampler, i.vTexCoord0 ).a * i.vColor.a;
  21. return FinalOutput( float4( 1.0f, 1.0f, 1.0f, returnAlpha ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  22. }