Code:
texture TargetMap;

sampler COLOR_SAMPLER = sampler_state { Texture   = <TargetMap>; MinFilter = Linear; MagFilter = Linear; MipFilter = None;};

float3 local_contrast(float3 color)
{
return color*color*(3-2*color);
}

void PS(
in float2 Tex : TEXCOORD0,

out float4 COL : COLOR0
) 
{
	COL.rgb=local_contrast(tex2D(COLOR_SAMPLER,Tex).rgb);
        COL.a=1;
}

technique Shading
{
	pass one
	{
		PixelShader = compile ps_2_0 PS();
	}
}



Last edited by Hummel; 01/26/11 17:19.