Texture TargetMap;
sampler2D g_samSrcColor = sampler_state { texture = <TargetMap>; MipFilter = Linear;	};

float4 vecViewPort;

float4 postprocessing_dilate(float2 Tex : TEXCOORD0) : COLOR0 
{   
   float4 dilate = tex2D(g_samSrcColor, Tex.xy);
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(-vecViewPort.z,-vecViewPort.w) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(0,-vecViewPort.w) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(vecViewPort.z,-vecViewPort.w)));
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(-vecViewPort.z,0) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(vecViewPort.z,0) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(-vecViewPort.z,vecViewPort.w) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(0,vecViewPort.w) ) );
	dilate = max( dilate, tex2D( g_samSrcColor, Tex.xy+float2(vecViewPort.z,vecViewPort.w) ) );

	return dilate;
}

technique PostProcess 
{
	pass p1 
	{
		AlphaBlendEnable = false;	
		VertexShader = null;
		PixelShader = compile ps_2_0 postprocessing_dilate();
	}
}
