float4x4 Proj;
float4x4 View;
float4x4 World;


struct VS_INPUT
{
    float4 Position   : POSITION;
    float2 TexCoord    : TEXCOORD0;
};


struct VS_OUTPUT
{
    float4 Position   : POSITION;
    float2 TexCoord    : TEXCOORD0;
};


VS_OUTPUT vs_main( in VS_INPUT In )
{
    VS_OUTPUT Out;

    float4 worldPosition = mul(float4(In.Position.xyz, 1), World);
    float4 viewPosition = mul(worldPosition, View);
    Out.Position = mul(viewPosition, Proj);
    
    Out.TexCoord = In.TexCoord;

    return Out;
}


struct PS_OUTPUT
{
    float4 Color   : COLOR0;
};


sampler tex0;
float4 multColor;


PS_OUTPUT ps_main( in VS_OUTPUT In )
{
    PS_OUTPUT Out;

    Out.Color = tex2D(tex0, In.TexCoord) * multColor;

    return Out;
}
