Custom HLSL at a project level

Thanks Ryan DowlingSoka:

You need only define a virtual shader directory in module startup, and then you can include it in the ecustom node include list. I can send a snippet:

void FReliefMappingModule::StartupModule()
// Add shader directory
const TSharedPtr ReliefMappingPlugin = IPluginManager::Get().FindPlugin(TEXT("ReliefMapping"));
if (ReliefMappingPlugin.IsValid())
const FString RealShaderDirectory = ReliefMappingPlugin->GetBaseDir() + TEXT("/Shaders/");
const FString VirtualShaderDirectory = TEXT("/Plugins/ReliefMapping");
AddShaderSourceDirectoryMapping(VirtualShaderDirectory, RealShaderDirectory);

1 Like