mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 07:00:51 +00:00
Override shaders by name.
This commit is contained in:
parent
74db6d4e26
commit
775c37f387
@ -20,6 +20,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "file/ini_file.h"
|
||||
@ -80,6 +81,7 @@ void LoadPostShaderInfo(std::vector<std::string> directories) {
|
||||
info.fragmentShaderFile = path + "/" + temp;
|
||||
section.Get("Vertex", &temp, "");
|
||||
info.vertexShaderFile = path + "/" + temp;
|
||||
shaderInfo.erase(std::find(shaderInfo.begin(), shaderInfo.end(), info.name), shaderInfo.end());
|
||||
shaderInfo.push_back(info);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ struct ShaderInfo {
|
||||
|
||||
// TODO: Add support for all kinds of fun options like mapping the depth buffer,
|
||||
// SRGB texture reads, multiple shaders chained, etc.
|
||||
|
||||
bool operator == (const std::string &other) {
|
||||
return name == other;
|
||||
}
|
||||
};
|
||||
|
||||
const ShaderInfo *GetPostShaderInfo(std::string name);
|
||||
|
Loading…
Reference in New Issue
Block a user