Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

URPShaderStrippingSetting.cs 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// Class that stores the shader stripping settings that are specific for <see cref="UniversalRenderPipeline"/>
  6. /// </summary>
  7. [Serializable]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [Categorization.CategoryInfo(Name = "Additional Shader Stripping Settings", Order = 40)]
  10. [Categorization.ElementInfo(Order = 10)]
  11. public class URPShaderStrippingSetting : IRenderPipelineGraphicsSettings
  12. {
  13. #region Version
  14. internal enum Version : int
  15. {
  16. Initial = 0,
  17. }
  18. [SerializeField][HideInInspector]
  19. private Version m_Version;
  20. /// <summary>Current version.</summary>
  21. public int version => (int)m_Version;
  22. #endregion
  23. #region SerializeFields
  24. [SerializeField]
  25. [Tooltip("Controls whether to automatically strip post processing shader variants based on VolumeProfile components. Stripping is done based on VolumeProfiles in project, their usage in scenes is not considered.")]
  26. bool m_StripUnusedPostProcessingVariants = false;
  27. [SerializeField]
  28. [Tooltip("Controls whether to strip variants if the feature is disabled.")]
  29. bool m_StripUnusedVariants = true;
  30. [SerializeField]
  31. [Tooltip("Controls whether Screen Coordinates Override shader variants are automatically stripped.")]
  32. bool m_StripScreenCoordOverrideVariants = true;
  33. #endregion
  34. #region Data Accessors
  35. /// <summary>
  36. /// Controls whether to automatically strip post processing shader variants based on <see cref="VolumeProfile"/> components.
  37. /// Stripping is done based on VolumeProfiles in project, their usage in scenes is not considered.
  38. /// </summary>
  39. public bool stripUnusedPostProcessingVariants
  40. {
  41. get => m_StripUnusedPostProcessingVariants;
  42. set => this.SetValueAndNotify(ref m_StripUnusedPostProcessingVariants, value);
  43. }
  44. /// <summary>
  45. /// Controls whether to strip variants if the feature is disabled.
  46. /// </summary>
  47. public bool stripUnusedVariants
  48. {
  49. get => m_StripUnusedVariants;
  50. set => this.SetValueAndNotify(ref m_StripUnusedVariants, value);
  51. }
  52. /// <summary>
  53. /// Controls whether Screen Coordinates Override shader variants are automatically stripped.
  54. /// </summary>
  55. public bool stripScreenCoordOverrideVariants
  56. {
  57. get => m_StripScreenCoordOverrideVariants;
  58. set => this.SetValueAndNotify(ref m_StripScreenCoordOverrideVariants, value);
  59. }
  60. #endregion
  61. }
  62. }