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.

33 lines
983 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. #include "common_ps_fxc.h"
  3. sampler TexSampler0 : register( s0 );
  4. sampler TexSampler1 : register( s1 );
  5. sampler TexSampler2 : register( s2 );
  6. sampler TexSampler3 : register( s3 );
  7. sampler TexSampler4 : register( s4 );
  8. struct PS_INPUT
  9. {
  10. float2 texCoord : TEXCOORD0;
  11. };
  12. const float4 weights : register( c0 );
  13. float4 main( PS_INPUT i ) : COLOR
  14. {
  15. // Just sample the four input textures
  16. float4 sample0 = tex2D( TexSampler0, i.texCoord );
  17. float4 sample1 = tex2D( TexSampler1, i.texCoord );
  18. float4 sample2 = tex2D( TexSampler2, i.texCoord );
  19. float4 sample3 = tex2D( TexSampler3, i.texCoord );
  20. float4 sample4 = tex2D( TexSampler4, i.texCoord );
  21. // Compute weighted average and return
  22. return FinalOutput( weights.x * sample0 +
  23. weights.x * sample1 +
  24. weights.x * sample2 +
  25. weights.x * sample3 +
  26. weights.y * sample4, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
  27. }