Mimicking real life with bloom and anti-aliasing
The bloom optical effect aims to mimic the imaging effects of real-world cameras, where things in areas with lights will glow along the edges, thus overwhelming the camera. The bloom effect is very distinctive and you've likely seen it employed in areas in a game that are magical or heaven-like.
Getting ready
Make sure you have completed the Installing the Post Processing Stack recipe before starting this one.
How to do it...
- We first create a new
Post Processing Profile
by right-clicking within theAssets
folder in theProject
window and then selectingCreate
|Post Processing Profile
. Once selected, it will allow us to rename the item. Go ahead and set the name toBloomProfile
. - Select the
Post-process volume
object and, from theInspector
window, go to thePost Processing Volume
component and assign theProfile
property to theBloomProflie
we just created.
- Afterward, select the
Game
tab, if it hasn't been selected already to see the results of the changes we are about to make in the following steps. - Select the
Add effect...
button and selectUnity
|Bloom
. Once the effect has been added to theOverrides
section of thePost Processing Volume
component, select the arrow to open its properties. Check theIntensity
property and set it to3
. Afterward, check and set theThreshold
to0.75
, theSoft Knee
to0.1
, and theRadius
to3
:

- Next, select the object with the
Post Process Layer
component attached to it (in the example, it is theFPSController
|FirstPersonCharacter
object) and, from theInspector
tab, scroll down to thePost Process Layer
script. From there, change theAnti-aliasing
property dropdown toFast Approximate Anti-aliasing
:

- Afterward, save your scene and hit the Play button to check out your project:

The final result of using bloom and anti-aliasing
How it works...
As mentioned before, bloom will make bright things even brighter while adding a glow to lighter areas. In this recipe, you may notice that the path is much lighter than it was previously. This can be used in order to ensure that players will follow the path to get to the next section of gameplay.
Note
For more information on bloom, check out: https://github.com/Unity-Technologies/PostProcessing/wiki/Bloom.
Anti-aliasing
attempts to reduce the appearance of aliasing, which is the effect of lines appearing jagged on the screen. This is typically due to the fact that the display the player is using to play the game doesn't have a high enough resolution to be displayed properly. Anti-aliasing will combine colors with nearby lines in order to remove their prominence, at the cost of the game appearing blurry.
Note
For more information on anti-aliasing and what each mode means, check out: https://github.com/Unity-Technologies/PostProcessing/wiki/Anti-aliasing.