PostProcessing: Add Config::GetShaderOptions()

This commit is contained in:
Stenzek
2023-12-10 22:22:02 +10:00
parent c90de025bf
commit 27162e34a0
2 changed files with 13 additions and 0 deletions

View File

@ -271,6 +271,18 @@ std::vector<PostProcessing::ShaderOption> PostProcessing::Config::GetStageOption
return ret;
}
std::vector<PostProcessing::ShaderOption> PostProcessing::Config::GetShaderOptions(const std::string& shader_name,
Error* error)
{
std::vector<PostProcessing::ShaderOption> ret;
std::unique_ptr<Shader> 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> shader = TryLoadingShader(shader_name, true, error);