浏览代码

Rename Blend node inputs

/main
Matt Dean 7 年前
当前提交
f9d9e891
共有 1 个文件被更改,包括 73 次插入73 次删除
  1. 146
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Blend/BlendNode.cs

146
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Blend/BlendNode.cs


}
static string Unity_Blend_Burn(
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = 1.0 - (1.0 - B)/A;
Out = 1.0 - (1.0 - Blend)/Base;
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = min(B, A);
Out = min(Blend, Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = abs(B - A);
Out = abs(Blend - Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = B / (1.0 - A);
Out = Base / (1.0 - Blend);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = A / (B + 0.000000000001);
Out = Base / (Blend + 0.000000000001);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = B + A - (2.0 * B * A);
Out = Blend + Base - (2.0 * Blend * Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
{precision}{slot2dimension} result1 = 1.0 - 2.0 * (1.0 - A) * (1.0 - B);
{precision}{slot2dimension} result2 = 2.0 * A * B;
{precision}{slot2dimension} zeroOrOne = step(A, 0.5);
{precision}{slot2dimension} result1 = 1.0 - 2.0 * (1.0 - Base) * (1.0 - Blend);
{precision}{slot2dimension} result2 = 2.0 * Base * Blend;
{precision}{slot2dimension} zeroOrOne = step(Blend, 0.5);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = step(1 - A, B);
Out = step(1 - Base, Blend);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = max(B, A);
Out = max(Blend, Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = A + B - 1.0;
Out = Base + Blend - 1.0;
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = A + B;
Out = Base + Blend;
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = B < 0.5 ? max(A + (2 * B) - 1, 0) : min(A + 2 * (B - 0.5), 1);
Out = Blend < 0.5 ? max(Base + (2 * Blend) - 1, 0) : min(Base + 2 * (Blend - 0.5), 1);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = B + 2.0 * A - 1.0;
Out = Blend + 2.0 * Base - 1.0;
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = A * B;
Out = Base * Blend;
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = 1.0 - abs(1.0 - B - A);
Out = 1.0 - abs(1.0 - Blend - Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = 1.0 - (1.0 - B) * (1.0 - A);
Out = 1.0 - (1.0 - Blend) * (1.0 - Base);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
{precision}{slot2dimension} result1 = 1.0 - 2.0 * (1.0 - A) * (1.0 - B);
{precision}{slot2dimension} result2 = 2.0 * A * B;
{precision}{slot2dimension} zeroOrOne = step(B, 0.5);
{precision}{slot2dimension} result1 = 1.0 - 2.0 * (1.0 - Base) * (1.0 - Blend);
{precision}{slot2dimension} result2 = 2.0 * Base * Blend;
{precision}{slot2dimension} zeroOrOne = step(Base, 0.5);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
}
";

[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
{precision}{slot2dimension} check = step (0.5, A);
{precision}{slot2dimension} result1 = check * max(2.0 * (A - 0.5), B);
Out = result1 + (1.0 - check) * min(2.0 * A, B);
{precision}{slot2dimension} check = step (0.5, Blend);
{precision}{slot2dimension} result1 = check * max(2.0 * (Base - 0.5), Blend);
Out = result1 + (1.0 - check) * min(2.0 * Base, Blend);
[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
{precision}{slot2dimension} result1 = 2.0 * B * A + B * A - 2.0 * B * B * A;
{precision}{slot2dimension} result2 = 2.0 * sqrt(B) * A - sqrt(B) + 2.0 * B - 2.0 * B * A;
{precision}{slot2dimension} zeroOrOne = step(0.5, A);
{precision}{slot2dimension} result1 = 2.0 * Base * Blend + Base * Base * (1.0 - 2.0 * Blend);
{precision}{slot2dimension} result2 = sqrt(Base) * (2.0 * Blend - 1.0) + 2.0 * Base * (1.0 - Blend);
{precision}{slot2dimension} zeroOrOne = step(0.5, Blend);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
}
";

[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
{precision}{slot2dimension} result1 = 1.0 - (1.0 - B) / (2.0 * A);
{precision}{slot2dimension} result2 = B / (2.0 * (1.0 - A));
{precision}{slot2dimension} zeroOrOne = step(0.5, A);
{precision}{slot2dimension} result1 = 1.0 - (1.0 - Blend) / (2.0 * Base);
{precision}{slot2dimension} result2 = Blend / (2.0 * (1.0 - Base));
{precision}{slot2dimension} zeroOrOne = step(0.5, Base);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
}
";

[Slot(0, Binding.None)] DynamicDimensionVector A,
[Slot(1, Binding.None)] DynamicDimensionVector B,
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
Out = A - B;
Out = Base - Blend;
}
";
}
正在加载...
取消
保存