using System; namespace UnityEngine.Rendering.HighDefinition { /// /// A volume component that holds settings for the Panini Projection effect. /// [Serializable, VolumeComponentMenu("Post-processing/Panini Projection")] [SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))] [HDRPHelpURL("Post-Processing-Panini-Projection")] public sealed class PaniniProjection : VolumeComponent, IPostProcessComponent { /// /// Controls the panini projection distance. This controls the strength of the distorion. /// [Tooltip("Controls the panini projection distance. This controls the strength of the distorion.")] public ClampedFloatParameter distance = new ClampedFloatParameter(0f, 0f, 1f); /// /// Controls how much cropping HDRP applies to the screen with the panini projection effect. A value of 1 crops the distortion to the edge of the screen. /// [Tooltip("Controls how much cropping HDRP applies to the screen with the panini projection effect. A value of 1 crops the distortion to the edge of the screen.")] [Indent] public ClampedFloatParameter cropToFit = new ClampedFloatParameter(1f, 0f, 1f); /// /// Tells if the effect needs to be rendered or not. /// /// true if the effect should be rendered, false otherwise. public bool IsActive() { return distance.value > 0f; } } }