mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
feat: post-processing effects
This commit is contained in:
parent
22e97b1766
commit
ba170035ef
19 changed files with 216 additions and 84 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue