From 54cd77beb241b2d2ab18813e68120d3cb3154434 Mon Sep 17 00:00:00 2001 From: Dynamitos Date: Fri, 26 Apr 2024 10:28:34 +0200 Subject: [PATCH] Temporary remove slang --- .gitmodules | 4 +--- .vscode/launch.json | 13 +------------ CMakeSettings.json | 13 +++++++++++++ external/slang | 1 - src/Editor/Asset/MaterialLoader.cpp | 6 +++++- 5 files changed, 20 insertions(+), 17 deletions(-) delete mode 160000 external/slang diff --git a/.gitmodules b/.gitmodules index 9455091..91ee4d1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,6 +3,4 @@ url = https://github.com/d-bahr/CRCpp.git [submodule "external/vcpkg"] path = external/vcpkg - url = https://github.com/Microsoft/vcpkg.git -[submodule "external/slang"] - url = git@github.com:Dynamitos/slang.git + url = https://github.com/Microsoft/vcpkg.git \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 9f61d57..853ab2a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,23 +6,12 @@ "configurations": [ { "name": "Editor", - "type": "cppvsdbg", + "type": "lldb", "request": "launch", "program": "${workspaceRoot}/build/Editor.exe", "args": [], - "stopAtEntry": false, "cwd": "${workspaceRoot}/build", "console": "internalConsole", - "environment": [], - "symbolSearchPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\lib\\x64", - "requireExactSource": false, - "visualizerFile": "${workspaceRoot}/Seele.natvis", - "logging": { - "moduleLoad": false, - "exceptions": true, - "trace": true, - "traceResponse": true - } }, { "name": "Editor (Mac)", diff --git a/CMakeSettings.json b/CMakeSettings.json index a3c993f..efa7cde 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -48,6 +48,19 @@ "buildRoot": "C:/Users/Dynamitos/Seele/build/", "installRoot": "C:/Program Files/Seele", "addressSanitizerEnabled": true + }, + { + "name": "MinSizeRel", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "MinSizeRel", + "buildRoot": "C:/Users/Dynamitos/Seele/build/", + "installRoot": "C:/Program Files/Seele", + "cmakeCommandArgs": "-DCMAKE_DEBUG_POSTFIX=\"\" -DCMAKE_PLATFORM=x64", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x64" ], + "intelliSenseMode": "windows-msvc-x64", + "variables": [] } ] } \ No newline at end of file diff --git a/external/slang b/external/slang deleted file mode 160000 index 484c1e6..0000000 --- a/external/slang +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 484c1e618dddf586360c03f90e6c27ece1065acd diff --git a/src/Editor/Asset/MaterialLoader.cpp b/src/Editor/Asset/MaterialLoader.cpp index 720d497..7203ce9 100644 --- a/src/Editor/Asset/MaterialLoader.cpp +++ b/src/Editor/Asset/MaterialLoader.cpp @@ -127,11 +127,15 @@ void MaterialLoader::import(MaterialImportArgs args, PMaterialAsset asset) } } uint32 uniformDataSize = uniformBufferOffset; - auto referenceExpression = [&auxKey, &expressions](json obj) -> std::string + auto referenceExpression = [¶meters, &auxKey, &expressions](json obj) -> std::string { if(obj.is_string()) { std::string str = obj.get(); + if (parameters.find(str) != parameters.end()) + { + return str; + } OConstantExpression c = new ConstantExpression(str, ExpressionType::UNKNOWN); std::string name = fmt::format("const_{0}", auxKey++); c->key = name;