diff --git a/libs/gfx/include/psemek/gfx/gltf_parser.hpp b/libs/gfx/include/psemek/gfx/gltf_parser.hpp index d086c262..10418248 100644 --- a/libs/gfx/include/psemek/gfx/gltf_parser.hpp +++ b/libs/gfx/include/psemek/gfx/gltf_parser.hpp @@ -45,6 +45,7 @@ namespace psemek::gfx std::optional position; std::optional normal; std::optional texcoord; + std::optional color; std::optional joints; std::optional weights; std::size_t indices; diff --git a/libs/gfx/source/gltf_parser.cpp b/libs/gfx/source/gltf_parser.cpp index 5511aac9..8fb79fea 100644 --- a/libs/gfx/source/gltf_parser.cpp +++ b/libs/gfx/source/gltf_parser.cpp @@ -208,6 +208,8 @@ namespace psemek::gfx primitive_target.normal = attributes["NORMAL"].GetUint64(); if (attributes.HasMember("TEXCOORD_0")) primitive_target.texcoord = attributes["TEXCOORD_0"].GetUint64(); + if (attributes.HasMember("COLOR_0")) + primitive_target.color = attributes["COLOR_0"].GetUint64(); if (attributes.HasMember("JOINTS_0")) primitive_target.joints = attributes["JOINTS_0"].GetUint64(); if (attributes.HasMember("WEIGHTS_0"))