feat: post-processing effects

This commit is contained in:
MihailRis
2025-04-05 00:41:25 +03:00
parent 22e97b1766
commit ba170035ef
19 changed files with 216 additions and 84 deletions
+12 -2
View File
@@ -21,10 +21,20 @@ public:
Param(Type type, Value defValue);
};
PostEffect(std::unique_ptr<Shader> shader);
PostEffect(
std::unique_ptr<Shader> shader,
std::unordered_map<std::string, Param> params
);
void use();
Shader& use();
void setIntensity(float value);
bool isActive() {
return intensity > 1e-4f;
}
private:
std::unique_ptr<Shader> shader;
std::unordered_map<std::string, Param> params;
float intensity = 0.0f;
};