The Bloom effect
- Game Development course
- Advanced
- Lesson 9/71
- 4 min
Learn to soften bright areas with Bloom.
What is Bloom?
Bloom is the effect that adds light spreading around bright regions. Strong lights and bright surfaces look as if they carry the light. The threshold is the brightness limit that enters bloom; as the threshold rises, only the brightest regions are affected.
efekt.bloom.intensity.value = 1.5f;
efekt.bloom.threshold.value = 0.8f;Bloom is used especially for light sources and reflections.
Glow and intensity
The halo of light created by bloom is called glow; a soft spreading appears around the brightness. The intensity decides the strength of this spreading. As the value rises, the halo gets wider and brighter.
glow = intensity * brightness;An excessive intensity value can wash out the image, so it should be used in balance.
Practice Bloom intensity
In a class named BloomEtkisi, define a string ad field with the value "Bloom" and an int yogunluk field with the value 3. In the Start method, increase yogunluk by 2 and print the text "Bloom yogunlugu: " joined with yogunluk using Debug.Log.
Starter code
using UnityEngine;
public class BloomEtkisi : MonoBehaviour
{
// string ad alanini "Bloom" degeriyle tanimla
// int yogunluk alanini 3 degeriyle tanimla
void Start()
{
// yogunluk degerini 2 artir
// "Bloom yogunlugu: " metnini yogunluk ile birlestirip yazdir
}
}Sample solution
using UnityEngine;
public class BloomEtkisi : MonoBehaviour
{
string ad = "Bloom";
int yogunluk = 3;
void Start()
{
yogunluk += 2;
Debug.Log("Bloom yogunlugu: " + yogunluk);
}
}Expected output
Bloom yogunlugu: 5
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What happens when the threshold value rises in Bloom?
threshold = 0.2f;
threshold = 1.0f;- Shadows get softer
- The color tone changes
- Bloom spreads over the whole image
- Only brighter regions enter the bloom Correct answer
Explanation: Threshold is a brightness limit; as it rises, regions below it stay out of the bloom.
2 Set the brightness limit
bloom.____ = 0.8f;
bloom.threshold = 0.8f;
Explanation: In the bloom settings the brightness limit is given with threshold; pixels above this value enter the bloom.
3 Bloom settings
| Term | Meaning |
|---|---|
Bloom |
Light spreading from bright areas |
Glow |
Light halo around bright areas |
Threshold |
Brightness threshold for Bloom |
Intensity |
Strength of light spreading |