using System; namespace UnityEngine.Rendering.Universal { /// /// A volume component that holds settings for the Shadows, Midtones, Highlights effect. /// [Serializable, VolumeComponentMenu("Post-processing/Shadows, Midtones, Highlights")] [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] [URPHelpURL("Post-Processing-Shadows-Midtones-Highlights")] public sealed class ShadowsMidtonesHighlights : VolumeComponent, IPostProcessComponent { /// /// Use this to control and apply a hue to the shadows. /// public Vector4Parameter shadows = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f)); /// /// Use this to control and apply a hue to the midtones. /// public Vector4Parameter midtones = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f)); /// /// Use this to control and apply a hue to the highlights. /// public Vector4Parameter highlights = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f)); /// /// Start point of the transition between shadows and midtones. /// [Header("Shadow Limits")] [Tooltip("Start point of the transition between shadows and midtones.")] public MinFloatParameter shadowsStart = new MinFloatParameter(0f, 0f); /// /// End point of the transition between shadows and midtones. /// [Tooltip("End point of the transition between shadows and midtones.")] public MinFloatParameter shadowsEnd = new MinFloatParameter(0.3f, 0f); /// /// Start point of the transition between midtones and highlights /// [Header("Highlight Limits")] [Tooltip("Start point of the transition between midtones and highlights.")] public MinFloatParameter highlightsStart = new MinFloatParameter(0.55f, 0f); /// /// End point of the transition between midtones and highlights. /// [Tooltip("End point of the transition between midtones and highlights.")] public MinFloatParameter highlightsEnd = new MinFloatParameter(1f, 0f); /// public bool IsActive() { var defaultState = new Vector4(1f, 1f, 1f, 0f); return shadows != defaultState || midtones != defaultState || highlights != defaultState; } /// [Obsolete("Unused #from(2023.1)", false)] public bool IsTileCompatible() => true; } }