soundvision/UnityProject/Assets/Scenes/Examples/PostProcessing/script/BokehBind.cs

20 lines
400 B
C#
Raw Normal View History

using UnityEngine;
2020-03-04 20:47:24 +00:00
using UnityEngine.Rendering.HighDefinition;
2019-10-04 18:15:15 +00:00
using UnityEngine.Rendering;
public class BokehBind : MonoBehaviour
{
2019-10-04 18:15:15 +00:00
private Bloom bloom_;
2019-10-04 19:58:32 +00:00
[SerializeField] Volume volume = null;
private void Start()
{
2019-10-04 18:15:15 +00:00
volume.profile.TryGet(out bloom_);
}
public void OnEnergyChanged(float energy)
{
2019-10-04 18:15:15 +00:00
bloom_.intensity.value = energy / 500f;
}
}