struct C2E2f_Output { 
	float4 color: COLOR;
};


C2E2f_Output main (    float4 oPosition : TEXCOORD0,
float4 iCol : COLOR,
				   uniform sampler2D decal
				   ) 
{



	C2E2f_Output OUT;


float4 oPosition2 = float4(0.3,-0.1,0,0);
float4 oPosition3 = float4(0.6,+0.2,0,0);

float4 oPosition4=oPosition*1.001;
oPosition4.w=oPosition.w;

	float4 cll1=tex2Dproj (decal,oPosition);
    float4 cll2=tex2Dproj (decal,oPosition+oPosition2);
    float4 cll3=tex2Dproj (decal,oPosition-oPosition2);
    float4 cll4=tex2Dproj (decal,oPosition+oPosition3);
    float4 cll5=tex2Dproj (decal,oPosition-oPosition3);
  
/*	float4 cll1=tex2Dproj (decal,oPosition);
    float4 cll2=tex2Dproj (decal,oPosition4);
    float4 cll3=tex2Dproj (decal,oPosition4);
    float4 cll4=tex2Dproj (decal,oPosition4);
    float4 cll5=tex2Dproj (decal,oPosition4);
  */
float fl=0.1;
    OUT.color=iCol*(0.2+0.1*cll2+fl*cll1+fl*cll3+fl*cll4+fl*cll5);




	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;




}
*/