Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

Post Processing Stack Bloom Intensity C#

$
0
0
## Increasing and Decreasing Bloom Intensity## I'm trying to increase and decrease the bloom from 1-10 and back over time. The bloom intensity starts at 1 and I want it to increase up to 10 and then lower back to 1 but it increases over time but carries on past 10. Here's my code: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.PostProcessing; public class CamMovement : MonoBehaviour { public PostProcessingProfile profile; void Start(){ BloomModel.Settings bloomSettings = profile.bloom.settings; bloomSettings.bloom.intensity = 1; } void Update(){ BloomModel.Settings bloomSettings = profile.bloom.settings; if (bloomSettings.bloom.intensity >= 10) { bloomSettings.bloom.intensity = (bloomSettings.bloom.intensity - 0.5f) * Time.time; } if (bloomSettings.bloom.intensity <= 1) { bloomSettings.bloom.intensity = (bloomSettings.bloom.intensity + 0.5f) * Time.time; } Debug.Log ("Bloom Intensity: " + bloomSettings.bloom.intensity); profile.bloom.settings = bloomSettings; } }

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>