- Home /
Question by
saif-studio-b12 · Oct 12, 2020 at 08:07 AM ·
renderingpost processing
Accessing HDRP's Volume in script
HDRP uses Volume for post processing. I am trying to access this feature in my C# script. I can however access the Depth Of Field attribute, how do I access the Near Blur and Far Blur values?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
public class LimitDepthOfField : MonoBehaviour {
public Volume postProcessVolume;
DepthOfField dof;
// Start is called before the first frame update
void Start () {
}
void ChangeValue() {
if (postProcessVolume.profile.TryGet<DepthOfField> (out DepthOfField tempB)) {
dof = tempB;
//Access FarBlur Start Value
}
}
}
Comment