您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

34 行
874 B

using System.Reflection;
using UnityEngine;
/*namespace UnityEditor.ShaderGraph
{
[Title("Procedural", "MakeSubgraph", "Hexagon")]
public class HexNode : CodeFunctionNode
{
public HexNode()
{
name = "Hexagon";
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Hex", BindingFlags.Static | BindingFlags.NonPublic);
}
static string Unity_Hex(
[Slot(0, Binding.MeshUV0)] Vector2 UV,
[Slot(1, Binding.None, 0.5f, 0.5f, 0.5f, 0.5f)] Vector1 Scale,
[Slot(2, Binding.None)] out Vector1 Out)
{
return
@"
{
UV.y += fmod(floor(UV.x), 2.0) * 0.5;
UV = abs(frac(UV) - 0.5);
Out = step(1-Scale,abs(max(UV.x * 1.5 + UV.y, UV.y * 2.0) - 1.0));
}
";
}
}
}*/