Bloom before tonemapping

Started by
2 comments, last by CryZe 11 years, 10 months ago
How is a bloom effect like this ScreenBlend.png achieved (notice that the bloom in the right retains a lot more detail)?

My idea is to use a FP16 texture to store the result of the bright pass filter and the blurring and then add the bloom to the scene color before the final tonemap step.


float4 BrightPass(PSInput pIn) : SV_TARGET0
{
float3 color = gSceneTexture.Sample(...).rgb;
float3 tonemapped = Tonemap(color);

if(tonemapped - threshold < 0.0f)
return float4(0.0f, 0.0f, 0.0f, 0.0f);

return float4(color, 1.0f);
}


EDIT: Here is the description of the effect.
Advertisement
They tell you right in the image title, you use the 'screen' blend mode instead of a direct addition. Much, much simpler ;)
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

They tell you right in the image title, you use the 'screen' blend mode instead of a direct addition. Much, much simpler ;)


I haven't noticed that happy.png So now I know how they add the bloom to the scene, but in description of the effect they said they add the bloom to the scene before tonemapping (instead of after like its done in the DXSDK examples), so how should the bright pass filter be done?
You shouldn't be using a threshold for the bright pass filter. Instead you should multiply the colors down with a small factor, so that only the really bright lights get a visible glare. If your engine is using actual high dynamic range lighting this should be the way you are supposed to do it.

This topic is closed to new replies.

Advertisement