No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SerializedUniversalRenderPipelineAsset.cs 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using UnityEditorInternal;
  2. using UnityEngine.Rendering.Universal;
  3. namespace UnityEditor.Rendering.Universal
  4. {
  5. internal class SerializedUniversalRenderPipelineAsset
  6. {
  7. public SerializedProperty rendererDataProp { get; }
  8. public SerializedProperty defaultRendererProp { get; }
  9. public SerializedProperty requireDepthTextureProp { get; }
  10. public SerializedProperty requireOpaqueTextureProp { get; }
  11. public SerializedProperty opaqueDownsamplingProp { get; }
  12. public SerializedProperty supportsTerrainHolesProp { get; }
  13. public SerializedProperty enableLODCrossFadeProp { get; }
  14. public SerializedProperty lodCrossFadeDitheringTypeProp { get; }
  15. public SerializedProperty storeActionsOptimizationProperty { get; }
  16. public SerializedProperty hdr { get; }
  17. public SerializedProperty hdrColorBufferPrecisionProp { get; }
  18. public SerializedProperty msaa { get; }
  19. public SerializedProperty renderScale { get; }
  20. public SerializedProperty upscalingFilter { get; }
  21. public SerializedProperty fsrOverrideSharpness { get; }
  22. public SerializedProperty fsrSharpness { get; }
  23. public SerializedProperty mainLightRenderingModeProp { get; }
  24. public SerializedProperty mainLightShadowsSupportedProp { get; }
  25. public SerializedProperty mainLightShadowmapResolutionProp { get; }
  26. public SerializedProperty shEvalModeProp { get; }
  27. internal SerializedProperty lightProbeSystem;
  28. internal SerializedProperty probeVolumeTextureSize;
  29. internal SerializedProperty probeVolumeBlendingTextureSize;
  30. internal SerializedProperty supportProbeVolumeGPUStreaming;
  31. internal SerializedProperty supportProbeVolumeDiskStreaming;
  32. internal SerializedProperty supportProbeVolumeScenarios;
  33. internal SerializedProperty supportProbeVolumeScenarioBlending;
  34. internal SerializedProperty probeVolumeSHBands;
  35. public SerializedProperty additionalLightsRenderingModeProp { get; }
  36. public SerializedProperty additionalLightsPerObjectLimitProp { get; }
  37. public SerializedProperty additionalLightShadowsSupportedProp { get; }
  38. public SerializedProperty additionalLightShadowmapResolutionProp { get; }
  39. public SerializedProperty additionalLightsShadowResolutionTierLowProp { get; }
  40. public SerializedProperty additionalLightsShadowResolutionTierMediumProp { get; }
  41. public SerializedProperty additionalLightsShadowResolutionTierHighProp { get; }
  42. public SerializedProperty additionalLightCookieResolutionProp { get; }
  43. public SerializedProperty additionalLightCookieFormatProp { get; }
  44. public SerializedProperty reflectionProbeBlendingProp { get; }
  45. public SerializedProperty reflectionProbeBoxProjectionProp { get; }
  46. public SerializedProperty shadowDistanceProp { get; }
  47. public SerializedProperty shadowCascadeCountProp { get; }
  48. public SerializedProperty shadowCascade2SplitProp { get; }
  49. public SerializedProperty shadowCascade3SplitProp { get; }
  50. public SerializedProperty shadowCascade4SplitProp { get; }
  51. public SerializedProperty shadowCascadeBorderProp { get; }
  52. public SerializedProperty shadowDepthBiasProp { get; }
  53. public SerializedProperty shadowNormalBiasProp { get; }
  54. public SerializedProperty softShadowsSupportedProp { get; }
  55. public SerializedProperty softShadowQualityProp { get; }
  56. public SerializedProperty conservativeEnclosingSphereProp { get; }
  57. public SerializedProperty srpBatcher { get; }
  58. public SerializedProperty supportsDynamicBatching { get; }
  59. public SerializedProperty mixedLightingSupportedProp { get; }
  60. public SerializedProperty useRenderingLayers { get; }
  61. public SerializedProperty supportsLightCookies { get; }
  62. public SerializedProperty debugLevelProp { get; }
  63. public SerializedProperty volumeFrameworkUpdateModeProp { get; }
  64. public SerializedProperty volumeProfileProp { get; }
  65. public SerializedProperty colorGradingMode { get; }
  66. public SerializedProperty colorGradingLutSize { get; }
  67. public SerializedProperty allowPostProcessAlphaOutput { get; }
  68. public SerializedProperty useFastSRGBLinearConversion { get; }
  69. public SerializedProperty supportDataDrivenLensFlare { get; }
  70. public SerializedProperty supportScreenSpaceLensFlare { get; }
  71. public SerializedProperty gpuResidentDrawerMode { get; }
  72. public SerializedProperty smallMeshScreenPercentage { get; }
  73. public SerializedProperty gpuResidentDrawerEnableOcclusionCullingInCameras { get; }
  74. #if ADAPTIVE_PERFORMANCE_2_0_0_OR_NEWER
  75. public SerializedProperty useAdaptivePerformance { get; }
  76. #endif
  77. public UniversalRenderPipelineAsset asset { get; }
  78. public SerializedObject serializedObject { get; }
  79. public EditorPrefBoolFlags<EditorUtils.Unit> state;
  80. public SerializedUniversalRenderPipelineAsset(SerializedObject serializedObject)
  81. {
  82. asset = serializedObject.targetObject as UniversalRenderPipelineAsset;
  83. this.serializedObject = serializedObject;
  84. requireDepthTextureProp = serializedObject.FindProperty("m_RequireDepthTexture");
  85. requireOpaqueTextureProp = serializedObject.FindProperty("m_RequireOpaqueTexture");
  86. opaqueDownsamplingProp = serializedObject.FindProperty("m_OpaqueDownsampling");
  87. supportsTerrainHolesProp = serializedObject.FindProperty("m_SupportsTerrainHoles");
  88. enableLODCrossFadeProp = serializedObject.FindProperty("m_EnableLODCrossFade");
  89. lodCrossFadeDitheringTypeProp = serializedObject.FindProperty("m_LODCrossFadeDitheringType");
  90. hdr = serializedObject.FindProperty("m_SupportsHDR");
  91. hdrColorBufferPrecisionProp = serializedObject.FindProperty("m_HDRColorBufferPrecision");
  92. msaa = serializedObject.FindProperty("m_MSAA");
  93. renderScale = serializedObject.FindProperty("m_RenderScale");
  94. upscalingFilter = serializedObject.FindProperty("m_UpscalingFilter");
  95. fsrOverrideSharpness = serializedObject.FindProperty("m_FsrOverrideSharpness");
  96. fsrSharpness = serializedObject.FindProperty("m_FsrSharpness");
  97. shEvalModeProp = serializedObject.FindProperty("m_ShEvalMode");
  98. lightProbeSystem = serializedObject.FindProperty("m_LightProbeSystem");
  99. probeVolumeTextureSize = serializedObject.FindProperty("m_ProbeVolumeMemoryBudget");
  100. probeVolumeBlendingTextureSize = serializedObject.FindProperty("m_ProbeVolumeBlendingMemoryBudget");
  101. supportProbeVolumeGPUStreaming = serializedObject.FindProperty("m_SupportProbeVolumeGPUStreaming");
  102. supportProbeVolumeDiskStreaming = serializedObject.FindProperty("m_SupportProbeVolumeDiskStreaming");
  103. supportProbeVolumeScenarios = serializedObject.FindProperty("m_SupportProbeVolumeScenarios");
  104. supportProbeVolumeScenarioBlending = serializedObject.FindProperty("m_SupportProbeVolumeScenarioBlending");
  105. probeVolumeSHBands = serializedObject.FindProperty("m_ProbeVolumeSHBands");
  106. mainLightRenderingModeProp = serializedObject.FindProperty("m_MainLightRenderingMode");
  107. mainLightShadowsSupportedProp = serializedObject.FindProperty("m_MainLightShadowsSupported");
  108. mainLightShadowmapResolutionProp = serializedObject.FindProperty("m_MainLightShadowmapResolution");
  109. additionalLightsRenderingModeProp = serializedObject.FindProperty("m_AdditionalLightsRenderingMode");
  110. additionalLightsPerObjectLimitProp = serializedObject.FindProperty("m_AdditionalLightsPerObjectLimit");
  111. additionalLightShadowsSupportedProp = serializedObject.FindProperty("m_AdditionalLightShadowsSupported");
  112. additionalLightShadowmapResolutionProp = serializedObject.FindProperty("m_AdditionalLightsShadowmapResolution");
  113. additionalLightsShadowResolutionTierLowProp = serializedObject.FindProperty("m_AdditionalLightsShadowResolutionTierLow");
  114. additionalLightsShadowResolutionTierMediumProp = serializedObject.FindProperty("m_AdditionalLightsShadowResolutionTierMedium");
  115. additionalLightsShadowResolutionTierHighProp = serializedObject.FindProperty("m_AdditionalLightsShadowResolutionTierHigh");
  116. additionalLightCookieResolutionProp = serializedObject.FindProperty("m_AdditionalLightsCookieResolution");
  117. additionalLightCookieFormatProp = serializedObject.FindProperty("m_AdditionalLightsCookieFormat");
  118. reflectionProbeBlendingProp = serializedObject.FindProperty("m_ReflectionProbeBlending");
  119. reflectionProbeBoxProjectionProp = serializedObject.FindProperty("m_ReflectionProbeBoxProjection");
  120. shadowDistanceProp = serializedObject.FindProperty("m_ShadowDistance");
  121. shadowCascadeCountProp = serializedObject.FindProperty("m_ShadowCascadeCount");
  122. shadowCascade2SplitProp = serializedObject.FindProperty("m_Cascade2Split");
  123. shadowCascade3SplitProp = serializedObject.FindProperty("m_Cascade3Split");
  124. shadowCascade4SplitProp = serializedObject.FindProperty("m_Cascade4Split");
  125. shadowCascadeBorderProp = serializedObject.FindProperty("m_CascadeBorder");
  126. shadowDepthBiasProp = serializedObject.FindProperty("m_ShadowDepthBias");
  127. shadowNormalBiasProp = serializedObject.FindProperty("m_ShadowNormalBias");
  128. softShadowsSupportedProp = serializedObject.FindProperty("m_SoftShadowsSupported");
  129. softShadowQualityProp = serializedObject.FindProperty("m_SoftShadowQuality");
  130. conservativeEnclosingSphereProp = serializedObject.FindProperty("m_ConservativeEnclosingSphere");
  131. srpBatcher = serializedObject.FindProperty("m_UseSRPBatcher");
  132. supportsDynamicBatching = serializedObject.FindProperty("m_SupportsDynamicBatching");
  133. mixedLightingSupportedProp = serializedObject.FindProperty("m_MixedLightingSupported");
  134. useRenderingLayers = serializedObject.FindProperty("m_SupportsLightLayers");
  135. supportsLightCookies = serializedObject.FindProperty("m_SupportsLightCookies");
  136. debugLevelProp = serializedObject.FindProperty("m_DebugLevel");
  137. volumeFrameworkUpdateModeProp = serializedObject.FindProperty("m_VolumeFrameworkUpdateMode");
  138. volumeProfileProp = serializedObject.FindProperty("m_VolumeProfile");
  139. storeActionsOptimizationProperty = serializedObject.FindProperty("m_StoreActionsOptimization");
  140. colorGradingMode = serializedObject.FindProperty("m_ColorGradingMode");
  141. colorGradingLutSize = serializedObject.FindProperty("m_ColorGradingLutSize");
  142. allowPostProcessAlphaOutput = serializedObject.FindProperty("m_AllowPostProcessAlphaOutput");
  143. useFastSRGBLinearConversion = serializedObject.FindProperty("m_UseFastSRGBLinearConversion");
  144. supportDataDrivenLensFlare = serializedObject.FindProperty("m_SupportDataDrivenLensFlare");
  145. supportScreenSpaceLensFlare = serializedObject.FindProperty("m_SupportScreenSpaceLensFlare");
  146. gpuResidentDrawerMode = serializedObject.FindProperty("m_GPUResidentDrawerMode");
  147. smallMeshScreenPercentage = serializedObject.FindProperty("m_SmallMeshScreenPercentage");
  148. gpuResidentDrawerEnableOcclusionCullingInCameras = serializedObject.FindProperty("m_GPUResidentDrawerEnableOcclusionCullingInCameras");
  149. #if ADAPTIVE_PERFORMANCE_2_0_0_OR_NEWER
  150. useAdaptivePerformance = serializedObject.FindProperty("m_UseAdaptivePerformance");
  151. #endif
  152. string Key = "Universal_Shadow_Setting_Unit:UI_State";
  153. state = new EditorPrefBoolFlags<EditorUtils.Unit>(Key);
  154. }
  155. /// <summary>
  156. /// Refreshes the serialized object
  157. /// </summary>
  158. public void Update()
  159. {
  160. serializedObject.Update();
  161. }
  162. /// <summary>
  163. /// Applies the modified properties of the serialized object
  164. /// </summary>
  165. public void Apply()
  166. {
  167. serializedObject.ApplyModifiedProperties();
  168. }
  169. }
  170. }