post processing
[WindSway-HDRP.git] / Library / PackageCache / com.unity.postprocessing@2.1.6 / PostProcessing / Editor / Effects / DepthOfFieldEditor.cs
blob9e58d674c6f038a29ce875a08a7cbbbc7de8cf6e
1 using UnityEngine;
2 using UnityEngine.Rendering.PostProcessing;
4 namespace UnityEditor.Rendering.PostProcessing
6 [PostProcessEditor(typeof(DepthOfField))]
7 internal sealed class DepthOfFieldEditor : PostProcessEffectEditor<DepthOfField>
9 SerializedParameterOverride m_FocusDistance;
10 SerializedParameterOverride m_Aperture;
11 SerializedParameterOverride m_FocalLength;
12 SerializedParameterOverride m_KernelSize;
14 public override void OnEnable()
16 m_FocusDistance = FindParameterOverride(x => x.focusDistance);
17 m_Aperture = FindParameterOverride(x => x.aperture);
18 m_FocalLength = FindParameterOverride(x => x.focalLength);
19 m_KernelSize = FindParameterOverride(x => x.kernelSize);
22 public override void OnInspectorGUI()
24 if (SystemInfo.graphicsShaderLevel < 35)
25 EditorGUILayout.HelpBox("Depth Of Field is only supported on the following platforms:\nDX11+, OpenGL 3.2+, OpenGL ES 3+, Metal, Vulkan, PS4/XB1 consoles.", MessageType.Warning);
27 PropertyField(m_FocusDistance);
28 PropertyField(m_Aperture);
29 PropertyField(m_FocalLength);
30 PropertyField(m_KernelSize);