Julien Ignace
8 年前
当前提交
c25417c7
共有 8 个文件被更改,包括 116 次插入 和 24 次删除
-
16Assets/ScriptableRenderPipeline/Core/Debugging/DebugItemHandler.cs
-
1Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuManager.cs
-
15Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuUI.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanel.cs
-
14Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanelUI.cs
-
2Assets/ScriptableRenderPipeline/Core/Debugging/Editor/DebugMenuEditor.cs
-
70Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs.meta
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class LightingDebugPanelUI |
|||
: DebugPanelUI |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
public override void OnEditorGUI() |
|||
{ |
|||
using (new UnityEditor.EditorGUILayout.VerticalScope()) |
|||
{ |
|||
m_DebugPanel.GetDebugItem("Enable Shadows").handler.OnEditorGUI(); |
|||
|
|||
DebugItem shadowDebug = m_DebugPanel.GetDebugItem("Shadow Debug Mode"); |
|||
shadowDebug.handler.OnEditorGUI(); |
|||
if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeShadowMap) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Shadow Map Index").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
DebugItem lightingDebugModeItem = m_DebugPanel.GetDebugItem("Lighting Debug Mode"); |
|||
lightingDebugModeItem.handler.OnEditorGUI(); |
|||
if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.SpecularLighting) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem("Override Smoothness"); |
|||
overrideSmoothnessItem.handler.OnEditorGUI(); |
|||
if ((bool)overrideSmoothnessItem.GetValue()) |
|||
{ |
|||
m_DebugPanel.GetDebugItem("Override Smoothness Value").handler.OnEditorGUI(); |
|||
} |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
else if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.DiffuseLighting) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Debug Lighting Albedo").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
|
|||
DebugItem displaySkyReflecItem = m_DebugPanel.GetDebugItem("Display Sky Reflection"); |
|||
displaySkyReflecItem.handler.OnEditorGUI(); |
|||
if ((bool)displaySkyReflecItem.GetValue()) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Sky Reflection Mipmap").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
} |
|||
} |
|||
#endif
|
|||
} |
|||
|
|||
public class LightingDebugPanel |
|||
: DebugPanel<LightingDebugPanelUI> |
|||
{ |
|||
public LightingDebugPanel() |
|||
: base("Lighting") |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 19cc6398a661be547848eb23d58699cf |
|||
timeCreated: 1495638676 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue