tree sway and shadow improvements
[WindSway-HDRP.git] / Library / PackageCache / com.unity.postprocessing@2.1.2 / PostProcessing / Editor / Effects / BloomEditor.cs
blob9b424b0399860e6fdea9590b71e376e6c5c7fdae
1 using UnityEngine.Rendering.PostProcessing;
3 namespace UnityEditor.Rendering.PostProcessing
5 [PostProcessEditor(typeof(Bloom))]
6 internal sealed class BloomEditor : PostProcessEffectEditor<Bloom>
8 SerializedParameterOverride m_Intensity;
9 SerializedParameterOverride m_Threshold;
10 SerializedParameterOverride m_SoftKnee;
11 SerializedParameterOverride m_Clamp;
12 SerializedParameterOverride m_Diffusion;
13 SerializedParameterOverride m_AnamorphicRatio;
14 SerializedParameterOverride m_Color;
15 SerializedParameterOverride m_FastMode;
17 SerializedParameterOverride m_DirtTexture;
18 SerializedParameterOverride m_DirtIntensity;
20 public override void OnEnable()
22 m_Intensity = FindParameterOverride(x => x.intensity);
23 m_Threshold = FindParameterOverride(x => x.threshold);
24 m_SoftKnee = FindParameterOverride(x => x.softKnee);
25 m_Clamp = FindParameterOverride(x => x.clamp);
26 m_Diffusion = FindParameterOverride(x => x.diffusion);
27 m_AnamorphicRatio = FindParameterOverride(x => x.anamorphicRatio);
28 m_Color = FindParameterOverride(x => x.color);
29 m_FastMode = FindParameterOverride(x => x.fastMode);
31 m_DirtTexture = FindParameterOverride(x => x.dirtTexture);
32 m_DirtIntensity = FindParameterOverride(x => x.dirtIntensity);
35 public override void OnInspectorGUI()
37 EditorUtilities.DrawHeaderLabel("Bloom");
39 PropertyField(m_Intensity);
40 PropertyField(m_Threshold);
41 PropertyField(m_SoftKnee);
42 PropertyField(m_Clamp);
43 PropertyField(m_Diffusion);
44 PropertyField(m_AnamorphicRatio);
45 PropertyField(m_Color);
46 PropertyField(m_FastMode);
48 if (m_FastMode.overrideState.boolValue && !m_FastMode.value.boolValue && EditorUtilities.isTargetingConsolesOrMobiles)
49 EditorGUILayout.HelpBox("For performance reasons it is recommended to use Fast Mode on mobile and console platforms.", MessageType.Warning);
51 EditorGUILayout.Space();
52 EditorUtilities.DrawHeaderLabel("Dirtiness");
54 PropertyField(m_DirtTexture);
55 PropertyField(m_DirtIntensity);
57 if (RuntimeUtilities.isVREnabled)
59 if ((m_DirtIntensity.overrideState.boolValue && m_DirtIntensity.value.floatValue > 0f)
60 || (m_DirtTexture.overrideState.boolValue && m_DirtTexture.value.objectReferenceValue != null))
61 EditorGUILayout.HelpBox("Using a dirt texture in VR is not recommended.", MessageType.Warning);