#ifndef D3D10EFFECT_H
#define D3D10EFFECT_H

const char * pEffectData="float4x4 matWorld;" 
"float4x4 matProjection;" 
"struct VS_INPUT" 
"{" 
	"float4 Pos:POSITION;" 
	"float4 Colour:COLOR;" 
	"float2 TexCoord:TEXCOORD;" 
"};" 
"struct PS_INPUT" 
"{" 
	"float4 Pos:SV_POSITION;" 
	"float4 Colour:COLOR; "
	"float2 TexCoord:TEXCOORD;" 
"};" 
"Texture2D diffuseMap;" 
"SamplerState diffuseSampler" 
"{"
    "Filter = MIN_MAG_MIP_POINT;" 
    "AddressU = WRAP;" 
    "AddressV = WRAP;" 
"};" 
"PS_INPUT VS( VS_INPUT input )" 
"{"
	"PS_INPUT output=(PS_INPUT)0;"
	"float4x4 worldViewProjection=mul(matWorld,matProjection);" 	
	"output.Pos=mul(input.Pos,worldViewProjection);" 
	"output.TexCoord=input.TexCoord;" 
	"output.Colour=input.Colour;" 
    "return output;"
"}" 
"float4 PS(PS_INPUT input ) : SV_Target"
"{"
	"float4 finalColour=diffuseMap.Sample(diffuseSampler,input.TexCoord)*input.Colour;"
    "return finalColour;"
"}"
"BlendState AlphaBlendingOn"
"{"
    "BlendEnable[0] = TRUE;"
    "DestBlend = INV_SRC_ALPHA;"
    "SrcBlend = SRC_ALPHA;"
"};"
"technique10 Render"
"{" 
    "pass P0" 
    "{" 
	"SetBlendState(AlphaBlendingOn, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);"
    "SetVertexShader( CompileShader( vs_4_0, VS() ) );" 
    "SetGeometryShader( NULL );" 
    "SetPixelShader( CompileShader( ps_4_0, PS() ) ); " 
    "}"
"}";

#endif