adjustment to nodes size

This commit is contained in:
NoriteSC
2023-10-04 10:28:23 +02:00
parent 70ca1996c5
commit 367eaf2f89
2 changed files with 3 additions and 3 deletions

View File

@@ -888,7 +888,7 @@ namespace FlaxEditor.Surface.Archetypes
Title = "Ratangle Mask",
Description = "Creates a Ratangle mask",
Flags = NodeFlags.MaterialGraph,
Size = new Float2(150, 100),
Size = new Float2(150, 40),
ConnectionsHints = ConnectionsHint.Vector,
DefaultValues = new object[]
{
@@ -908,7 +908,7 @@ namespace FlaxEditor.Surface.Archetypes
Title = "FWidth",
Description = "Creates a Partial Derivatives (fwidth)",
Flags = NodeFlags.MaterialGraph,
Size = new Float2(150, 100),
Size = new Float2(150, 20),
ConnectionsHints = ConnectionsHint.Vector,
DefaultValues = new object[]
{

View File

@@ -527,7 +527,7 @@ void MaterialGenerator::ProcessGroupMaterial(Box* box, Node* node, Value& value)
auto d = writeLocal(ValueType::Float2, String::Format(TEXT("abs({0} * 2 - 1) - {1}"),uv.Value, ratangle.Value), node);
auto fwidth = writeLocal(ValueType::Float , String::Format(TEXT("abs(ddx({0})) + abs(ddy({0}))"), d.Value), node);
auto d2 = writeLocal(ValueType::Float , String::Format(TEXT("1 - {0} / {1}"), d.Value, fwidth.Value), node);
auto d2 = writeLocal(ValueType::Float2 , String::Format(TEXT("1 - {0} / {1}"), d.Value, fwidth.Value), node);
value = writeLocal(ValueType::Float , String::Format(TEXT("saturate(min({0}.x, {0}.y))"), d2.Value), node);
break;
}