mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
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:
@@ -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};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user