initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Interpolation", "Inverse Lerp")]
|
||||
class InverseLerpNode : CodeFunctionNode
|
||||
{
|
||||
public InverseLerpNode()
|
||||
{
|
||||
name = "Inverse Lerp";
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_InverseLerp", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_InverseLerp(
|
||||
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
|
||||
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
|
||||
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector T,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = (T - A)/(B - A);
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 25857c1c6903f40f382b8857bba28668
|
||||
timeCreated: 1444218016
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,32 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Interpolation", "Lerp")]
|
||||
class LerpNode : CodeFunctionNode
|
||||
{
|
||||
public LerpNode()
|
||||
{
|
||||
name = "Lerp";
|
||||
synonyms = new string[] { "mix", "blend", "linear interpolate" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Lerp", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Lerp(
|
||||
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
|
||||
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
|
||||
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector T,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = lerp(A, B, T);
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a5622947be2d8cd48beb2362351ddf12
|
||||
timeCreated: 1444218016
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,32 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Math", "Interpolation", "Smoothstep")]
|
||||
class SmoothstepNode : CodeFunctionNode
|
||||
{
|
||||
public SmoothstepNode()
|
||||
{
|
||||
name = "Smoothstep";
|
||||
synonyms = new string[] { "curve" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Smoothstep", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Smoothstep(
|
||||
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector Edge1,
|
||||
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge2,
|
||||
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = smoothstep(Edge1, Edge2, In);
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a9ced96a233d64541b3c5d374a057d6b
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
Loading…
Add table
Add a link
Reference in a new issue