// This file should be used as a container for things on its // way to being deprecated and removed in future releases using System; using System.ComponentModel; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; namespace UnityEngine.Rendering.Universal { public abstract partial class ScriptableRenderPass { // This callback method will be removed. Please use OnCameraCleanup() instead. /// /// Cleanup any allocated resources that were created during the execution of this render pass. /// /// Use this CommandBuffer to cleanup any generated data. [EditorBrowsable(EditorBrowsableState.Never)] public virtual void FrameCleanup(CommandBuffer cmd) => OnCameraCleanup(cmd); } namespace Internal { public partial class AdditionalLightsShadowCasterPass { /// /// The ID for the additional shadows buffer ID. /// This has been deprecated. Shadow slice matrix is now passed to the GPU using an entry in buffer m_AdditionalLightsWorldToShadow_SSBO. /// [Obsolete("AdditionalLightsShadowCasterPass.m_AdditionalShadowsBufferId was deprecated. Shadow slice matrix is now passed to the GPU using an entry in buffer m_AdditionalLightsWorldToShadow_SSBO", true)] public static int m_AdditionalShadowsBufferId; /// /// The ID for the additional shadows buffer ID. /// This has been deprecated. hadow slice index is now passed to the GPU using last member of an entry in buffer m_AdditionalShadowParams_SSBO. /// [Obsolete("AdditionalLightsShadowCasterPass.m_AdditionalShadowsIndicesId was deprecated. Shadow slice index is now passed to the GPU using last member of an entry in buffer m_AdditionalShadowParams_SSBO", true)] public static int m_AdditionalShadowsIndicesId; } } /// /// Previously contained the settings to control how many cascades to use. It is now deprecated. /// [Obsolete("This is obsolete, please use shadowCascadeCount instead.", true)] public enum ShadowCascadesOption { /// /// No cascades used for the shadows /// NoCascades, /// /// Two cascades used for the shadows /// TwoCascades, /// /// Four cascades used for the shadows /// FourCascades, } /// /// Specifies the logging level for shader variants. /// This is obsolete, UnityEngine.Rendering.ShaderVariantLogLevel instead. /// [Obsolete("This is obsolete, UnityEngine.Rendering.ShaderVariantLogLevel instead.", true)] public enum ShaderVariantLogLevel { /// Disable all log for shader variants. Disabled, /// Only logs SRP Shaders when logging shader variants. [InspectorName("Only URP Shaders")] OnlyUniversalRPShaders, /// Logs all shader variants. [InspectorName("All Shaders")] AllShaders } public partial class UniversalRenderPipelineAsset { #if UNITY_EDITOR [Obsolete("Editor resources are stored directly into GraphicsSettings. #from(23.3)", false)] public static readonly string editorResourcesGUID = "a3d8d823eedde654bb4c11a1cfaf1abb"; #endif [SerializeField] int m_ShaderVariantLogLevel; #pragma warning disable 618 // Obsolete warning /// /// Previously returned the shader variant log level for this Render Pipeline Asset but is now deprecated. /// [Obsolete("Use GraphicsSettings.GetRenderPipelineSettings().shaderVariantLogLevel instead.", true)] public ShaderVariantLogLevel shaderVariantLogLevel { get => (ShaderVariantLogLevel)GraphicsSettings.GetRenderPipelineSettings().shaderVariantLogLevel; set => GraphicsSettings.GetRenderPipelineSettings().shaderVariantLogLevel = (Rendering.ShaderVariantLogLevel)value; } #pragma warning restore 618 // Obsolete warning #pragma warning disable 618 // Obsolete warning [Obsolete("This is obsolete, please use shadowCascadeCount instead.", false)] [SerializeField] ShadowCascadesOption m_ShadowCascades = ShadowCascadesOption.NoCascades; /// /// Previously used insted of shadowCascadeCount. Please use that instead. /// [Obsolete("This is obsolete, please use shadowCascadeCount instead.", true)] public ShadowCascadesOption shadowCascadeOption { get { switch (shadowCascadeCount) { case 1: return ShadowCascadesOption.NoCascades; case 2: return ShadowCascadesOption.TwoCascades; case 4: return ShadowCascadesOption.FourCascades; default: throw new InvalidOperationException("Cascade count is not compatible with obsolete API, please use shadowCascadeCount instead."); } ; } set { switch (value) { case ShadowCascadesOption.NoCascades: shadowCascadeCount = 1; break; case ShadowCascadesOption.TwoCascades: shadowCascadeCount = 2; break; case ShadowCascadesOption.FourCascades: shadowCascadeCount = 4; break; default: throw new InvalidOperationException("Cascade count is not compatible with obsolete API, please use shadowCascadeCount instead."); } } } #pragma warning restore 618 // Obsolete warning /// /// Class containing texture resources used in URP. /// [Serializable, ReloadGroup] [Obsolete("Moved to UniversalRenderPipelineRuntimeTextures on GraphicsSettings. #from(2023.3)", false)] public sealed class TextureResources { /// /// Pre-baked blue noise textures. /// [Reload("Textures/BlueNoise64/L/LDR_LLL1_0.png")] public Texture2D blueNoise64LTex; /// /// Bayer matrix texture. /// [Reload("Textures/BayerMatrix.png")] public Texture2D bayerMatrixTex; /// /// Check if the textures need reloading. /// /// True if any of the textures need reloading. public bool NeedsReload() { return blueNoise64LTex == null || bayerMatrixTex == null; } } [Obsolete("Moved to UniversalRenderPipelineRuntimeTextures on GraphicsSettings. #from(2023.3)", false)] [SerializeField] TextureResources m_Textures; /// /// Returns asset texture resources /// [Obsolete("Moved to UniversalRenderPipelineRuntimeTextures on GraphicsSettings. #from(2023.3)", false)] public TextureResources textures { get { if (m_Textures == null) m_Textures = new TextureResources(); #if UNITY_EDITOR if (m_Textures.NeedsReload()) ResourceReloader.ReloadAllNullIn(this, packagePath); #endif return m_Textures; } } } public abstract partial class ScriptableRenderer { // Deprecated in 10.x /// /// The render target identifier for camera depth. /// This is obsolete, cameraDepth has been renamed to cameraDepthTarget. /// [Obsolete("cameraDepth has been renamed to cameraDepthTarget. (UnityUpgradable) -> cameraDepthTarget", true)] [EditorBrowsable(EditorBrowsableState.Never)] public RenderTargetIdentifier cameraDepth { get => m_CameraDepthTarget.nameID; } } public abstract partial class ScriptableRendererData { /// /// Class contains references to shader resources used by Rendering Debugger. /// [Obsolete("Moved to UniversalRenderPipelineDebugShaders on GraphicsSettings. #from(2023.3)", false)] [Serializable, ReloadGroup] public sealed class DebugShaderResources { /// /// Debug shader used to output interpolated vertex attributes. /// [Obsolete("Moved to UniversalRenderPipelineDebugShaders on GraphicsSettings. #from(2023.3)", false)] [Reload("Shaders/Debug/DebugReplacement.shader")] public Shader debugReplacementPS; /// /// Debug shader used to output HDR Chromacity mapping. /// [Obsolete("Moved to UniversalRenderPipelineDebugShaders on GraphicsSettings. #from(2023.3)", false)] [Reload("Shaders/Debug/HDRDebugView.shader")] public Shader hdrDebugViewPS; #if UNITY_EDITOR /// /// Debug shader used to output world position and world normal for the pixel under the cursor. /// [Obsolete("Moved to UniversalRenderPipelineDebugShaders on GraphicsSettings. #from(2023.3)", false)] [Reload("Shaders/Debug/ProbeVolumeSamplingDebugPositionNormal.compute")] public ComputeShader probeVolumeSamplingDebugComputeShader; #endif } /// /// Container for shader resources used by Rendering Debugger. /// [Obsolete("Moved to UniversalRenderPipelineDebugShaders on GraphicsSettings. #from(2023.3)", false)] public DebugShaderResources debugShaders; /// /// Class contains references to shader resources used by APV. /// [Serializable, ReloadGroup] [Obsolete("Probe volume debug resource are now in the ProbeVolumeDebugResources class.")] public sealed class ProbeVolumeResources { /// /// Debug shader used to render probes in the volume. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Shader probeVolumeDebugShader; /// /// Debug shader used to display fragmentation of the GPU memory. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Shader probeVolumeFragmentationDebugShader; /// /// Debug shader used to draw the offset direction used for a probe. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Shader probeVolumeOffsetDebugShader; /// /// Debug shader used to draw the sampling weights of the probe volume. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Shader probeVolumeSamplingDebugShader; /// /// Debug mesh used to draw the sampling weights of the probe volume. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Mesh probeSamplingDebugMesh; /// /// Texture with the numbers dor sampling weights. /// [Obsolete("This shader is now in the ProbeVolumeDebugResources class.")] public Texture2D probeSamplingDebugTexture; /// /// Compute Shader used for Blending. /// [Obsolete("This shader is now in the ProbeVolumeRuntimeResources class.")] public ComputeShader probeVolumeBlendStatesCS; } /// /// Probe volume resources used by URP /// [Obsolete("Probe volume debug resource are now in the ProbeVolumeDebugResources class.")] public ProbeVolumeResources probeVolumeResources; } public sealed partial class Bloom : VolumeComponent, IPostProcessComponent { // Deprecated in 13.x.x /// /// The number of final iterations to skip in the effect processing sequence. /// This is obsolete, please use maxIterations instead. /// [Obsolete("This is obsolete, please use maxIterations instead.", true)] [Tooltip("The number of final iterations to skip in the effect processing sequence.")] public ClampedIntParameter skipIterations = new ClampedIntParameter(1, 0, 16); } /// /// Class containing shader resources needed in URP for XR. /// /// [Serializable] [Obsolete("Moved to UniversalRenderPipelineRuntimeXRResources on GraphicsSettings. #from(2023.3)", false)] public class XRSystemData : ScriptableObject { /// /// Class containing shader resources used in URP for XR. /// [Serializable, ReloadGroup] [Obsolete("Moved to UniversalRenderPipelineRuntimeXRResources on GraphicsSettings. #from(2023.3)", false)] public sealed class ShaderResources { /// /// XR Occlusion mesh shader. /// [Reload("Shaders/XR/XROcclusionMesh.shader")] public Shader xrOcclusionMeshPS; /// /// XR Mirror View shader. /// [Reload("Shaders/XR/XRMirrorView.shader")] public Shader xrMirrorViewPS; } /// /// Shader resources used in URP for XR. /// [Obsolete("Moved to UniversalRenderPipelineRuntimeXRResources on GraphicsSettings. #from(2023.3)", false)] public ShaderResources shaders; } public partial class UniversalRendererData { #if ENABLE_VR && ENABLE_XR_MODULE /// /// Shader resources needed in URP for XR. /// [Obsolete("Moved to UniversalRenderPipelineRuntimeXRResources on GraphicsSettings. #from(2023.3)", false)] //[Reload("Runtime/Data/XRSystemData.asset")] public XRSystemData xrSystemData; #endif } /// Class containing shader and texture resources needed in URP. /// /// /// [Obsolete("Moved to GraphicsSettings. #from(23.3)", false)] public class UniversalRenderPipelineEditorResources : ScriptableObject { /// /// Class containing shader resources used in URP. /// [Serializable, ReloadGroup] [Obsolete("UniversalRenderPipelineEditorResources.ShaderResources is obsolete GraphicsSettings.TryGetRenderPipelineSettings(). #from(23.3)", false)] public sealed class ShaderResources { /// /// Autodesk Interactive ShaderGraph shader. /// [Reload("Shaders/AutodeskInteractive/AutodeskInteractive.shadergraph")] public Shader autodeskInteractivePS; /// /// Autodesk Interactive Transparent ShaderGraph shader. /// [Reload("Shaders/AutodeskInteractive/AutodeskInteractiveTransparent.shadergraph")] public Shader autodeskInteractiveTransparentPS; /// /// Autodesk Interactive Masked ShaderGraph shader. /// [Reload("Shaders/AutodeskInteractive/AutodeskInteractiveMasked.shadergraph")] public Shader autodeskInteractiveMaskedPS; /// /// Terrain Detail Lit shader. /// [Reload("Shaders/Terrain/TerrainDetailLit.shader")] public Shader terrainDetailLitPS; /// /// Terrain Detail Grass shader. /// [Reload("Shaders/Terrain/WavingGrass.shader")] public Shader terrainDetailGrassPS; /// /// Waving Grass Billboard shader. /// [Reload("Shaders/Terrain/WavingGrassBillboard.shader")] public Shader terrainDetailGrassBillboardPS; /// /// SpeedTree7 shader. /// [Reload("Shaders/Nature/SpeedTree7.shader")] public Shader defaultSpeedTree7PS; /// /// SpeedTree8 ShaderGraph shader. /// [Reload("Shaders/Nature/SpeedTree8_PBRLit.shadergraph")] public Shader defaultSpeedTree8PS; } /// /// Class containing material resources used in URP. /// [Serializable, ReloadGroup] [Obsolete("UniversalRenderPipelineEditorResources.MaterialResources is obsolete GraphicsSettings.TryGetRenderPipelineSettings(). #from(23.3)", false)] public sealed class MaterialResources { /// /// Lit material. /// [Reload("Runtime/Materials/Lit.mat")] public Material lit; // particleLit is the URP default material for new particle systems. // ParticlesUnlit.mat is closest match to the built-in shader. // This is correct (current 22.2) despite the Lit/Unlit naming conflict. /// /// Particle Lit material. /// [Reload("Runtime/Materials/ParticlesUnlit.mat")] public Material particleLit; /// /// Terrain Lit material. /// [Reload("Runtime/Materials/TerrainLit.mat")] public Material terrainLit; /// /// Decal material. /// [Reload("Runtime/Materials/Decal.mat")] public Material decal; } /// /// Shader resources used in URP. /// [Obsolete("UniversalRenderPipelineEditorResources.ShaderResources is obsolete GraphicsSettings.TryGetRenderPipelineSettings(). #from(23.3)", false)] public ShaderResources shaders; /// /// Material resources used in URP. /// [Obsolete("UniversalRenderPipelineEditorResources.MaterialResources is obsolete GraphicsSettings.TryGetRenderPipelineSettings(). #from(23.3)", false)] public MaterialResources materials; } #if UNITY_EDITOR [UnityEditor.CustomEditor(typeof(UniversalRenderPipelineEditorResources), true)] [Obsolete("Deprectated alongside with UniversalRenderPipelineEditorResources. #from(23.3)", false)] class UniversalRenderPipelineEditorResourcesEditor : UnityEditor.Editor { /// public override void OnInspectorGUI() { DrawDefaultInspector(); // Add a "Reload All" button in inspector when we are in developer's mode if (UnityEditor.EditorPrefs.GetBool("DeveloperMode") && GUILayout.Button("Reload All")) { var resources = target as UniversalRenderPipelineEditorResources; resources.materials = null; resources.shaders = null; ResourceReloader.ReloadAllNullIn(target, UniversalRenderPipelineAsset.packagePath); } } } #endif /// /// Class containing shader resources used in URP. /// [Serializable, ReloadGroup] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public sealed class ShaderResources { /// /// Blit shader. /// [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] [Reload("Shaders/Utils/Blit.shader")] public Shader blitPS; /// /// Copy Depth shader. /// [Reload("Shaders/Utils/CopyDepth.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader copyDepthPS; /// /// Screen Space Shadows shader. /// [Obsolete("Obsolete, this feature will be supported by new 'ScreenSpaceShadows' renderer feature", true)] public Shader screenSpaceShadowPS = null; /// /// Sampling shader. /// [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] [Reload("Shaders/Utils/Sampling.shader")] public Shader samplingPS; /// /// Stencil Deferred shader. /// [Reload("Shaders/Utils/StencilDeferred.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader stencilDeferredPS; /// /// Fallback error shader. /// [Reload("Shaders/Utils/FallbackError.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader fallbackErrorPS; /// /// Fallback loading shader. /// [Reload("Shaders/Utils/FallbackLoading.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader fallbackLoadingPS; /// /// Material Error shader. /// [Obsolete("Use fallbackErrorPS instead", true)] public Shader materialErrorPS = null; // Core blitter shaders, adapted from HDRP // TODO: move to core and share with HDRP [Reload("Shaders/Utils/CoreBlit.shader"), SerializeField] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] internal Shader coreBlitPS; [Reload("Shaders/Utils/CoreBlitColorAndDepth.shader"), SerializeField] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] internal Shader coreBlitColorAndDepthPS; /// /// Blit shader that blits UI Overlay and performs HDR encoding. /// [Reload("Shaders/Utils/BlitHDROverlay.shader"), SerializeField] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] internal Shader blitHDROverlay; /// /// Camera Motion Vectors shader. /// [Reload("Shaders/CameraMotionVectors.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader cameraMotionVector; /// /// Screen Space Lens Flare shader. /// [Reload("Shaders/PostProcessing/LensFlareScreenSpace.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader screenSpaceLensFlare; /// /// Data Driven Lens Flare shader. /// [Reload("Shaders/PostProcessing/LensFlareDataDriven.shader")] [Obsolete("Moved to UniversalRenderPipelineRuntimeShaders on GraphicsSettings. #from(2023.3)", false)] public Shader dataDrivenLensFlare; } partial class UniversalRenderPipelineGlobalSettings { #pragma warning disable 0414 [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal ShaderStrippingSetting m_ShaderStrippingSetting = new(); [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal URPShaderStrippingSetting m_URPShaderStrippingSetting = new(); [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal Rendering.ShaderVariantLogLevel m_ShaderVariantLogLevel = Rendering.ShaderVariantLogLevel.Disabled; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_ExportShaderVariants = true; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_StripDebugVariants = true; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_StripUnusedPostProcessingVariants = false; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_StripUnusedVariants = true; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_StripScreenCoordOverrideVariants = true; #pragma warning restore 0414 /// /// 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; [SerializeField, Obsolete("Keep for migration. #from(23.2)")] internal bool m_EnableRenderGraph; } }