|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Text; |
1 | 4 | using UnityEngine;
|
| 5 | +using UnityEngine.Experimental.Rendering; |
2 | 6 | using UnityEngine.Rendering;
|
3 | 7 | using UnityEngine.Rendering.HighDefinition;
|
4 |
| -using System.Text; |
5 |
| -using UnityEngine.Experimental.Rendering; |
6 | 8 | using static UnityEngine.Rendering.HighDefinition.RenderPipelineSettings;
|
7 | 9 |
|
8 | 10 | namespace UnityEditor.Rendering.HighDefinition
|
@@ -198,8 +200,6 @@ static void Drawer_SectionGeneral(SerializedHDRenderPipelineAsset serialized, Ed
|
198 | 200 | EditorGUILayout.PropertyField(serialized.lensAttenuation, Styles.GeneralSection.lensAttenuationModeContent);
|
199 | 201 | EditorGUILayout.PropertyField(serialized.useRenderGraph, Styles.GeneralSection.useRenderGraphContent);
|
200 | 202 |
|
201 |
| - EditorGUILayout.PropertyField(serialized.highDefinitionExtensionsEnabled, Styles.highDefinitionExtensionsEnabled); |
202 |
| - |
203 | 203 | m_ShowLightLayerNames = EditorGUILayout.Foldout(m_ShowLightLayerNames, Styles.lightLayerNamesText, true);
|
204 | 204 | if (m_ShowLightLayerNames)
|
205 | 205 | {
|
@@ -320,7 +320,7 @@ static void Drawer_SectionReflection(SerializedHDRenderPipelineAsset serialized,
|
320 | 320 | if (EditorGUI.EndChangeCheck())
|
321 | 321 | serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue = Mathf.Clamp(serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue, 1, ShaderVariablesGlobal.s_MaxEnv2DLight);
|
322 | 322 | }
|
323 |
| - |
| 323 | + |
324 | 324 | EditorGUILayout.Space();
|
325 | 325 |
|
326 | 326 | EditorGUI.BeginChangeCheck();
|
@@ -409,7 +409,7 @@ static void Drawer_SectionShadows(SerializedHDRenderPipelineAsset serialized, Ed
|
409 | 409 | --EditorGUI.indentLevel;
|
410 | 410 |
|
411 | 411 | ++EditorGUI.indentLevel;
|
412 |
| - // Because we don't know if the asset is old and had the cached shadow map resolution field, if it was set as default float (0) we force a default. |
| 412 | + // Because we don't know if the asset is old and had the cached shadow map resolution field, if it was set as default float (0) we force a default. |
413 | 413 | if (serialized.renderPipelineSettings.hdShadowInitParams.cachedPunctualShadowAtlasResolution.intValue == 0)
|
414 | 414 | {
|
415 | 415 | serialized.renderPipelineSettings.hdShadowInitParams.cachedPunctualShadowAtlasResolution.intValue = 2048;
|
@@ -472,14 +472,26 @@ static void Drawer_SectionDecalSettings(SerializedHDRenderPipelineAsset serializ
|
472 | 472 | if (EditorGUI.EndChangeCheck())
|
473 | 473 | serialized.renderPipelineSettings.decalSettings.atlasHeight.intValue = Mathf.Max(serialized.renderPipelineSettings.decalSettings.atlasHeight.intValue, 0);
|
474 | 474 |
|
| 475 | + EditorGUI.BeginChangeCheck(); |
475 | 476 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.decalSettings.perChannelMask, Styles.metalAndAOContent);
|
| 477 | + if (EditorGUI.EndChangeCheck()) |
| 478 | + { |
| 479 | + // Tell VFX |
| 480 | + ((HDRenderPipelineEditor)owner).needRefreshVfxWarnings = true; |
| 481 | + } |
476 | 482 |
|
477 | 483 | EditorGUI.BeginChangeCheck();
|
478 | 484 | EditorGUILayout.DelayedIntField(serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen, Styles.maxDecalContent);
|
479 | 485 | if (EditorGUI.EndChangeCheck())
|
480 | 486 | serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen.intValue = Mathf.Clamp(serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen.intValue, 1, HDRenderPipeline.k_MaxDecalsOnScreen);
|
481 | 487 |
|
| 488 | + EditorGUI.BeginChangeCheck(); |
482 | 489 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportDecalLayers, Styles.supportDecalLayersContent);
|
| 490 | + if (EditorGUI.EndChangeCheck()) |
| 491 | + { |
| 492 | + // Tell VFX |
| 493 | + ((HDRenderPipelineEditor)owner).needRefreshVfxWarnings = true; |
| 494 | + } |
483 | 495 | }
|
484 | 496 | --EditorGUI.indentLevel;
|
485 | 497 | }
|
@@ -925,26 +937,17 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri
|
925 | 937 | // MSAA is an option that is only available in full forward but Camera can be set in Full Forward only. Thus MSAA have no dependency currently
|
926 | 938 | //Note: do not use SerializedProperty.enumValueIndex here as this enum not start at 0 as it is used as flags.
|
927 | 939 | bool msaaAllowed = true;
|
928 |
| - bool hasRayTracing = false; |
929 | 940 | for (int index = 0; index < serialized.serializedObject.targetObjects.Length && msaaAllowed; ++index)
|
930 | 941 | {
|
931 |
| - var settings = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings; |
932 |
| - var litShaderMode = settings.supportedLitShaderMode; |
933 |
| - bool rayTracedSupported = settings.supportRayTracing; |
934 |
| - hasRayTracing |= rayTracedSupported; |
935 |
| - msaaAllowed &= (litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both) && !rayTracedSupported; |
| 942 | + var litShaderMode = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings.supportedLitShaderMode; |
| 943 | + msaaAllowed &= litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both; |
936 | 944 | }
|
937 |
| - |
938 | 945 | using (new EditorGUI.DisabledScope(!msaaAllowed))
|
939 | 946 | {
|
940 | 947 | ++EditorGUI.indentLevel;
|
941 | 948 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.MSAASampleCount, Styles.MSAASampleCountContent);
|
942 | 949 | --EditorGUI.indentLevel;
|
943 | 950 | }
|
944 |
| - if (hasRayTracing && serialized.renderPipelineSettings.MSAASampleCount.intValue != (int)MSAASamples.None) |
945 |
| - { |
946 |
| - EditorGUILayout.HelpBox(Styles.rayTracingMSAAUnsupported.text, MessageType.Info, wide: true); |
947 |
| - } |
948 | 951 |
|
949 | 952 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportMotionVectors, Styles.supportMotionVectorContent);
|
950 | 953 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportRuntimeDebugDisplay, Styles.supportRuntimeDebugDisplayContent);
|
@@ -1116,7 +1119,7 @@ static void Drawer_SectionMaterialUnsorted(SerializedHDRenderPipelineAsset seria
|
1116 | 1119 | }
|
1117 | 1120 |
|
1118 | 1121 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightLoopSettings.supportFabricConvolution, Styles.supportFabricBSDFConvolutionContent);
|
1119 |
| - |
| 1122 | + |
1120 | 1123 | EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportMaskVolume, Styles.supportMaskVolumeContent);
|
1121 | 1124 | using (new EditorGUI.DisabledScope(!serialized.renderPipelineSettings.supportMaskVolume.boolValue))
|
1122 | 1125 | {
|
|
0 commit comments