2019-10-03 19:41:34 +00:00
|
|
|
|
using UnityEngine;
|
2019-10-04 18:15:15 +00:00
|
|
|
|
using UnityEngine.Experimental.Rendering.HDPipeline;
|
|
|
|
|
using UnityEngine.Rendering;
|
2019-10-03 19:41:34 +00:00
|
|
|
|
|
|
|
|
|
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;
|
2019-10-03 19:41:34 +00:00
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
2019-10-04 18:15:15 +00:00
|
|
|
|
volume.profile.TryGet(out bloom_);
|
2019-10-03 19:41:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnEnergyChanged(float energy)
|
|
|
|
|
{
|
2019-10-04 18:15:15 +00:00
|
|
|
|
bloom_.intensity.value = energy / 500f;
|
2019-10-03 19:41:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|