Skip to content

Commit dfcba6e

Browse files
remi-chapelainsebastienlagarde
authored andcommitted
Add support for lighting full screen debug mode for HDRP tests #4367
1 parent 984056f commit dfcba6e

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [10.6.0] - 2021-04-29
88

9-
Version Updated
10-
The version number for this package has increased due to a version update of a related graphics package.
9+
### Added
10+
- Added support for lighting full screen debug mode in automated tests.
1111

1212
## [10.5.0] - 2021-04-19
1313

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

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

301+
/// <summary>List of Full Screen Lighting Debug mode names.</summary>
302+
public static GUIContent[] lightingFullScreenDebugStrings => s_LightingFullScreenDebugStrings;
303+
/// <summary>List of Full Screen Lighting Debug mode values.</summary>
304+
public static int[] lightingFullScreenDebugValues => s_LightingFullScreenDebugValues;
305+
301306
internal DebugDisplaySettings()
302307
{
303308
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)