浏览代码

HDRenderPipeline: Add support for defaultShader

/Branch_Batching2
sebastienlagarde 8 年前
当前提交
dd356d49
共有 3 个文件被更改,包括 11 次插入1 次删除
  1. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
  2. 3
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.asset
  3. 5
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs


{
public static GUIContent defaults = new GUIContent("Defaults");
public static GUIContent defaultDiffuseMaterial = new GUIContent("Default Diffuse Material", "Material to use when creating objects");
public static GUIContent defaultShader = new GUIContent("Default Shader", "Shader to use when creating materials");
public readonly GUIContent settingsLabel = new GUIContent("Settings");

}
private SerializedProperty m_DefaultDiffuseMaterial;
private SerializedProperty m_DefaultShader;
// Display Debug
SerializedProperty m_ShowMaterialDebug = null;

private void InitializeProperties()
{
m_DefaultDiffuseMaterial = serializedObject.FindProperty("m_DefaultDiffuseMaterial");
m_DefaultShader = serializedObject.FindProperty("m_DefaultShader");
// DebugDisplay debug
m_DebugOverlayRatio = FindProperty(x => x.debugDisplaySettings.debugOverlayRatio);

EditorGUILayout.LabelField(Styles.defaults, EditorStyles.boldLabel);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_DefaultDiffuseMaterial, Styles.defaultDiffuseMaterial);
EditorGUILayout.PropertyField(m_DefaultShader, Styles.defaultShader);
EditorGUI.indentLevel--;
DebuggingUI(renderContext, renderpipelineInstance);

3
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.asset


enabled: 1
shadowAtlasWidth: 4096
shadowAtlasHeight: 4096
maxShadowDistance: 1000
maxShadowDistance: 400
directionalLightCascadeCount: 4
directionalLightCascades: {x: 0.05, y: 0.2, z: 0.3}
directionalLightNearPlaneOffset: 5

m_SkySettings: {fileID: 0}
m_DefaultDiffuseMaterial: {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17,
type: 2}
m_DefaultShader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}

5
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


}
[SerializeField] private Material m_DefaultDiffuseMaterial;
[SerializeField] private Shader m_DefaultShader;
}
public override Shader GetDefaultShader()
{
return m_DefaultShader;
}
public override Material GetDefaultMaterial()

正在加载...
取消
保存