float4x4 mVP; // View * Projection matrix

texture tBase;

sampler smpBase = sampler_state {
    Texture = <tBase>;    
    MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
};

struct SInput {
	float4 pos : POSITION;
	float4 diffuse : COLOR0;
	float2 tex : TEXCOORD0;
};

SInput RenderSceneVS( SInput i )
{
	SInput o;
	
	o.pos = mul( i.pos, mVP );			
	o.diffuse = i.diffuse;

	o.tex.x = i.tex.x;
	o.tex.y = 1.0/12 + 1.0/6 * 1;

	//o.tex.y = 1.0/12 + 1.0/6 * 2;
		
	return o;   
}



technique RenderScene {
	pass P0 {          
		VertexShader = compile vs_1_1 RenderSceneVS();
		PixelShader  = NULL;
		
		AlphaBlendEnable = True;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		SeparateAlphaBlendEnable = True;
		SrcBlendAlpha = One;
		DestBlendAlpha = One;
		
		CullMode = None;

		ZEnable = False;
		ZWriteEnable = False;

		Sampler[0] = (smpBase);

		ColorOp[0] = Modulate;
		ColorArg1[0] = Diffuse;
		ColorArg2[0] = Texture;
		AlphaOp[0] = Modulate;
		AlphaArg1[0] = Diffuse;
		AlphaArg2[0] = Texture;
			
		ColorOp[1] = Disable;
		AlphaOp[1] = Disable;
	}
}
