From 0872d10f43833d1eecc258ffa7f82ce976385a6d Mon Sep 17 00:00:00 2001 From: artkez <33177434+artkez@users.noreply.github.com> Date: Fri, 17 Jun 2022 11:20:26 +0300 Subject: [PATCH] Revert "Added Smoothstep and Step Material Nodes" This reverts commit 1b4dded11e922597b3a78b6157a0d67a61d03a58. --- Source/Editor/Surface/Archetypes/Math.cs | 54 ------------------------ Source/Engine/Visject/ShaderGraph.cpp | 17 -------- 2 files changed, 71 deletions(-) diff --git a/Source/Editor/Surface/Archetypes/Math.cs b/Source/Editor/Surface/Archetypes/Math.cs index ee62e735b..063e2f931 100644 --- a/Source/Editor/Surface/Archetypes/Math.cs +++ b/Source/Editor/Surface/Archetypes/Math.cs @@ -441,60 +441,6 @@ namespace FlaxEditor.Surface.Archetypes NodeElementArchetype.Factory.Output(0, string.Empty, typeof(Float3), 2), } }, - new NodeArchetype - { - TypeID = 50, - Title = "Smoothstep", - Description = "Returns a smooth Hermite interpolation between 0 and 1, if value is in the range [min, max].", - Flags = NodeFlags.MaterialGraph, - Size = new Float2(110, 60), - ConnectionsHints = ConnectionsHint.Numeric, - IndependentBoxes = new[] - { - 0, - 1, - 2 - }, - DependentBoxes = new[] { 3 }, - DefaultValues = new object[] - { - 0.0f, - 1.0f, - }, - Elements = new[] - { - NodeElementArchetype.Factory.Input(0, "Min", true, null, 0), - NodeElementArchetype.Factory.Input(1, "Max", true, null, 1), - NodeElementArchetype.Factory.Input(2, "Value", true, null, 2, 1), - NodeElementArchetype.Factory.Output(0, "Result", null, 3) - }, - }, - new NodeArchetype - { - TypeID = 51, - Title = "Step", - Description = "Compares two values, returning 0 or 1 based on which value is greater.", - Flags = NodeFlags.MaterialGraph, - Size = new Float2(110, 40), - ConnectionsHints = ConnectionsHint.Numeric, - IndependentBoxes = new[] - { - 0, - 1, - }, - DependentBoxes = new[] { 2 }, - DefaultValues = new object[] - { - 0.0f, - 1.0f, - }, - Elements = new[] - { - NodeElementArchetype.Factory.Input(0, "Min", true, null, 0), - NodeElementArchetype.Factory.Input(1, "Max", true, null, 1), - NodeElementArchetype.Factory.Output(0, "Result", null, 2) - }, - }, }; } } diff --git a/Source/Engine/Visject/ShaderGraph.cpp b/Source/Engine/Visject/ShaderGraph.cpp index 5a0437e9e..82a09c909 100644 --- a/Source/Engine/Visject/ShaderGraph.cpp +++ b/Source/Engine/Visject/ShaderGraph.cpp @@ -417,23 +417,6 @@ void ShaderGenerator::ProcessGroupMath(Box* box, Node* node, Value& value) value = writeLocal(ValueType::Float3, String::Format(TEXT("QuatRotateVector({0}, {1})"), quaternion.Value, vector.Value), node); break; } - // Smoothstep - case 50: - { - Value v1 = tryGetValue(node->GetBox(0), Value::Zero); - Value v2 = tryGetValue(node->GetBox(1), Value::Zero); - Value v3 = tryGetValue(node->GetBox(2), Value::Zero); - value = writeFunction3(node, v1, v2, v3, TEXT("smoothstep"), v1.Type); - break; - } - // Step - case 51: - { - Value v1 = tryGetValue(node->GetBox(0), Value::Zero); - Value v2 = tryGetValue(node->GetBox(1), Value::Zero); - value = writeFunction2(node, v1, v2, TEXT("step")); - break; - } default: break; }