Bloom
The Bloom effect creates fringes of light extending from the borders of bright areas in an image. This creates the illusion of an extremely bright light overwhelming the Camera.
Bloom in the High Definition Render Pipeline (HDRP) is energy-conserving. This means that you must use correct physical values for lighting and Materials for it to work correctly. For information on the light units that HDRP uses, see the Physical Light Units documentation.
The Bloom effect also has a Lens Dirt feature, which you can use to apply a full-screen layer of smudges or dust to diffract the Bloom effect.
Using Bloom
Bloom uses the Volume framework, so to enable and modify Bloom properties, you must add a Bloom override to a Volume in your Scene. To add Bloom to a Volume:
- In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
- In the Inspector, go to Add Override > Post-processing and select Bloom. HDRP now applies Bloom to any Camera this Volume affects.
Bloom includes additional properties that you must manually expose.
API
To access and control this override at runtime, use the Volume scripting API. Because of how the Volume system works, you edit properties in a different way to standard Unity components. There are also other nuances to be aware of too, such as each property has an overrideState. This indicates to the Volume system whether to use the property value you set, or use the default value stored in the Volume Profile. For information on how to use the API correctly, see Volume scripting API.
Properties
Bloom
Property | Description |
---|---|
Threshold | Use the slider to set the level of brightness to filter out pixels under this level. This value is expressed in gamma-space. A value higher than 0 will break the energy conservation rule. |
Intensity | Use the slider to set the strength of the Bloom filter. |
Scatter | Use the slider to change the extent of the veiling effect. |
Tint | Use the color picker to select a color for the Bloom effect to tint to. |
Lens Dirt
Property | Description |
---|---|
Texture | Assign a Texture to apply dirtiness (for example, smudges or dust) to the lens. |
Intensity | Set the strength of the Lens Dirt effect. |
Advanced Tweaks
Property | Description |
---|---|
Resolution | Use the drop-down to set the resolution at which HDRP processes the Bloom effect. If you target consoles that use a very high resolution (for example, 4k), select Quarter, because it's less resource-intensive. • Quarter: Uses quarter the screen resolution. • Half: Uses half the screen resolution. This property only appears when you enable additional properties. |
High Quality Prefiltering | Enable the checkbox to make HDRP use 13 samples instead of 4 during the prefiltering pass. This increases the resource intensity of the Bloom effect, but results in less flickering by small and bright objects like the sun. This property only appears when you enable additional properties. |
High Quality Filtering | Enable the checkbox to make HDRP use bicubic filtering instead of bilinear filtering. This increases the resource intensity of the Bloom effect, but results in smoother visuals. This property only appears when you enable additional properties. |
Anamorphic | Enable the checkbox to make the bloom effect take the Anamorphism property of the Camera into account. This stretches the bloom horizontally or vertically like it would on anamorphic sensors. This property only appears when you enable additional properties. |
Details
From 2019.3, HDRP provides lookup textures that you can use to customize this effect. These lookup textures are for the Texture property in the Lens Dirt section. To add these Textures to your Unity Project, you must use the Package Manager:
- Go to Window > Package Manager.
- In the Packages window, select High Definition RP.
- In the High Definition RP section, go to Additional Post-processing Data and select Import into Project.
- The Textures that are relevant to Bloom are in the Lens Dirt folder, so if you only want the lookup Textures for Bloom, only import the contents of the Lens Dirt folder.
Care is needed when using the Bloom effect with Chromatic Abberation. For performance reasons, Chromatic Aberation is computed after the Bloom computation. This results in Bloom overpowering the Chromatic Aberration effect when the Bloom Intensity is set to a very high value. However, in a typical Bloom configuration, the Intensity should never need to be set high enough for this to be an issue.