initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,32 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Clamp")]
|
||||
class ClampNode : CodeFunctionNode
|
||||
{
|
||||
public ClampNode()
|
||||
{
|
||||
name = "Clamp";
|
||||
synonyms = new string[] { "limit" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Clamp", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Clamp(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] DynamicDimensionVector Min,
|
||||
[Slot(2, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Max,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = clamp(In, Min, Max);
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b58e88ce87f05b241b7dc5d9a31bac69
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Fraction")]
|
||||
class FractionNode : CodeFunctionNode
|
||||
{
|
||||
public FractionNode()
|
||||
{
|
||||
name = "Fraction";
|
||||
synonyms = new string[] { "remainder" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Fraction", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Fraction(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = frac(In);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4229c656c10cc1c43aa631f8f6357764
|
||||
timeCreated: 1490780593
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Maximum")]
|
||||
class MaximumNode : CodeFunctionNode
|
||||
{
|
||||
public MaximumNode()
|
||||
{
|
||||
name = "Maximum";
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Maximum", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Maximum(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector A,
|
||||
[Slot(1, Binding.None)] DynamicDimensionVector B,
|
||||
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = max(A, B);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1de46e012f3608843978529b36704c2b
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,30 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Minimum")]
|
||||
class MinimumNode : CodeFunctionNode
|
||||
{
|
||||
public MinimumNode()
|
||||
{
|
||||
name = "Minimum";
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Minimum", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Minimum(
|
||||
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
|
||||
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
|
||||
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = min(A, B);
|
||||
};";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 79ffed9a70f191f4c966a6eb3ae10d07
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "One Minus")]
|
||||
class OneMinusNode : CodeFunctionNode
|
||||
{
|
||||
public OneMinusNode()
|
||||
{
|
||||
name = "One Minus";
|
||||
synonyms = new string[] { "complement", "invert", "opposite" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_OneMinus", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_OneMinus(
|
||||
[Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = 1 - In;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ea3f39b56fc9544ff80cbe84aa0753d0
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,33 @@
|
|||
using UnityEngine;
|
||||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Random Range")]
|
||||
class RandomRangeNode : CodeFunctionNode
|
||||
{
|
||||
public RandomRangeNode()
|
||||
{
|
||||
name = "Random Range";
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_RandomRange", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_RandomRange(
|
||||
[Slot(0, Binding.None)] Vector2 Seed,
|
||||
[Slot(1, Binding.None)] Vector1 Min,
|
||||
[Slot(2, Binding.None, 1, 1, 1, 1)] Vector1 Max,
|
||||
[Slot(3, Binding.None)] out Vector1 Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
$precision randomno = frac(sin(dot(Seed, $precision2(12.9898, 78.233)))*43758.5453);
|
||||
Out = lerp(Min, Max, randomno);
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5e7048f6323341547955eab30f96151f
|
||||
timeCreated: 1495703851
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,33 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Remap")]
|
||||
class RemapNode : CodeFunctionNode
|
||||
{
|
||||
public RemapNode()
|
||||
{
|
||||
name = "Remap";
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Remap", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Remap(
|
||||
[Slot(0, Binding.None, -1, -1, -1, -1)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None, -1, 1, 0, 0)] Vector2 InMinMax,
|
||||
[Slot(2, Binding.None, 0, 1, 0, 0)] Vector2 OutMinMax,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1d2a789d52c4340c98278ca90d8563fe
|
||||
timeCreated: 1446473341
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Range", "Saturate")]
|
||||
class SaturateNode : CodeFunctionNode
|
||||
{
|
||||
public SaturateNode()
|
||||
{
|
||||
name = "Saturate";
|
||||
synonyms = new string[] { "clamp" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Saturate", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Saturate(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = saturate(In);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fb36f8243cc0c1b4b862405cc67fa2d1
|
||||
timeCreated: 1495454549
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue