浏览代码

missed files

/main
Tim Cooper 7 年前
当前提交
580b206b
共有 2 个文件被更改,包括 60 次插入0 次删除
  1. 48
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/BitangentNode.cs
  2. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/BitangentNode.cs.meta

48
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/BitangentNode.cs


using UnityEngine.Graphing;
namespace UnityEngine.MaterialGraph
{
public interface IMayRequireBitangent
{
NeededCoordinateSpace RequiresBitangent();
}
[Title("Input/Geometry/World Bitangent")]
public class BitangentNode : AbstractMaterialNode, IMayRequireBitangent
{
public const int kOutputSlotId = 0;
public const string kOutputSlotName = "Bitangent";
public BitangentNode()
{
name = "Bitangent";
UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
{
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Vector3, new Vector4(0, 0, 1, 1)));
RemoveSlotsNameNotMatching(new[] { kOutputSlotId });
}
public override bool hasPreview
{
get { return true; }
}
public override PreviewMode previewMode
{
get { return PreviewMode.Preview3D; }
}
public override string GetVariableNameForSlot(int slotId)
{
return ShaderGeneratorNames.WorldSpaceSpaceBiTangent;
}
public NeededCoordinateSpace RequiresBitangent()
{
return NeededCoordinateSpace.World;
}
}
}

12
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/BitangentNode.cs.meta


fileFormatVersion: 2
guid: 25ded6c13e7523d48935f8bd1b9afcb6
timeCreated: 1481041579
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存