
  struct C2E2f_Output { 
	float4 color: COLOR;
};


C2E2f_Output main (    float2 oPosition : TEXCOORD0,
    float2 oPosition2 : TEXCOORD1,
	    float4 OUTc : COLOR,
	uniform sampler2D decal,			   
	uniform sampler2D decal2					   
				   ) 
{



	C2E2f_Output OUT;

//float fc=1;
//fc=position.x;
	//float2 norm;
	//norm.x=oNormal.x;
	//norm.y=oNormal.y;

OUT.color=tex2D (decal,oPosition);

float dx=ddx(OUT.color);
float dy=ddy(OUT.color);

oPosition2-=float4(dx*2,dy*2,0,0);
oPosition2=saturate(oPosition2);
//oPosition2.y=saturate(oPosition2.y);
//oPosition2=saturate (oPosition2); 

// OUT.color=lerp (tex2D (decal,oPosition),tex2D (decal2,oPosition2),OUTc);
//OUT.color=0.4*tex2D (decal,oPosition)+1.8*tex2D (decal2,oPosition2)*OUTc;
OUT.color+=1.8*tex2D (decal2,oPosition2)*OUTc;

//OUT.color=tex2D (decal2,oPosition);
//OUT.color.x=
//OUT.color=tex2D (decal,oPosition2)*OUTc;

//OUT.color=round(100*OUT.color)/100.0f;


  
  
  //OUT.color.y=0;
//OUT.color.z=0;
//  OUT.color-=tex2D (decal,oPosition2);


	return OUT;




}
