Last active
March 21, 2025 17:11
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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