struct C2E2f_Output { 
	float4 color: COLOR;
};



C2E2f_Output main (    float2 oPosition : TEXCOORD0,
	uniform sampler2D decal,			   
uniform sampler2D decal2,
//float4 cl : COLOR
//float4 HCOL2 : COLOR0
 uniform float3 alpha,
 uniform float3 alpha2,
 uniform float alpha3
 ) 
{


	C2E2f_Output OUT;

float4 cl2=tex2D (decal2,0.1+0.8*oPosition)-float4 (0.3,0.2,0.2,0.2);
//float4 cl3=tex2D (decal,oPosition2);


OUT.color=0.25*tex2D (decal,oPosition*(1-1*alpha3)+cl2*alpha3);
//+float4 (alpha3,0,0,0);


//OUT.color=0.23*tex2D (decal,oPosition)-(tex2D (decal,oPosition+float2 (0.008,0))-3*tex2D (decal,oPosition))*0.23;
//OUT.color=float4 (alpha3,0,0,0);
//OUT.color=cl*0.24+0.1*cl2+float4 (alpha3,0,0,0);
//OUT.color=float3 (1,0,0);

//OUT.color=tex2D(decal2,oPosition);

//tex2D (decal2,oPosition);;



//OUT.color=0.4+noise (oPosition.x*1000);

/*
OUT.color.z=cl.x/11.9f;
OUT.color.y=cl.y/11.9f;
OUT.color.x=cl.z/11.9f;

*/


return OUT;




}









































/* 


  FRAGMENT ENV MAP 



  struct C2E2f_Output { 
	float4 color: COLOR;
};


C2E2f_Output main (    float2 oPosition : TEXCOORD0,
    float2 oPosition2 : TEXCOORD1,
	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 (decal2,oPosition);

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

oPosition2.x+=dx*1;
oPosition2.y+=dy*1;


  OUT.color=tex2D (decal,oPosition2);




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


	return OUT;




}
*/