PasteAll.org
sampler s0 : register(s0);

float4 main(float2 tex : TEXCOORD0) : COLOR
{

float saturation = float(1);

float3 input = tex2D(s0,tex);
float3 output = float3(1 ,1 ,1);

float grayscale = (input.r + input.g + input.g + input.b)/4;
float3 averageColor = float3(grayscale,grayscale,grayscale);

output = ((input - averageColor )*saturation)+averageColor ;

return float4(output,1);
}
  1. sampler s0 : register(s0);
  2.  
  3. float4 main(float2 tex : TEXCOORD0) : COLOR
  4. {
  5.        
  6.         float saturation = float(1);   
  7.        
  8.         float3 input = tex2D(s0,tex);
  9.         float3 output = float3(1 ,1 ,1);
  10.        
  11.         float grayscale = (input.r + input.g + input.g + input.b)/4;
  12.         float3 averageColor = float3(grayscale,grayscale,grayscale);
  13.        
  14.         output = ((input - averageColor )*saturation)+averageColor ;
  15.  
  16.         return float4(output,1);
  17. }
go to heaven