galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
ChromaticAberration.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_GRAPHICS_POST_CHROMATICABERRATION_HPP_
9#define GALAXY_GRAPHICS_POST_CHROMATICABERRATION_HPP_
10
14
15namespace galaxy
16{
17 namespace graphics
18 {
24 class ChromaticAberration final : public PostEffect
25 {
26 public:
33 ChromaticAberration(const int width, const int height);
34
38 virtual ~ChromaticAberration() = default;
39
46 void resize(const int width, const int height) override;
47
55 [[nodiscard]]
56 unsigned int render(const unsigned int input) override;
57
63 void set_r_offset(const float r);
64
70 void set_g_offset(const float g);
71
77 void set_b_offset(const float b);
78
86 void set_rgb_offset(const float r, const float g, const float b);
87
93 [[nodiscard]]
94 bool is_enabled() override;
95
96 private:
101
102 private:
107
112
117
122
127 };
128 } // namespace graphics
129} // namespace galaxy
130
131#endif
ChromaticAberration()=delete
Constructor.
virtual ~ChromaticAberration()=default
Destructor.
void resize(const int width, const int height) override
Resize framebuffers.
void set_g_offset(const float g)
Set chromatic r offset.
void set_r_offset(const float r)
Set chromatic r offset.
void set_rgb_offset(const float r, const float g, const float b)
Set chromatic rgb offset.
unsigned int render(const unsigned int input) override
Render effect to input texture.
RenderTexture m_fb
Framebuffer to render aberration.
bool is_enabled() override
Is this effect enabled?
Shader m_shader
Shader for post processing effect.
void set_b_offset(const float b)
Set chromatic r offset.
Manages post processing effects to apply to combined scene.
Draw to an opengl texture instead of the screen.
OpenGL Shader Program.
Definition Shader.hpp:29
Animated.cpp galaxy.
Definition Animated.cpp:16