using System;
namespace UnityEngine.Rendering.Universal
{
partial class UniversalRenderPipelineGlobalSettings : IShaderVariantSettings
{
[SerializeField] private ShaderStrippingSetting m_ShaderStrippingSetting = new();
[SerializeField] private URPShaderStrippingSetting m_URPShaderStrippingSetting = new();
#pragma warning disable 0414
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] Rendering.ShaderVariantLogLevel m_ShaderVariantLogLevel = Rendering.ShaderVariantLogLevel.Disabled;
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] bool m_ExportShaderVariants = true;
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] bool m_StripDebugVariants = true;
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] bool m_StripUnusedPostProcessingVariants = false;
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] bool m_StripUnusedVariants = true;
[SerializeField, Obsolete("Use ShaderStrippingSetting. #from(23.2)")] bool m_StripScreenCoordOverrideVariants = true;
#pragma warning restore 0414
#region Obsolete properties
///
/// If this property is true, Unity strips the LOD variants if the LOD cross-fade feature (UniversalRenderingPipelineAsset.enableLODCrossFade) is disabled.
///
[Obsolete("No longer used as Shader Prefiltering automatically strips out unused LOD Crossfade variants. Please use the LOD Crossfade setting in the URP Asset to disable the feature if not used. #from(2023.1)", false)]
public bool stripUnusedLODCrossFadeVariants { get => false; set { } }
///
/// Controls whether debug display shaders for Rendering Debugger are available in Player builds.
///
[Obsolete("Please use stripRuntimeDebugShaders instead. #from(23.1)", false)]
public bool supportRuntimeDebugDisplay = false;
#endregion
///
/// Controls the level of logging of shader variant information outputted during the build process.
/// Information appears in the Unity Console when the build finishes.
///
public Rendering.ShaderVariantLogLevel shaderVariantLogLevel
{
get => m_ShaderStrippingSetting.shaderVariantLogLevel;
set => m_ShaderStrippingSetting.shaderVariantLogLevel = value;
}
///
/// Controls whether to output shader variant information to a file.
///
public bool exportShaderVariants
{
get => m_ShaderStrippingSetting.exportShaderVariants;
set => m_ShaderStrippingSetting.exportShaderVariants = value;
}
///
/// When enabled, all debug display shader variants are removed when you build for the Unity Player.
/// This decreases build time, but prevents the use of most Rendering Debugger features in Player builds.
///
public bool stripDebugVariants
{
get => m_ShaderStrippingSetting.stripRuntimeDebugShaders;
set => m_ShaderStrippingSetting.stripRuntimeDebugShaders = value;
}
///
/// Controls whether to automatically strip post processing shader variants based on components.
/// Stripping is done based on VolumeProfiles in project, their usage in scenes is not considered.
///
public bool stripUnusedPostProcessingVariants
{
get => m_URPShaderStrippingSetting.stripUnusedPostProcessingVariants;
set => m_URPShaderStrippingSetting.stripUnusedPostProcessingVariants = value;
}
///
/// Controls whether to strip variants if the feature is disabled.
///
public bool stripUnusedVariants
{
get => m_URPShaderStrippingSetting.stripUnusedVariants;
set => m_URPShaderStrippingSetting.stripUnusedVariants = value;
}
///
/// Controls whether Screen Coordinates Override shader variants are automatically stripped.
///
public bool stripScreenCoordOverrideVariants
{
get => m_URPShaderStrippingSetting.stripScreenCoordOverrideVariants;
set => m_URPShaderStrippingSetting.stripScreenCoordOverrideVariants = value;
}
}
}