Treat all shaders as built in for now to facilitate getting shader module by name

This commit is contained in:
Xiao Qi 2022-10-27 14:12:53 +08:00
parent b5a1d5ea88
commit e1de423483
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ namespace SHADE
{
std::string newPath{ path.string() };
newPath = newPath.substr(0, newPath.find_last_of('.'));
newPath += SHADER_EXTENSION.data();
newPath += SHADER_BUILT_IN_EXTENSION.data();
std::ofstream file{ newPath, std::ios::binary | std::ios::out | std::ios::trunc };

View File

@ -302,8 +302,8 @@ namespace SHADE
if (ext == GLSL_EXTENSION.data())
{
newAsset.path = SHShaderSourceCompiler::LoadAndCompileShader(path).value();
newAsset.id = GenerateAssetID(AssetType::SHADER);
newAsset.type = AssetType::SHADER;
newAsset.id = GenerateAssetID(AssetType::SHADER_BUILT_IN);
newAsset.type = AssetType::SHADER_BUILT_IN;
}
else if (ext == DDS_EXTENSION.data())
{