struct C2E2f_Output { 
	float3 color: COLOR;
};



C2E2f_Output main (    float2 oPosition : TEXCOORD0,
uniform float3 res, 	
uniform sampler2D decal,
	uniform sampler2D decal2,
	uniform sampler2D decal3
	   
	 ) 
{


	C2E2f_Output OUT;




//OUT.color=(1.3*cll)*float3 (tex2D (decal3,pz).x,tex2D (decal3,pz2).x,tex2D (decal3,pz3).x);
float2 oPosition3=oPosition;
//oPosition+=tex2D(decal3,oPosition).xy*0.7;
//float3 Decc=tex2D (decal3,oPosition);
//oPosition3.xy+=pow((Decc.xy),4)*35.5*((oPosition.xy)-float2 (9,9));

float3 noise=(0.0+pow(0.08+tex2D(decal2,oPosition),145));
oPosition-=noise*0.001;
//*10.0*(tex2D(decal3,oPosition3));


noise.xyz=noise.xxx;
//float3 noise2=(0.3+pow(0.4+tex2D(decal2,oPosition),9));
//noise=tex2D (decal2,oPosition3);

OUT.color=tex2D (decal,oPosition3)
*(noise+0.0+(0.37*tex2D (decal3,oPosition*3+float2 (0.1,0.1))*1));
//OUT.color=tex2D (decal,oPosition3);
//OUT.color=tex2D (decal2,oPosition3);

//OUT.color=tex2D (decal,oPosition3)*tex2D(decal2,oPosition3);
//OUT.color=tex2D(decal2,oPosition3)*tex2D(decal,oPosition3);
noise=1-noise;
float3 cll=tex2D (decal,oPosition3);

if (length(cll)<1.499)
OUT.color=tex2D (decal,oPosition3);
else
OUT.color=tex2D(decal2,oPosition3);



OUT.color=tex2D(decal,oPosition3)*
pow(tex2D(decal2,oPosition3),6);
//*tex2D(decal,oPosition3)*tex2D(decal2,oPosition3);
//OUT.color=noise;
//+(1-tex2D(decal,oPosition3))).yyyy;
//OUT.color.x+=tex2D(decal,oPosition3).x;


//tex2D(decal2,oPosition3)*0.1;

//OUT.color*=max (0,min (1,1-(tex2D(decal,oPosition3+float2 (0.01,0))-tex2D (decal,oPosition3))));
//*tex2D(decal,oPosition3);

//*tex2D (decal,oPosition);

//OUT.color=float3 (tex2D (decal3,pz).x,tex2D (decal3,pz2).x,tex2D (decal3,pz3).x);


	return OUT;




}
