Shader: Add module ID (UUID)

This commit is contained in:
Jérôme Leclercq
2022-03-05 15:25:27 +01:00
parent 43ac86e85c
commit 53728200ac
9 changed files with 72 additions and 46 deletions

View File

@@ -459,12 +459,7 @@ QJsonObject ShaderGraph::Save()
Nz::ShaderAst::ModulePtr ShaderGraph::ToModule() const
{
Nz::ShaderAst::ModulePtr shaderModule = std::make_shared<Nz::ShaderAst::Module>();
std::shared_ptr<Nz::ShaderAst::Module::Metadata> moduleMetada = std::make_shared<Nz::ShaderAst::Module::Metadata>();
moduleMetada->shaderLangVersion = 100;
shaderModule->metadata = std::move(moduleMetada);
Nz::ShaderAst::ModulePtr shaderModule = std::make_shared<Nz::ShaderAst::Module>(100);
// Declare all options
for (const auto& option : m_options)