From 5a0838e52bdd46de1541483074b7e815807f6016 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 23 Jul 2023 21:43:25 +0800 Subject: [PATCH] Migrate materials --- core/renderer/Material.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/renderer/Material.cpp b/core/renderer/Material.cpp index ef3645665d..50d99fb980 100644 --- a/core/renderer/Material.cpp +++ b/core/renderer/Material.cpp @@ -74,6 +74,7 @@ static bool isValidUniform(const char* name); Material* Material::createWithFilename(std::string_view filepath) { + AXLOG("Loading material: %s", filepath.data()); auto validfilename = FileUtils::getInstance()->fullPathForFilename(filepath); if (!validfilename.empty()) { @@ -377,10 +378,11 @@ bool Material::parseShader(Pass* pass, Properties* shaderProperties) auto vertShaderSrc = fu->getStringFromFile(vertShader); auto fragShaderSrc = fu->getStringFromFile(fragShader); - auto defs = replaceDefines(compileTimeDefines); + //since axmol-1.1 no longer support compile time defines + //auto defs = replaceDefines(compileTimeDefines); - vertShaderSrc = defs + "\n" + vertShaderSrc; - fragShaderSrc = defs + "\n" + fragShaderSrc; + //vertShaderSrc = defs + "\n" + vertShaderSrc; + //fragShaderSrc = defs + "\n" + fragShaderSrc; auto* program = backend::Device::getInstance()->newProgram(vertShaderSrc, fragShaderSrc); auto programState = new backend::ProgramState(program);