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.

35 lines
1.1 KiB

  1. // STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC]
  2. // STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX]
  3. #define HDRTYPE HDR_TYPE_NONE
  4. #include "common_ps_fxc.h"
  5. sampler TexSampler0 : register( s0 );
  6. sampler TexSampler1 : register( s1 );
  7. sampler TexSampler2 : register( s2 );
  8. sampler TexSampler3 : register( s3 );
  9. sampler TexSampler4 : register( s4 );
  10. struct PS_INPUT
  11. {
  12. float2 texCoord : TEXCOORD0;
  13. };
  14. const float4 weights : register( c0 );
  15. float4 main( PS_INPUT i ) : COLOR
  16. {
  17. // Just sample the four input textures
  18. float4 sample0 = tex2D( TexSampler0, i.texCoord );
  19. float4 sample1 = tex2D( TexSampler1, i.texCoord );
  20. float4 sample2 = tex2D( TexSampler2, i.texCoord );
  21. float4 sample3 = tex2D( TexSampler3, i.texCoord );
  22. float4 sample4 = tex2D( TexSampler4, i.texCoord );
  23. // Compute weighted average and return
  24. return FinalOutput( weights.x * sample0 +
  25. weights.x * sample1 +
  26. weights.x * sample2 +
  27. weights.x * sample3 +
  28. weights.y * sample4, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  29. }