on this page: Create a New Global Shader as a Plugin | Unreal Engine Documentation
I followed all the instructions, and was given an error along the lines of “unable to find shader files”
However, looking at other plugins that include their own shaders, it seems a step was missed from the docs
Something along the lines of: (
void FFooModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
FString PluginShaderDir = FPaths::Combine(IPluginManager::Get().FindPlugin(TEXT("Foo"))->GetBaseDir(), TEXT("Shaders"));
AddShaderSourceDirectoryMapping(TEXT("/Plugin/Foo"), PluginShaderDir);
}
Along with the relevant headers
seems necessessary for UE4 to find the shaders