浏览代码

Camera Node Improvements

/main
Matt Dean 7 年前
当前提交
7cc96aea
共有 1 个文件被更改,包括 6 次插入11 次删除
  1. 17
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/CameraNode.cs

17
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/CameraNode.cs


[Title("Input/Scene/Camera")]
public class CameraNode : AbstractMaterialNode
{
private const string kOutputSlotName = "Pos";
private const string kOutputSlot1Name = "Dir";
private const string kOutputSlot2Name = "Near";
private const string kOutputSlot3Name = "Far";
private const string kOutputSlot4Name = "Sign";
const string kOutputSlotName = "Pos";
const string kOutputSlot1Name = "Dir";
const string kOutputSlot2Name = "Near";
const string kOutputSlot3Name = "Far";
const string kOutputSlot4Name = "Sign";
public const int OutputSlotId = 0;
public const int OutputSlot1Id = 1;

AddSlot(new Vector1MaterialSlot(OutputSlot2Id, kOutputSlot2Name, kOutputSlot2Name, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot3Id, kOutputSlot3Name, kOutputSlot3Name, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot4Id, kOutputSlot4Name, kOutputSlot4Name, SlotType.Output, 1));
RemoveSlotsNameNotMatching(validSlots);
}
protected int[] validSlots
{
get { return new[] { OutputSlotId, OutputSlot1Id, OutputSlot2Id, OutputSlot3Id, OutputSlot4Id }; }
RemoveSlotsNameNotMatching(new[] { OutputSlotId, OutputSlot1Id, OutputSlot2Id, OutputSlot3Id, OutputSlot4Id });
}
public override string GetVariableNameForSlot(int slotId)

正在加载...
取消
保存