/*
texture tex0;
texture tex1;

technique tec0
{
    pass p0
    {
       Lighting = true;
	SpecularEnable = true;
        MaterialAmbient = {0.5, 0.5, 0.5, 1.0}; 
        MaterialDiffuse = {1.0, 1.0, 1.0, 1.0}; 
        MaterialSpecular = {1, 1, 1, 1}; 
        MaterialPower = 40.0f;
 	DiffuseMaterialSource = material;	
      
	TexCoordIndex[0] = 0;
        // Set up texture stage 0
	Texture[0] = <tex0>;
        ColorOp[0] = Modulate;
        AlphaOp[0] = SelectArg1;
        
		TexCoordIndex[1] = 0;
        // Set up texture stage 0
		Texture[1] = <tex1>;
        ColorOp[1] = modulate;
        ColorArg1[1] = Texture;
        ColorArg2[1] = current;
        AlphaOp[1] = disable;
 		
        Texcoordindex[1] = CAMERASPACEREFLECTIONVECTOR;
        Texturetransformflags[1] = count3;
        
    }
    pass p1
    {
 //	SpecularEnable = false;
 	TexCoordIndex[0] = 0;
	Texture[0] = <tex0>;
     ColorOp[0] = BLENDCURRENTALPHA;
	ColorArg2[0] = Current;
	ColorArg1[0] = Texture;
	AlphaArg1[0] = Texture;
        AlphaOp[0] = SelectArg1;
//        AlphaOp[1] = Disable;
 		alphablendenable = true;
	DestBlend = INVSRCALPHA;
	SrcBlend = SRCALPHA;
        ColorOp[1] = disable;
        AlphaOp[1] = disable;
    
    }
}

*/
texture tex0;
texture tex1;

technique tec0
{
    pass p0
    {
       Lighting = true;
	SpecularEnable = true;
        MaterialAmbient = {0.3, 0.3, 0.3, 1.0}; 
        MaterialDiffuse = {1.0, 1.0, 1.0, 1.0}; 
        MaterialSpecular = {1, 1, 1, 1}; 
        MaterialPower = 40.0f;
 	DiffuseMaterialSource = material;	
 	// Turn lighting on and use light 0
      Lighting = true;
	SpecularEnable = true;
        
	TexCoordIndex[0] = 0;
        // Set up texture stage 0
	Texture[0] = <tex0>;
        ColorOp[0] = Modulate;
        AlphaOp[0] = SelectArg1;
        
        // Disable texture stage 1
	TexCoordIndex[1] = 0;
	Texture[1] = <tex0>;
        ColorOp[1] = BLENDCURRENTALPHA;
//        ColorOp[1] = SelectArg1;
	ColorArg2[1] = Current;
	ColorArg1[1] = Texture;
	AlphaArg1[1] = Texture;
        AlphaOp[1] = SelectArg1;
//        AlphaOp[1] = Disable;
//	MIPFILTER[0] = NONE;
    }
    pass p1
    {
 //	SpecularEnable = false;
       
		TexCoordIndex[0] = 0;
        // Set up texture stage 0
		Texture[0] = <tex1>;
        ColorOp[0] = modulate;
        ColorArg1[0] = Texture;
        ColorArg2[0] = current;
        AlphaOp[0] = SelectArg1;
        AlphaArg1[0] = tfactor;
        AlphaArg2[0] = Current;
        TextureFactor = 0x55505050;
		
		alphablendenable = true;
	DestBlend = INVSRCALPHA;
	SrcBlend = SRCALPHA;
        Texcoordindex[0] = CAMERASPACEREFLECTIONVECTOR;
        Texturetransformflags[0] = count3;
        
        ColorOp[1] = Disable;
       AlphaOp[1] = Disable;
    }
}
