Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Bloom before tonemapping


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 TiagoCosta   Crossbones+   -  Reputation: 2346

Like
0Likes
Like

Posted 22 June 2012 - 12:20 PM

How is a bloom effect like this Posted Image 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.

Edited by TiagoCosta, 23 June 2012 - 03:11 AM.


Sponsor:

#2 InvalidPointer   Members   -  Reputation: 1440

Like
1Likes
Like

Posted 22 June 2012 - 09:02 PM

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.

#3 TiagoCosta   Crossbones+   -  Reputation: 2346

Like
0Likes
Like

Posted 23 June 2012 - 09:37 AM

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 Posted Image 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?

Edited by TiagoCosta, 23 June 2012 - 09:38 AM.


#4 CryZe   Members   -  Reputation: 768

Like
0Likes
Like

Posted 24 June 2012 - 05:46 AM

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.

Edited by CryZe, 24 June 2012 - 05:47 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS