float4 PS(VSO input) : SV_TARGET0
{
const float offset[3] = { 0.0, 1.3846153846, 3.2307692308 };
const float weight[3] = { 0.2270270270, 0.3162162162, 0.0702702703 };
const float pixelSize = float2(1.0f / _ScreenSize.x, 1.0f / _ScreenSize.y);
float3 texColor = TargetTexture.Sample(TargetTextureSampler, input.UV * pixelSize).xyz * weight[0];
for (int i = 1; i < 3; i++)
{
texColor += TargetTexture.Sample(TargetTextureSampler, input.UV + float2(0.0f, offset * pixelSize)).xyz * weight;
texColor += TargetTexture.Sample(TargetTextureSampler, input.UV - float2(0.0f, offset * pixelSize)).xyz * weight;
}
return float4(texColor.rgb, 1.0f);
}
I'm just not sure if the result is correct since its quite a lot darker than the original image:
original : http://cl.ly/image/093q0Z2c0m1a
blurred: http://cl.ly/image/3E0P2d3t0U1g
I'm trying to achieve a bloom effect so in this sense making the result darker is quite the opposite of what I want...
Am I doing something wrong ?
