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)