Challenge - 5 Problems
Bloom and Color Grading Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this bloom intensity adjustment code?
Consider this Unity C# snippet that adjusts bloom intensity dynamically. What will be the final bloom intensity printed?
Unity
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class BloomTest : MonoBehaviour { public PostProcessVolume volume; private Bloom bloomLayer; void Start() { volume.profile.TryGetSettings(out bloomLayer); bloomLayer.intensity.value = 1.5f; AdjustBloom(2.0f); Debug.Log($"Bloom intensity: {bloomLayer.intensity.value}"); } void AdjustBloom(float multiplier) { bloomLayer.intensity.value *= multiplier; } }
Attempts:
2 left
💡 Hint
Think about how the intensity value changes when multiplied by the multiplier.
✗ Incorrect
The initial bloom intensity is set to 1.5. Then it is multiplied by 2.0, resulting in 3.0.
❓ Predict Output
intermediate2:00remaining
What color tint will be applied after this color grading code runs?
Given this Unity C# code snippet that modifies color grading, what will be the final color filter applied?
Unity
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class ColorGradingTest : MonoBehaviour { public PostProcessVolume volume; private ColorGrading colorGradingLayer; void Start() { volume.profile.TryGetSettings(out colorGradingLayer); colorGradingLayer.colorFilter.value = Color.white; ApplyTint(new Color(0.5f, 0.2f, 0.2f)); Debug.Log($"Color filter: {colorGradingLayer.colorFilter.value}"); } void ApplyTint(Color tint) { colorGradingLayer.colorFilter.value = tint; } }
Attempts:
2 left
💡 Hint
The color filter is set directly to the tint color passed.
✗ Incorrect
The color filter is initially white but then set to the tint color (0.5, 0.2, 0.2).
🔧 Debug
advanced2:00remaining
Why does this bloom intensity adjustment code cause a NullReferenceException?
Examine this Unity C# code snippet. Why does it throw a NullReferenceException when run?
Unity
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class BloomBug : MonoBehaviour { public PostProcessVolume volume; private Bloom bloomLayer; void Start() { bloomLayer.intensity.value = 2.0f; } }
Attempts:
2 left
💡 Hint
Check if bloomLayer is assigned before accessing its properties.
✗ Incorrect
bloomLayer is declared but never assigned using TryGetSettings, so it remains null causing the error.
📝 Syntax
advanced2:00remaining
Which option correctly sets the bloom threshold to 1.2 in Unity C#?
Choose the correct code snippet that sets the bloom threshold value to 1.2 using PostProcessing bloom settings.
Attempts:
2 left
💡 Hint
Remember that bloom threshold is a parameter with a value property.
✗ Incorrect
The threshold is a FloatParameter, so you set its value property directly.
🚀 Application
expert3:00remaining
How many color grading settings are changed after this code runs?
This Unity C# code modifies color grading settings. How many distinct settings are changed after execution?
Unity
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class ColorGradingChange : MonoBehaviour { public PostProcessVolume volume; private ColorGrading colorGradingLayer; void Start() { volume.profile.TryGetSettings(out colorGradingLayer); colorGradingLayer.saturation.value = -20f; colorGradingLayer.contrast.value = 15f; colorGradingLayer.colorFilter.value = Color.red; colorGradingLayer.saturation.value = -10f; } }
Attempts:
2 left
💡 Hint
Count each unique setting property changed, ignoring repeated changes to the same property.
✗ Incorrect
Saturation, contrast, and colorFilter are changed. Saturation is changed twice but counts as one setting.