From bc8cc75ad8ce6eee10923523c0235f016b6f10fb Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 15 Jun 2022 20:39:55 +0200 Subject: [PATCH] Fix issue from 3294624849c56fe78de8867f015d2d23d99a35a7 --- Source/Engine/Visject/ShaderGraph.cpp | 10 ++++++---- Source/Engine/Visject/VisjectGraph.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Source/Engine/Visject/ShaderGraph.cpp b/Source/Engine/Visject/ShaderGraph.cpp index 91e042685..82a09c909 100644 --- a/Source/Engine/Visject/ShaderGraph.cpp +++ b/Source/Engine/Visject/ShaderGraph.cpp @@ -78,9 +78,10 @@ void ShaderGenerator::ProcessGroupConstants(Box* box, Node* node, Value& value) case 6: case 7: { - const Float4 cv = (Float4)node->Values[0]; + const Variant& v = node->Values[0]; + const Float4 cv = (Float4)v; if (box->ID == 0) - value = Value(cv); + value = Value(v); else if (box->ID == 1) value = Value(cv.X); else if (box->ID == 2) @@ -107,9 +108,10 @@ void ShaderGenerator::ProcessGroupConstants(Box* box, Node* node, Value& value) case 17: case 18: { - const Vector4 cv = (Vector4)node->Values[0]; + const Variant& v = node->Values[0]; + const Vector4 cv = (Vector4)v; if (box->ID == 0) - value = Value(cv); + value = Value(v); else if (box->ID == 1) value = Value(cv.X); else if (box->ID == 2) diff --git a/Source/Engine/Visject/VisjectGraph.cpp b/Source/Engine/Visject/VisjectGraph.cpp index 5f14d99de..88c12cd06 100644 --- a/Source/Engine/Visject/VisjectGraph.cpp +++ b/Source/Engine/Visject/VisjectGraph.cpp @@ -65,9 +65,10 @@ void VisjectExecutor::ProcessGroupConstants(Box* box, Node* node, Value& value) case 6: case 7: { - const Float4 cv = (Float4)node->Values[0]; + const Variant& v = node->Values[0]; + const Float4 cv = (Float4)v; if (box->ID == 0) - value = cv; + value = v; else if (box->ID == 1) value = cv.X; else if (box->ID == 2) @@ -130,9 +131,10 @@ void VisjectExecutor::ProcessGroupConstants(Box* box, Node* node, Value& value) case 17: case 18: { - const Vector4 cv = (Vector4)node->Values[0]; + const Variant& v = node->Values[0]; + const Vector4 cv = (Vector4)v; if (box->ID == 0) - value = cv; + value = v; else if (box->ID == 1) value = cv.X; else if (box->ID == 2)