i found how it's done in hlsl :
they just set some properties on a pass - I was thinking something similar exists in glsl.
float4 DownFilter( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = 0;
for (int i = 0; i < 16; i++)
{
Color += tex2D( g_samSrcColor, Tex + TexelCoordsDownFilter[i].xy );
}
return Color / 16;
}
//-----------------------------------------------------------------------------
// Technique: PostProcess
// Desc: Performs post-processing effect that down-filters.
//-----------------------------------------------------------------------------
technique PostProcess
{
pass p0
<
float fScaleX = 0.25f;
float fScaleY = 0.25f;
>
{
VertexShader = null;
PixelShader = compile ps_2_0 DownFilter();
ZEnable = false;
}
}