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

20 lines
409 B
C#
Raw Normal View History

using UnityEngine;
2019-10-04 18:15:15 +00:00
using UnityEngine.Experimental.Rendering.HDPipeline;
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;
}
}