add 'advanced' post-effect load configuration

This commit is contained in:
MihailRis 2025-06-13 23:28:16 +03:00
parent 9cc59c8848
commit 02a91e0b72
10 changed files with 49 additions and 21 deletions

View file

@ -35,6 +35,7 @@ public:
};
PostEffect(
bool advanced,
std::shared_ptr<Shader> shader,
std::unordered_map<std::string, Param> params
);
@ -48,10 +49,15 @@ public:
void setParam(const std::string& name, const dv::value& value);
bool isAdvanced() const {
return advanced;
}
bool isActive() {
return intensity > 1e-4f;
}
private:
bool advanced = false;
std::shared_ptr<Shader> shader;
std::unordered_map<std::string, Param> params;
float intensity = 0.0f;