浏览代码

Added Hyperbolic Cos/Tan

/main
Matt Dean 7 年前
当前提交
6f70ee57
共有 4 个文件被更改,包括 76 次插入0 次删除
  1. 30
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicCosNode.cs
  2. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicCosNode.cs.meta
  3. 30
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicTanNode.cs
  4. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicTanNode.cs.meta

30
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicCosNode.cs


using System.Reflection;
namespace UnityEngine.MaterialGraph
{
[Title("Math/Trigonometry/Hyperbolic Cos")]
class HyperbolicCosNode : CodeFunctionNode
{
public HyperbolicCosNode()
{
name = "Hyperbolic Cos";
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_HyperbolicCos", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_HyperbolicCos(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
{
return
@"
{
Out = sinh(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicCosNode.cs.meta


fileFormatVersion: 2
guid: 84e391acd9374974581c6759dcd8c1c9
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

30
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicTanNode.cs


using System.Reflection;
namespace UnityEngine.MaterialGraph
{
[Title("Math/Trigonometry/Hyperbolic Tan")]
class HyperbolicTanNode : CodeFunctionNode
{
public HyperbolicTanNode()
{
name = "Hyperbolic Tan";
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_HyperbolicTan", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_HyperbolicTan(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
{
return
@"
{
Out = tanh(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Trigonometry/HyperbolicTanNode.cs.meta


fileFormatVersion: 2
guid: 31c266bc8d479994eb5f6371038c75d2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
正在加载...
取消
保存