Skip to content

Instantly share code, notes, and snippets.

@TheCuttlefish
Last active March 21, 2025 17:11
Show Gist options
  • Save TheCuttlefish/8e5efeaf53ee7bbe1b0c5b61e0d935ec to your computer and use it in GitHub Desktop.
Save TheCuttlefish/8e5efeaf53ee7bbe1b0c5b61e0d935ec to your computer and use it in GitHub Desktop.
Unity URP control of post processing effects (example bloom) 2022 - works with post processing stack v2
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
public class PostControl : MonoBehaviour
{
public PostProcessVolume volume;
public Bloom myBloom ;
void Awake()
{
PostProcessVolume volume = gameObject.GetComponent<PostProcessVolume>();
Bloom tempBloomVariable;
if(volume.profile.TryGetSettings(out tempBloomVariable))
{
myBloom = tempBloomVariable;
}
}
void Update()
{
myBloom.intensity.value = 1f;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment