Unity3D's reference describes the HDR Bloom as:
Using HDR allows for much more control in post processing. LDR bloom has an unfortunate side effect of blurring many areas of a scene even if their pixel intensity is less than 1.0. By using HDR it is possible to only bloom areas where the intensity is greater than one.
My question is how to achieve it in a surface shader
? I have tried to output both the Albedo
and Emission
greater than 1, but still when I set the Threshold of Bloom equal to or greater than 1, no visible effect can be seen.
The relevant part of shader snippet is:
float rim = saturate(dot(normalize(IN.viewDir), o.Normal));
if (rim >= 0.98) {
o.Emission = 1.5; // or any large value
}
Which basically outputs a bright white circle when view angle and normal are at almost same angle, and I want to enhance it with HDR. But outputting a value greater than 1 is not being registered and setting the threshold almost equal to 1 (0.98 or above) creates the Bloom on areas other than the bright white spot, which is not what is needed. I have tried to output extremely large values of Emission
and have also tried output Albedo
> 1.
Please tell what I am doing wrong or missing. I think I have not been able to figure out what is the meaning of pixel intensity
> 1 and what settings does this translate to.