feat(materialx): Update MaterialX library handling and improve shader generation logging

This commit is contained in:
2026-01-06 16:12:53 +00:00
parent 06e31cf536
commit da126a535f
4 changed files with 64 additions and 12 deletions

View File

@@ -8,6 +8,8 @@
#include <MaterialXCore/Document.h>
#include <MaterialXCore/Types.h>
#include <MaterialXFormat/File.h>
#include <MaterialXFormat/Util.h>
#include <MaterialXFormat/XmlIo.h>
#include <SDL3/SDL.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
@@ -79,7 +81,7 @@ mx::DocumentPtr LoadMaterialXDocument(const std::filesystem::path& documentPath,
const std::filesystem::path& scriptDirectory) {
mx::DocumentPtr document = mx::createDocument();
mx::FileSearchPath searchPath = BuildMaterialXSearchPath(config, scriptDirectory);
mx::readFromXmlFile(document, mx::FilePath(documentPath.string()), &searchPath);
mx::readFromXmlFile(document, mx::FilePath(documentPath.string()), searchPath);
if (!config.libraryFolders.empty()) {
mx::DocumentPtr stdLib = mx::createDocument();