浏览代码

Temporarily remove vertex capability from Subgraphs

/main
Peter Bay Bastian 7 年前
当前提交
35c8e0e3
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 4
      ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs
  2. 2
      ShaderGraph/com.unity.shadergraph/Editor/Data/SubGraph/SubGraph.cs

4
ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs


}
var id = prop.guid.GetHashCode();
MaterialSlot slot = MaterialSlot.CreateMaterialSlot(slotType, id, prop.displayName, prop.referenceName, SlotType.Input, prop.defaultValue);
MaterialSlot slot = MaterialSlot.CreateMaterialSlot(slotType, id, prop.displayName, prop.referenceName, SlotType.Input, prop.defaultValue, ShaderStageCapability.Fragment);
// copy default for texture for niceness
if (slotType == SlotValueType.Texture2D && propType == PropertyType.Texture)
{

{
foreach (var slot in NodeExtensions.GetInputSlots<MaterialSlot>(subGraphOutputNode))
{
AddSlot(MaterialSlot.CreateMaterialSlot(slot.valueType, slot.id, slot.RawDisplayName(), slot.shaderOutputName, SlotType.Output, Vector4.zero));
AddSlot(MaterialSlot.CreateMaterialSlot(slot.valueType, slot.id, slot.RawDisplayName(), slot.shaderOutputName, SlotType.Output, Vector4.zero, ShaderStageCapability.Fragment));
validNames.Add(slot.id);
}
}

2
ShaderGraph/com.unity.shadergraph/Editor/Data/SubGraph/SubGraph.cs


arguments.Add(string.Format("{0}", prop.GetPropertyAsArgumentString()));
// now pass surface inputs
arguments.Add("SurfaceInputs IN");
arguments.Add("SurfaceDescriptionInputs IN");
// Now generate outputs
foreach (var slot in graphOutputs)

正在加载...
取消
保存