const char shaderSource[] =
"//--------------------------------------------------------------------------//\n"
"Texture2D BoundTexture;\n"
"matrix WorldMatrix;\n"
"matrix ProjectionMatrix;\n"
"//--------------------------------------------------------------------------//\n"
"\n"
"\n"
"struct VSSceneIn\n"
"{\n"
"	float3 pos : POSITION;\n"
"	float4 colour : COLOR;\n"
"	float2 tex : TEXCOORD;\n"
"};\n"
"\n"
"struct PSSceneIn\n"
"{\n"
"	float4 pos : SV_Position;\n"
"	float4 colour : COLOR;\n"
"	float2 tex : TEXCOORD;\n"
"};\n"
"\n"
"DepthStencilState DisableDepth\n"
"{\n"
"	DepthEnable = FALSE;\n"
"	DepthWriteMask = ZERO;\n"
"};\n"
"\n"
"BlendState BM_NORMAL\n"
"{\n"
"	AlphaToCoverageEnable = false;\n"
"	BlendEnable[0] = true;\n"
"	SrcBlendAlpha = INV_DEST_ALPHA;\n"
"	DestBlendAlpha = ONE;\n"
"	SrcBlend = SRC_ALPHA;\n"
"	DestBlend = INV_SRC_ALPHA;\n"
"};\n"
"\n"
"BlendState BM_RTT_PREMULTIPLIED\n"
"{\n"
"	AlphaToCoverageEnable = false;\n"
"	BlendEnable[0] = true;\n"
"	SrcBlendAlpha = ONE;\n"
"	DestBlendAlpha = INV_SRC_ALPHA;\n"
"	SrcBlend = ONE;\n"
"	DestBlend = INV_SRC_ALPHA;\n"
"};\n"
"\n"
"SamplerState LinearSampler\n"
"{\n"
"	Filter = MIN_MAG_MIP_LINEAR;\n"
"	AddressU = Clamp;\n"
"	AddressV = Clamp;\n"
"};\n"
"\n"
"RasterizerState clipRasterstate\n"
"{\n"
"	DepthClipEnable = false;\n"
"	FillMode = Solid;\n"
"	CullMode = None;\n"
"	ScissorEnable = true;\n"
"};\n"
"\n"
"RasterizerState noclipRasterstate\n"
"{\n"
"	DepthClipEnable = false;\n"
"	FillMode = Solid;\n"
"	CullMode = None;\n"
"	ScissorEnable = false;\n"
"};\n"
"\n"
"// Vertex shader\n"
"PSSceneIn VSMain(VSSceneIn input)\n"
"{\n"
"	PSSceneIn output = (PSSceneIn)0.0;\n"
"\n"
"	//output our final position\n"
"   output.pos = mul( float4(input.pos, 1), WorldMatrix );\n"
"   output.pos = mul( output.pos, ProjectionMatrix );\n"
"   output.tex = input.tex;\n"
"	output.colour.rgba = input.colour.bgra;\n"
"\n"
"	return output;\n"
"}\n"
"\n"
"// Pixel shader\n"
"float4 PSMain(PSSceneIn input) : SV_Target\n"
"{\n"
"	float4 colour = BoundTexture.Sample(LinearSampler, input.tex) * input.colour;\n"
"	return colour;\n"
"}\n"
"\n"
"// Techniques\n"
"technique11 BM_NORMAL_Clipped_Rendering\n"
"{\n"
"	pass P0\n"
"	{\n"
"		SetVertexShader(CompileShader(vs_4_0, VSMain()));\n"
"		SetGeometryShader(NULL);\n"
"		SetPixelShader(CompileShader(ps_4_0, PSMain()));\n"
"		SetDepthStencilState(DisableDepth, 0);\n"
"		SetBlendState(BM_NORMAL, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);\n"
"		SetRasterizerState(clipRasterstate);\n"
"	}\n"
"}\n"
"\n"
"technique11 BM_NORMAL_Unclipped_Rendering\n"
"{\n"
"	pass P0\n"
"	{\n"
"		SetVertexShader(CompileShader(vs_4_0, VSMain()));\n"
"		SetGeometryShader(NULL);\n"
"		SetPixelShader(CompileShader(ps_4_0, PSMain()));\n"
"		SetDepthStencilState(DisableDepth, 0);\n"
"		SetBlendState(BM_NORMAL, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);\n"
"		SetRasterizerState(noclipRasterstate);\n"
"	}\n"
"}\n"
"\n"
"technique11 BM_RTT_PREMULTIPLIED_Clipped_Rendering\n"
"{\n"
"	pass P0\n"
"	{\n"
"		SetVertexShader(CompileShader(vs_4_0, VSMain()));\n"
"		SetGeometryShader(NULL);\n"
"		SetPixelShader(CompileShader(ps_4_0, PSMain()));\n"
"		SetDepthStencilState(DisableDepth, 0);\n"
"		SetBlendState(BM_RTT_PREMULTIPLIED, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);\n"
"		SetRasterizerState(clipRasterstate);\n"
"	}\n"
"}\n"
"\n"
"technique11 BM_RTT_PREMULTIPLIED_Unclipped_Rendering\n"
"{\n"
"	pass P0\n"
"	{\n"
"		SetVertexShader(CompileShader(vs_4_0, VSMain()));\n"
"		SetGeometryShader(NULL);\n"
"		SetPixelShader(CompileShader(ps_4_0, PSMain()));\n"
"		SetDepthStencilState(DisableDepth, 0);\n"
"		SetBlendState(BM_RTT_PREMULTIPLIED, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);\n"
"		SetRasterizerState(noclipRasterstate);\n"
"	}\n"
"}\n"
"\n"
"//--------------------------------------------------------------------------//\n"
;
