using System; namespace UnityEngine.Rendering.HighDefinition { /// /// Volume Component that uses Quality Settings. /// public abstract class VolumeComponentWithQuality : VolumeComponent { /// Quality level used by this component. [Tooltip("Specifies the quality level to be used for performance relevant parameters.")] public ScalableSettingLevelParameter quality = new ScalableSettingLevelParameter((int)ScalableSettingLevelParameter.Level.Medium, false); static internal GlobalPostProcessingQualitySettings GetPostProcessingQualitySettings() { var pipeline = (HDRenderPipeline)RenderPipelineManager.currentPipeline; if (pipeline != null) { return pipeline.currentPlatformRenderPipelineSettings.postProcessQualitySettings; } // This shouldn't happen ever. return null; } static internal GlobalLightingQualitySettings GetLightingQualitySettings() { var pipeline = (HDRenderPipeline)RenderPipelineManager.currentPipeline; if (pipeline != null) { return pipeline.currentPlatformRenderPipelineSettings.lightingQualitySettings; } // This shouldn't happen ever. return null; } /// /// Returns true if the component uses parameters from the quality settings. /// /// True if the component uses parameters from the quality settings. protected bool UsesQualitySettings() { return !quality.levelAndOverride.useOverride && (HDRenderPipeline)RenderPipelineManager.currentPipeline != null; } } }