
float4x4 worldViewProj,world;
texture bulut,bulut1;
float fogDist;
float4 g_FogColor;


// Color1 Texture samler
sampler2D bulutTextureSampler = sampler_state
{
    Texture = (bulut);
    MIPFILTER = LINEAR;
    MAGFILTER = LINEAR;
    MINFILTER = LINEAR;
};

// Color2 Texture samler
sampler2D bulut1TextureSampler = sampler_state
{
    Texture = (bulut1);
    MIPFILTER = LINEAR;
    MAGFILTER = LINEAR;
    MINFILTER = LINEAR;
};







//Application to vertex shader
struct A2V
{ 
    float4 position : POSITION0;
    float2 texCoord : TEXCOORD0;
float fogFactor : FOG;

};

//Vertex shader to pixel shader
struct V2P
{
    float4 position  : POSITION0;
    float2 texCoord  : TEXCOORD0;
    float2 texCoord1 : TEXCOORD1;
    float2 texCoord2 : TEXCOORD2;
    float2 texCoord3 : TEXCOORD3;
    float2 texCoord4 : TEXCOORD4;
float fogFactor : FOG;
  
};

//////////////////////////////////////////////////////////////
//Vertex Shader
//////////////////////////////////////////////////////////////
void VS( in A2V IN, out V2P OUT) 
{
    OUT.position  = mul(IN.position, worldViewProj);
    OUT.texCoord  = IN.texCoord;
    OUT.texCoord1 = IN.texCoord;
    OUT.texCoord2 = IN.texCoord;
    OUT.texCoord3 = IN.texCoord;
    OUT.texCoord4 = IN.texCoord;
   



}
float value;
//////////////////////////////////////////////////////////////
//Pixel Shader
//////////////////////////////////////////////////////////////
vector PS( in V2P IN) : COLOR
{

IN.texCoord.x += (IN.texCoord.x*4) + value;
IN.texCoord.y += (IN.texCoord.y*4)- value;


IN.texCoord1.x += (IN.texCoord1.x*2) - value/1.5;
IN.texCoord1.y += (IN.texCoord1.y*2) -value;


float3 c0 = tex2D(bulutTextureSampler, IN.texCoord).rgb;
	float3 c1 = tex2D(bulut1TextureSampler, IN.texCoord1).rgb;
	float3 blue = float3(0.0f, 0.0f, 0.01f);
    return float4((c0/cos(value*2))-1+value*1.5+c1*value*1.5+blue,0.1f);

}

//////////////////////////////////////////////////////////////
//Techniques
//////////////////////////////////////////////////////////////
technique TexBlend
{
    pass p0
    {
lighting = true;
       vertexshader = compile vs_2_0 VS();
        pixelshader = compile ps_2_0 PS();
    }
}