Refactor engine to support double-precision vectors

This commit is contained in:
Wojtek Figat
2022-06-13 00:40:32 +02:00
parent f82e370392
commit a881c90b2e
744 changed files with 19062 additions and 12467 deletions

View File

@@ -177,8 +177,8 @@ MaterialLayer* MaterialLayer::Load(const Guid& id, ReadStream* graphData, const
if(layer->Root->Boxes.Count() <= static_cast<int32>(MaterialGraphBoxes::type)) \
layer->Root->Boxes.Add(MaterialGraphBox(layer->Root, static_cast<int32>(MaterialGraphBoxes::type), VariantType::valueType))
ADD_BOX(TessellationMultiplier, Float);
ADD_BOX(WorldDisplacement, Vector3);
ADD_BOX(SubsurfaceColor, Vector3);
ADD_BOX(WorldDisplacement, Float3);
ADD_BOX(SubsurfaceColor, Float3);
static_assert(static_cast<int32>(MaterialGraphBoxes::MAX) == 15, "Invalid amount of boxes added for root node. Please update the code above");
ASSERT(layer->Root->Boxes.Count() == static_cast<int32>(MaterialGraphBoxes::MAX));
#if BUILD_DEBUG
@@ -215,20 +215,20 @@ void MaterialLayer::createRootNode()
rootNode.Boxes.Resize(static_cast<int32>(MaterialGraphBoxes::MAX));
#define INIT_BOX(type, valueType) rootNode.Boxes[static_cast<int32>(MaterialGraphBoxes::type)] = MaterialGraphBox(&rootNode, static_cast<int32>(MaterialGraphBoxes::type), VariantType::valueType)
INIT_BOX(Layer, Void);
INIT_BOX(Color, Vector3);
INIT_BOX(Color, Float3);
INIT_BOX(Mask, Float);
INIT_BOX(Emissive, Vector3);
INIT_BOX(Emissive, Float3);
INIT_BOX(Metalness, Float);
INIT_BOX(Specular, Float);
INIT_BOX(Roughness, Float);
INIT_BOX(AmbientOcclusion, Float);
INIT_BOX(Normal, Vector3);
INIT_BOX(Normal, Float3);
INIT_BOX(Opacity, Float);
INIT_BOX(Refraction, Float);
INIT_BOX(PositionOffset, Vector3);
INIT_BOX(PositionOffset, Float3);
INIT_BOX(TessellationMultiplier, Float);
INIT_BOX(WorldDisplacement, Vector3);
INIT_BOX(SubsurfaceColor, Vector3);
INIT_BOX(WorldDisplacement, Float3);
INIT_BOX(SubsurfaceColor, Float3);
static_assert(static_cast<int32>(MaterialGraphBoxes::MAX) == 15, "Invalid amount of boxes created for root node. Please update the code above");
#undef INIT_BOX