struct C2E2f_Output { 
	float4 color: COLOR;
};


C2E2f_Output main (    float4 oPosition : TEXCOORD1,
                      float2 oUV : TEXCOORD0,
                      float4 HCOL : COLOR, 
                      
	float4 HCOL2 : COLOR1,
                      
                      float3 oLight : TEXCOORD2,
                      float3 oHalf : TEXCOORD4,
                      float2 uvl : TEXCOORD5,
                      float3 oNormal : TEXCOORD3,



                    uniform float3 alpha,  
                    uniform float alpha2,  
                   uniform sampler2D decal,
				   uniform sampler2D light,
                //   uniform samplerCUBE cube,
				   uniform sampler2D texture,
                   uniform sampler1D oned,
				   uniform sampler2D texture2
//                   uniform samplerCUBE cube
//                   uniform sampler2D cubes
//uniform float3 lightPosition

                   ) 
{



	C2E2f_Output OUT;



//oPosition.w+=0.003*maxx;
//oPosition+=float4 (maxx,0,0,0);


float4 cll1=tex2Dproj (decal,oPosition);
float4 cll2=tex2Dproj (light,oPosition);
/*
oPosition.x+=0.5;
cll1+=tex2Dproj (decal,oPosition);
oPosition.x+=0.5;
cll1+=tex2Dproj (decal,oPosition);

*/

OUT.color=(HCOL2)*(0.65+0.65*cll1)+cll2*0.1;
OUT.color=0.1+(1-1*cll1)*0.2
;
OUT.color=(HCOL2)*2.1
*(alpha2+1.25-cll1);

//OUT.color=cll1*0.2;

//OUT.color=cll1;
//OUT.color=(HCOL2)*cll2;
//OUT.color=cll1;
//OUT.color=
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;




}
*/