浏览代码

Fixed sufix hack adding _Uniform at the end of sampler 2Ds. Now this case is handled correctly

/main
Eduardo Chaves 8 年前
当前提交
82a36753
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/AbstractMaterialNode.cs

10
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/AbstractMaterialNode.cs


if (inputSlot == null)
return string.Empty;
string sufix = "";
var edges = owner.GetEdges(inputSlot.slotReference).ToArray();
if (edges.Any())

if (slot == null)
return string.Empty;
if (slot.concreteValueType == ConcreteSlotValueType.sampler2D)
sufix += "_Uniform";
return ShaderGenerator.AdaptNodeOutput(fromNode, slot.id, slot.concreteValueType) + sufix;
return ShaderGenerator.AdaptNodeOutput(fromNode, slot.id, slot.concreteValueType);
if (inputSlot.concreteValueType == ConcreteSlotValueType.sampler2D)
sufix += "_Uniform";
return inputSlot.GetDefaultValue(generationMode) + sufix;
return inputSlot.GetDefaultValue(generationMode);
}
private ConcreteSlotValueType FindCommonChannelType(ConcreteSlotValueType from, ConcreteSlotValueType to)

正在加载...
取消
保存