浏览代码

[srp ux]Add default shader to the low end pipeline

/Branch_Batching2
Tim Cooper 8 年前
当前提交
00aff75c
共有 3 个文件被更改,包括 13 次插入0 次删除
  1. 6
      Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Editor/LowendPipelineAssetInspector.cs
  2. 1
      Assets/ScriptableRenderPipeline/LowEndMobilePipeline/LowEndMobilePipelineAsset.asset
  3. 6
      Assets/ScriptableRenderPipeline/LowEndMobilePipeline/LowEndMobilePipelineAsset.cs

6
Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Editor/LowendPipelineAssetInspector.cs


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");
}
private SerializedProperty m_MaxPixelLights;

private SerializedProperty m_ShadowCascade2SplitProp;
private SerializedProperty m_ShadowCascade4SplitProp;
private SerializedProperty m_DefaultDiffuseMaterial;
private SerializedProperty m_DefaultShader;
void OnEnable()
{

m_ShadowCascade2SplitProp = serializedObject.FindProperty("m_Cascade2Split");
m_ShadowCascade4SplitProp = serializedObject.FindProperty("m_Cascade4Split");
m_DefaultDiffuseMaterial = serializedObject.FindProperty("m_DefaultDiffuseMaterial");
m_DefaultShader = serializedObject.FindProperty("m_DefaultShader");
}
public override void OnInspectorGUI()

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

1
Assets/ScriptableRenderPipeline/LowEndMobilePipeline/LowEndMobilePipelineAsset.asset


m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_DefaultDiffuseMaterial: {fileID: 2100000, guid: 654f7c5a4dd5d4d139a072ab9b5c5738,
type: 2}
m_DefaultShader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}

6
Assets/ScriptableRenderPipeline/LowEndMobilePipeline/LowEndMobilePipelineAsset.cs


[SerializeField] private Material m_DefaultDiffuseMaterial;
[SerializeField] private Shader m_DefaultShader;
public int MaxSupportedPixelLights
{
get { return m_MaxPixelLights; }

public override Material GetDefault2DMaterial()
{
return m_DefaultDiffuseMaterial;
}
public override Shader GetDefaultShader()
{
return m_DefaultShader;
}
}
}
正在加载...
取消
保存