

texture SceneMap;
/*
< 
    //float2 ViewportRatio = { 1.0, 1.0 };
    //int MIPLEVELS = 1;
    //string format = "X8R8G8B8";
>;
*/

sampler SceneSampler = sampler_state 
{
    texture = <SceneMap>;
    AddressU  = CLAMP;        
    AddressV  = CLAMP;
    AddressW  = CLAMP;
    MIPFILTER = NONE;
    MINFILTER = LINEAR;
    MAGFILTER = LINEAR;
};

///////////////////////////////////////////////////////////
/////////////////////////////////// data structures ///////
///////////////////////////////////////////////////////////

struct VS_OUTPUTS
{
   	float4 Position   : POSITION;
    float2 TexCoord0  : TEXCOORD0;
};

////////////////////////////////////////////////////////////
////////////////////////////////// vertex shaders //////////
////////////////////////////////////////////////////////////

VS_OUTPUTS VS_Quad2(float4 Position : POSITION, 
				  float2 TexCoord : TEXCOORD0)
{
    VS_OUTPUTS OUT;
	//float2 texelSize = 1.0 / WindowSize;
    //OUT.Position = Position;
    // don't want bilinear filtering on original scene:
    //OUT.TexCoord0 = TexCoord + texelSize*0.5
    
    //float4 texelpos = {320.0f,240.0f,0.0f,0.0f};
    //texelpos = 1.0f / texelpos;
    
    //just pass the data through
    OUT.Position = Position;
    OUT.TexCoord0 = TexCoord;// + texelpos*0.5;
    return OUT;
}

//////////////////////////////////////////////////////
////////////////////////////////// pixel shaders /////
//////////////////////////////////////////////////////

half4 PS_Comp2(VS_OUTPUTS IN) : COLOR
{   
	//half3 orig = tex2D(SceneSampler, IN.TexCoord0).xyz;
	half4 orig = tex2D(SceneSampler, IN.TexCoord0);
	//half4 blur = tex2D(blurredSceneSampler, IN.TexCoord1);
	//return SceneIntensity*orig + GlowIntensity*blur + HighlightIntensity*blur.a;
	return (orig * 1.0f);
} 

////////////////////////////////////////////////////////////
/////////////////////////////////////// techniques /////////
////////////////////////////////////////////////////////////
technique Scene
{
	pass p0
	{
		//cullmode = none;
		//ZEnable = false;
		//ZWriteEnable = false;
		VertexShader = compile vs_2_0 VS_Quad2();
		PixelShader  = compile ps_2_0 PS_Comp2();	
	}
}