diff --git a/src/util/postprocessing.cpp b/src/util/postprocessing.cpp index 0acaea9d8..0e8221c20 100644 --- a/src/util/postprocessing.cpp +++ b/src/util/postprocessing.cpp @@ -271,6 +271,18 @@ std::vector PostProcessing::Config::GetStageOption return ret; } +std::vector PostProcessing::Config::GetShaderOptions(const std::string& shader_name, + Error* error) +{ + std::vector ret; + std::unique_ptr shader = TryLoadingShader(shader_name, true, error); + if (!shader) + return ret; + + ret = shader->TakeOptions(); + return ret; +} + bool PostProcessing::Config::AddStage(SettingsInterface& si, const std::string& shader_name, Error* error) { std::unique_ptr shader = TryLoadingShader(shader_name, true, error); diff --git a/src/util/postprocessing.h b/src/util/postprocessing.h index a51c900d6..53d740c12 100644 --- a/src/util/postprocessing.h +++ b/src/util/postprocessing.h @@ -93,6 +93,7 @@ namespace Config { u32 GetStageCount(const SettingsInterface& si); std::string GetStageShaderName(const SettingsInterface& si, u32 index); std::vector GetStageOptions(const SettingsInterface& si, u32 index); +std::vector GetShaderOptions(const std::string& shader_name, Error* error); bool AddStage(SettingsInterface& si, const std::string& shader_name, Error* error); void RemoveStage(SettingsInterface& si, u32 index);