浏览代码

[shader graph] Allow nodes to no generate default inputs via flag. Only really usefull on base pixel node.

/main
Tim Cooper 9 年前
当前提交
1062aabb
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 5
      UnityProject/Assets/UnityShaderEditor/Editor/Source/Nodes/BaseMaterialNode.cs
  2. 2
      UnityProject/Assets/UnityShaderEditor/Editor/Source/Nodes/PixelShaderNode.cs

5
UnityProject/Assets/UnityShaderEditor/Editor/Source/Nodes/BaseMaterialNode.cs


public string[] m_PrecisionNames = {"half"};
protected virtual bool generateDefaultInputs { get { return true; } }
public SlotValue GetSlotDefaultValue(string slotName)
{
var found = m_SlotDefaultValues.FirstOrDefault(x => x.slotName == slotName);

public virtual void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode, ConcreteSlotValueType slotValueType)
{
if (!generateDefaultInputs)
return;
if (!generationMode.IsPreview())
return;

2
UnityProject/Assets/UnityShaderEditor/Editor/Source/Nodes/PixelShaderNode.cs


get { return 300; }
}
protected override bool generateDefaultInputs { get { return false; } }
public override void OnEnable()
{
base.OnEnable();

正在加载...
取消
保存