struct C2E2f_Output { 
	float4 color: COLOR;
};


C2E2f_Output main (    
				   
		float2 oPosition : TEXCOORD0,
		float2 oPosition2 : TEXCOORD1,
            
        uniform sampler2D decal2,		   
        uniform sampler2D decala			   
				   ) 
{



	C2E2f_Output OUT;

float4 cl;
float cl2;


float x=0;
//cl=tex2D (decal2,oPosition,x,0);
//cl=pow(cl,16);

//float3 g (0,0,0);

float2 oPosition3;
float dd=tex2D (decal2,oPosition2);
//dd=pow(dd,15);
dd=pow (dd,13)*1-0.5;
//dd=oPosition.x;
float2 fDerx = float2 (0.013,0.0)*dd;
//float2 fDery = float2 (0,0.013)*dd;


cl=tex2D (decala,oPosition2,fDerx,fDerx);

//cl=tex2D (decala,oPosition2,fDerx,fDery);




//  cl=cl;




  OUT.color=cl;

	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;




}
*/