浏览代码

Add All, Any, IsInfinite and IsNaN nodes

/main
Matt Dean 7 年前
当前提交
dbaf707b
共有 8 个文件被更改,包括 184 次插入0 次删除
  1. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AllNode.cs
  2. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AllNode.cs.meta
  3. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AnyNode.cs
  4. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AnyNode.cs.meta
  5. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsInfiniteNode.cs
  6. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsInfiniteNode.cs.meta
  7. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsNanNode.cs
  8. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsNanNode.cs.meta

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AllNode.cs


using System.Reflection;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
namespace UnityEditor.ShaderGraph
{
[Title("Utility", "Logic", "All")]
public class AllNode : CodeFunctionNode
{
public AllNode()
{
name = "All";
}
public override bool hasPreview
{
get { return false; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_All", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_All(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out Boolean Out)
{
return
@"
{
Out = all(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AllNode.cs.meta


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

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AnyNode.cs


using System.Reflection;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
namespace UnityEditor.ShaderGraph
{
[Title("Utility", "Logic", "Any")]
public class AnyNode : CodeFunctionNode
{
public AnyNode()
{
name = "Any";
}
public override bool hasPreview
{
get { return false; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Any", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_Any(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out Boolean Out)
{
return
@"
{
Out = any(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/AnyNode.cs.meta


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

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsInfiniteNode.cs


using System.Reflection;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
namespace UnityEditor.ShaderGraph
{
[Title("Utility", "Logic", "Is Infinite")]
public class IsInfiniteNode : CodeFunctionNode
{
public IsInfiniteNode()
{
name = "Is Infinite";
}
public override bool hasPreview
{
get { return false; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_IsInfinite", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_IsInfinite(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out Boolean Out)
{
return
@"
{
Out = isinf(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsInfiniteNode.cs.meta


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

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsNanNode.cs


using System.Reflection;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;
namespace UnityEditor.ShaderGraph
{
[Title("Utility", "Logic", "Is NaN")]
public class IsNanNode : CodeFunctionNode
{
public IsNanNode()
{
name = "Is NaN";
}
public override bool hasPreview
{
get { return false; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_IsNaN", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_IsNaN(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.None)] out Boolean Out)
{
return
@"
{
Out = isnan(In);
}
";
}
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Utility/Logic/IsNanNode.cs.meta


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