浏览代码

Rename Hue input to Offset

/main
Matt Dean 7 年前
当前提交
adae5870
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/HueNode.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/HueNode.cs


static string Unity_Hue_Degrees(
[Slot(0, Binding.None)] Vector3 In,
[Slot(1, Binding.None)] Vector1 Hue,
[Slot(2, Binding.None)] out Vector3 Out)
{
Out = Vector3.zero;

{precision} E = 1e-10;
{precision}3 hsv = {precision}3(abs(Q.z + (Q.w - Q.y)/(6.0 * D + E)), D / (Q.x + E), Q.x);
{precision} hue = hsv.x + Hue / 360;
hsv.x = (hue < 0)
? hue + 1
: (hue > 1)

static string Unity_Hue_Normalized(
[Slot(0, Binding.None)] Vector3 In,
[Slot(1, Binding.None, 0.5f, 0.5f, 0.5f, 0.5f)] Vector1 Hue,
[Slot(2, Binding.None)] out Vector3 Out)
{
Out = Vector3.zero;

{precision} E = 1e-10;
{precision}3 hsv = {precision}3(abs(Q.z + (Q.w - Q.y)/(6.0 * D + E)), D / (Q.x + E), Q.x);
{precision} hue = hsv.x + Hue;
hsv.x = (hue < 0)
? hue + 1
: (hue > 1)

正在加载...
取消
保存