Refactor engine to support double-precision vectors
This commit is contained in:
@@ -18,7 +18,7 @@ void MaterialGenerator::ProcessGroupTools(Box* box, Node* node, Value& value)
|
||||
// Get inputs
|
||||
Value exponent = tryGetValue(node->GetBox(0), 0, Value(5.0f)).AsFloat();
|
||||
Value fraction = tryGetValue(node->GetBox(1), 1, Value(0.04f)).AsFloat();
|
||||
Value normal = tryGetValue(node->GetBox(2), getNormal).AsVector3();
|
||||
Value normal = tryGetValue(node->GetBox(2), getNormal).AsFloat3();
|
||||
|
||||
// Write operations
|
||||
auto local1 = writeFunction2(node, normal, cameraVector, TEXT("dot"), VariantType::Float);
|
||||
@@ -37,13 +37,13 @@ void MaterialGenerator::ProcessGroupTools(Box* box, Node* node, Value& value)
|
||||
case 2:
|
||||
{
|
||||
// Get inputs
|
||||
Value input = tryGetValue(node->GetBox(0), Value::Zero).AsVector3();
|
||||
Value input = tryGetValue(node->GetBox(0), Value::Zero).AsFloat3();
|
||||
Value scale = tryGetValue(node->GetBox(1), Value::Zero).AsFloat();
|
||||
Value luminanceFactors = Value(node->Values[0].AsVector3());
|
||||
Value luminanceFactors = Value(node->Values[0].AsFloat3());
|
||||
|
||||
// Write operations
|
||||
auto dot = writeFunction2(node, input, luminanceFactors, TEXT("dot"), VariantType::Float);
|
||||
value = writeFunction3(node, input, dot, scale, TEXT("lerp"), VariantType::Vector3);
|
||||
value = writeFunction3(node, input, dot, scale, TEXT("lerp"), VariantType::Float3);
|
||||
break;
|
||||
}
|
||||
// Time
|
||||
@@ -56,9 +56,9 @@ void MaterialGenerator::ProcessGroupTools(Box* box, Node* node, Value& value)
|
||||
case 6:
|
||||
{
|
||||
// Get inputs
|
||||
const Value uv = tryGetValue(node->GetBox(0), getUVs).AsVector2();
|
||||
const Value uv = tryGetValue(node->GetBox(0), getUVs).AsFloat2();
|
||||
const Value time = tryGetValue(node->GetBox(1), getTime).AsFloat();
|
||||
const Value speed = tryGetValue(node->GetBox(2), Value::One).AsVector2();
|
||||
const Value speed = tryGetValue(node->GetBox(2), Value::One).AsFloat2();
|
||||
const bool useFractionalPart = (bool)node->Values[0];
|
||||
|
||||
// Write operations
|
||||
|
||||
Reference in New Issue
Block a user