struct C2E2f_Output { 
	float4 color: COLOR;
};



C2E2f_Output main (    float2 oPosition : TEXCOORD0,
	uniform sampler2D decal,			   
	uniform sampler2D decal2,
	uniform sampler2D decal3,
    float4 cl :COLOR0
 ) 
{


	C2E2f_Output OUT;


	//float4 cl;

float ccl1;

//1.00-10000*pow (depth.x,16);


//cmm*=0.9;

float2 cll2=tex2D (decal3,oPosition*0.4)*0.01;
float4 cll=tex2D (decal2,oPosition+cll2);

OUT.color=cll*0.9+(cll2*5).xxxx*float4 (0,0.7,2,1);
//OUT.color=tex2D(decal2,oPosition);
//cmm*(1-cmmt*4);

/*
OUT.color.x+=cmmt;
OUT.color.y+=cmmt;
OUT.color.z+=cmmt;
*/
//OUT.color=cmm2*32;
//OUT.color=round(OUT.color*13)/13.0f;
//OUT.color=cmm2*50;
//OUT.color.z=pow(cmm2.x,10)*10000;
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;




}
*/