VideoCommon: add custom includer to custom shaders, this will allow us to ship built-in custom shaders in the future

This commit is contained in:
iwubcode
2025-11-23 11:04:51 -06:00
parent 93a6cc80b4
commit 23c637c029
2 changed files with 18 additions and 0 deletions
@@ -8,6 +8,7 @@
#include <fmt/std.h>
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Common/IOFile.h"
#include "Common/JsonUtil.h"
@@ -150,6 +151,12 @@ DirectFilesystemAssetLibrary::LoadRasterSurfaceShader(const AssetID& asset_id,
if (!RasterSurfaceShaderData::FromJson(asset_id, root_obj, data))
return {};
const std::string graphics_mod_builtin =
File::GetSysDirectory() + GRAPHICSMOD_DIR + "/Builtin" + "/Shaders";
data->shader_includer = std::make_unique<VideoCommon::ShaderIncluder>(
PathToString(pixel_shader->second.parent_path()), graphics_mod_builtin);
return LoadInfo{approx_mem_size};
}