Skip to content

Commit d983ccd

Browse files
Add support for lighting full screen debug mode for HDRP tests (#4367)
* Add support for lighting full screen debug mode for tests * changelog
1 parent 8927681 commit d983ccd

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4747
- Added support for alpha channel in FXAA (case 1323941).
4848
- Added Speed Tree 8 shader graph as default Speed Tree 8 shader for HDRP.
4949
- Added the multicompile for dynamic lightmaps to support enlighten in ray tracing (case 1318927).
50+
- Added support for lighting full screen debug mode in automated tests.
5051

5152
### Fixed
5253
- Fixed Intensity Multiplier not affecting realtime global illumination.

com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ internal void ResetExclusiveEnumIndices()
302302
/// <summary>List of Full Screen Rendering Debug mode values.</summary>
303303
public static int[] renderingFullScreenDebugValues => s_RenderingFullScreenDebugValues;
304304

305+
/// <summary>List of Full Screen Lighting Debug mode names.</summary>
306+
public static GUIContent[] lightingFullScreenDebugStrings => s_LightingFullScreenDebugStrings;
307+
/// <summary>List of Full Screen Lighting Debug mode values.</summary>
308+
public static int[] lightingFullScreenDebugValues => s_LightingFullScreenDebugValues;
309+
305310
internal DebugDisplaySettings()
306311
{
307312
FillFullScreenDebugEnum(ref s_LightingFullScreenDebugStrings, ref s_LightingFullScreenDebugValues, FullScreenDebugMode.MinLightingFullScreenDebug, FullScreenDebugMode.MaxLightingFullScreenDebug);

com.unity.testing.hdrp/Scripts/DebugViewController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public enum SettingType { Material, Lighting, Rendering }
1919

2020
[Header("Lighting")]
2121
[SerializeField] bool lightlayers = false;
22+
[SerializeField] int lightingFullScreenDebugMode = 0;
2223

2324
[ContextMenu("Set Debug View")]
2425
public void SetDebugView()
@@ -33,7 +34,8 @@ public void SetDebugView()
3334
case SettingType.Lighting:
3435
hdPipeline.debugDisplaySettings.SetDebugLightLayersMode(lightlayers);
3536
hdPipeline.debugDisplaySettings.data.lightingDebugSettings.debugLightLayersFilterMask = (DebugLightLayersMask)0b10111101;
36-
break;
37+
hdPipeline.debugDisplaySettings.SetFullScreenDebugMode((FullScreenDebugMode) lightingFullScreenDebugMode);
38+
break;
3739
case SettingType.Rendering:
3840
hdPipeline.debugDisplaySettings.SetFullScreenDebugMode((FullScreenDebugMode) fullScreenDebugMode);
3941
break;

com.unity.testing.hdrp/Scripts/Editor/DebugViewController_Editor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class DebugViewController_Editor : Editor
1212

1313
SerializedProperty s_gBuffer;
1414
SerializedProperty s_fullScreenDebugMode;
15+
SerializedProperty s_lightingFullScreenDebugMode;
1516

1617
SerializedProperty s_lightlayers;
1718

@@ -21,6 +22,7 @@ public void OnEnable()
2122

2223
s_gBuffer = serializedObject.FindProperty("gBuffer");
2324
s_fullScreenDebugMode = serializedObject.FindProperty("fullScreenDebugMode");
25+
s_lightingFullScreenDebugMode = serializedObject.FindProperty("lightingFullScreenDebugMode");
2426
s_lightlayers = serializedObject.FindProperty("lightlayers");
2527
}
2628

@@ -45,7 +47,8 @@ public override void OnInspectorGUI()
4547

4648
case DebugViewController.SettingType.Lighting:
4749
s_lightlayers.boolValue = GUILayout.Toggle(s_lightlayers.boolValue, "Light Layers Visualization");
48-
break;
50+
s_lightingFullScreenDebugMode.intValue = EditorGUILayout.IntPopup(new GUIContent("Fullscreen Debug Mode"), s_lightingFullScreenDebugMode.intValue, DebugDisplaySettings.lightingFullScreenDebugStrings, DebugDisplaySettings.lightingFullScreenDebugValues);
51+
break;
4952

5053
case DebugViewController.SettingType.Rendering:
5154
s_fullScreenDebugMode.intValue = EditorGUILayout.IntPopup(new GUIContent("Fullscreen Debug Mode"), s_fullScreenDebugMode.intValue, DebugDisplaySettings.renderingFullScreenDebugStrings, DebugDisplaySettings.renderingFullScreenDebugValues);

0 commit comments

Comments
 (0)