Paste Code
Paste Blends
Paste Images
sampler s0 : register(s0);

float4 main(float2 tex : TEXCOORD0) : COLOR
{


float value = float(0.5);

float4 lift = float4(value,value,value,1);
float4 gamma = float4(1,1,1,1);
float4 gain = float4(1,1,1,1);
gamma = float4(1,1,1,1) / gamma;

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


//compute Lift
if (tex.x < 0.33){
output = pow((gain * (input + lift * (float4(1,1,1,1) - input))),gamma);

//compute CDL
}else if(tex.x > 0.33 && tex.x<0.66 ){

output = pow((input*gain)+lift,gamma);

//Draw original
}else{
output = tex2D(s0,tex);
}

return output;

}
  1. sampler s0 : register(s0);
  2.  
  3. float4 main(float2 tex : TEXCOORD0) : COLOR
  4. {
  5.  
  6.  
  7.         float value = float(0.5);
  8.  
  9.         float4 lift = float4(value,value,value,1);
  10.         float4 gamma = float4(1,1,1,1);
  11.         float4 gain = float4(1,1,1,1);
  12.         gamma = float4(1,1,1,1) / gamma;
  13.        
  14.         float4 input = tex2D(s0,tex);
  15.         float4 output = float4(1,1,1,1);
  16.  
  17.  
  18.         //compute Lift
  19.         if (tex.x < 0.33){
  20.                 output = pow((gain * (input + lift * (float4(1,1,1,1) - input))),gamma);
  21.        
  22.         //compute CDL
  23.         }else if(tex.x > 0.33 && tex.x<0.66 ){
  24.  
  25.                 output = pow((input*gain)+lift,gamma);
  26.        
  27.         //Draw original
  28.         }else{
  29.                 output = tex2D(s0,tex);
  30.         }
  31.        
  32.         return output;
  33.  
  34. }
  35.  
go to heaven