URP & Post-processing

Add glow, colour grading, darkened screen edges and other screen effects to your game with URP's Volumes.

Post-processing is a photo filter. The camera takes the picture first; then filters (glow, colour, blur) are applied on top. A Volume Profile is a saved filter preset, and a Volume decides where that preset is used: everywhere, or only inside a certain area like a cave.

Words to know

WordMeaning
URPUniversal Render Pipeline: the system that draws your game. New "Universal 3D" projects use it by default.
VolumeA component that says "use these effects here".
Volume ProfileAn asset holding the effect settings.
OverrideOne effect added to a profile, such as Bloom or Vignette.

1. Your first effect (no code)

  1. Select your Main Camera. Under Rendering, tick Post Processing.
  2. GameObject > Volume > Global Volume. In its Inspector click New next to Profile.
  3. Click Add Override > Post-processing > Color Adjustments.
  4. Tick the small box next to Saturation and drag it to -100. The game turns black and white.

Nothing happened? Each setting has its own tick box on the left. The effect only applies to settings you've ticked.

Camera draws sceneVolumes pick settingsEffects appliedFinal image
Volumes don't draw anything themselves. They only choose which filters the camera uses.
EffectWhat it doesTip
BloomBright things glowPair with an Emission colour on a material. It's only a glow effect; it doesn't light up nearby objects.
Color AdjustmentsBrightness, contrast, saturation, colour tintGreat for mood: cold blue caves, warm sunsets.
TonemappingMakes very bright and dark areas look naturalTry ACES or Neutral.
VignetteDarkens the screen edgesGood for "taking damage" flashes.
Depth of FieldBlurs things out of focusCan be expensive; avoid blurring things the player needs to see.
Motion BlurBlurs fast movementSome players get motion sick. Offer an option to turn it off.

2. Effects in one area only

  1. GameObject > Volume > Box Volume. This makes a Volume set to Local, with a Box Collider.
  2. Tick Is Trigger on the collider (so the player doesn't bump into it) and size it to cover your cave.
  3. Give it a profile with a cold blue tint and set Blend Distance to 3 for a smooth fade.
  4. Set its Priority higher than the global Volume so it wins while the camera is inside.

No script needed. URP checks where the camera is (not the player) and blends automatically.

3. Changing effects from code

Example: flash a red vignette when the player takes damage. Add a Vignette override to your Volume's profile first, then attach this to the Volume.

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;

[RequireComponent(typeof(Volume))]
public class DamageFlash : MonoBehaviour
{
    private Vignette vignette;
    private float strength;

    void Start()
    {
        // .profile (not .sharedProfile) gives this Volume its own copy,
        // so we don't permanently change the asset in the Project window
        GetComponent<Volume>().profile.TryGet(out vignette);
        vignette.intensity.overrideState = true;
    }

    public void Flash() => strength = 0.5f; // call this when hit

    void Update()
    {
        strength = Mathf.MoveTowards(strength, 0f, Time.deltaTime);
        vignette.intensity.value = strength;
    }
}

If an effect doesn't show up

Work down this list:

  1. Is Post Processing ticked on the camera?
  2. Is the setting's own tick box on in the profile?
  3. Is the Volume's Weight above 0?
  4. Does the camera's Volume Mask include the Volume's layer?
  5. Is another Volume with higher priority overriding it?

Good to know

Common Mistakes

See also