浏览代码

Debug View UI

/projects-TheLastStand
John Parsaie 7 年前
当前提交
3c431a3b
共有 2 个文件被更改,包括 22 次插入0 次删除
  1. 17
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs
  2. 5
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/LightweightAssetEditor.cs

17
ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs


UnityBuiltinDefault
}
public enum DebugViewMode
{
None = 0,
Albedo,
Normals,
Metallness,
Roughness,
All
};
public class LightweightPipelineAsset : RenderPipelineAsset
{
private const int PACKAGE_MANAGER_PATH_INDEX = 1;

[SerializeField] private float m_Cascade2Split = 0.25f;
[SerializeField] private Vector3 m_Cascade4Split = new Vector3(0.067f, 0.2f, 0.467f);
[SerializeField] private DiffusionProfileSettings m_DiffusionProfileSettings;
[SerializeField] private DebugViewMode m_DebugViewMode;
[SerializeField]
private LightweightPipelineResources m_ResourcesAsset;

{
get { return m_DiffusionProfileSettings; }
private set { m_DiffusionProfileSettings = value; }
}
public DebugViewMode DebugView
{
get { return m_DebugViewMode; }
private set { m_DebugViewMode = value; }
}
public override Material GetDefaultMaterial()

5
ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/LightweightAssetEditor.cs


public static string[] shadowTypeOptions = {"No Shadows", "Hard Shadows", "Hard and Soft Shadows"};
public static string[] shadowCascadeOptions = {"No Cascades", "Two Cascades", "Four Cascades"};
//TLS
public static GUIContent debugViewMode = new GUIContent("Debug View Mode");
}
AnimBool m_ShowSoftParticles = new AnimBool();

private SerializedProperty m_ShadowCascade2SplitProp;
private SerializedProperty m_ShadowCascade4SplitProp;
private SerializedProperty m_DiffusionProfileSettingsProp;
private SerializedProperty m_DebugViewModeProp;
private SerializedProperty m_HDR;
private SerializedProperty m_MSAA;

m_ShadowCascade2SplitProp = serializedObject.FindProperty("m_Cascade2Split");
m_ShadowCascade4SplitProp = serializedObject.FindProperty("m_Cascade4Split");
m_DiffusionProfileSettingsProp = serializedObject.FindProperty("m_DiffusionProfileSettings");
m_DebugViewModeProp = serializedObject.FindProperty("m_DebugViewMode");
m_HDR = serializedObject.FindProperty("m_SupportsHDR");
m_MSAA = serializedObject.FindProperty("m_MSAA");

EditorGUILayout.PropertyField(m_HDR, Styles.hdrContent);
EditorGUILayout.PropertyField(m_MSAA, Styles.msaaContent);
EditorGUILayout.PropertyField(m_DiffusionProfileSettingsProp, Styles.diffusionProfileSettings);
EditorGUILayout.PropertyField(m_DebugViewModeProp, Styles.debugViewMode);
EditorGUI.indentLevel--;
EditorGUILayout.Space();

正在加载...
取消
保存