![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Chromatic Aberration pass. More...
#include <ChromaticAberration.hpp>
Inheritance diagram for galaxy::graphics::ChromaticAberration:
Collaboration diagram for galaxy::graphics::ChromaticAberration:Public Member Functions | |
| ChromaticAberration (const int width, const int height) | |
| Argument constructor. | |
| virtual | ~ChromaticAberration ()=default |
| Destructor. | |
| void | resize (const int width, const int height) override |
| Resize framebuffers. | |
| unsigned int | render (const unsigned int input) override |
| Render effect to input texture. | |
| void | set_r_offset (const float r) |
| Set chromatic r offset. | |
| void | set_g_offset (const float g) |
| Set chromatic r offset. | |
| void | set_b_offset (const float b) |
| Set chromatic r offset. | |
| void | set_rgb_offset (const float r, const float g, const float b) |
| Set chromatic rgb offset. | |
| bool | is_enabled () override |
| Is this effect enabled? | |
Public Member Functions inherited from galaxy::graphics::PostEffect | |
| virtual | ~PostEffect ()=default |
| Destructor. | |
Private Member Functions | |
| ChromaticAberration ()=delete | |
| Constructor. | |
Private Attributes | |
| Shader | m_shader |
| Shader for post processing effect. | |
| RenderTexture | m_fb |
| Framebuffer to render aberration. | |
| float | m_r_offset |
| Effect r colour offset. | |
| float | m_g_offset |
| Effect g colour offset. | |
| float | m_b_offset |
| Effect b colour offset. | |
Additional Inherited Members | |
Protected Member Functions inherited from galaxy::graphics::PostEffect | |
| PostEffect ()=default | |
| Constructor. | |
| PostEffect (const PostEffect &)=default | |
| Copy constructor. | |
| PostEffect (PostEffect &&)=default | |
| Move constructor. | |
| PostEffect & | operator= (const PostEffect &)=default |
| Copy assignment operator. | |
| PostEffect & | operator= (PostEffect &&)=default |
| Move assignment operator. | |
Chromatic Aberration pass.
Run after Anti-Aliasing.
Definition at line 24 of file ChromaticAberration.hpp.
| galaxy::graphics::ChromaticAberration::ChromaticAberration | ( | const int | width, |
| const int | height ) |
Argument constructor.
| width | Width of internal framebuffer. |
| height | Height of internal framebuffer. |
Definition at line 89 of file ChromaticAberration.cpp.
Here is the call graph for this function:
|
virtualdefault |
Destructor.
|
privatedelete |
Constructor.
|
overridevirtual |
Resize framebuffers.
| width | New width of internal framebuffer. |
| height | New height of internal framebuffer. |
Implements galaxy::graphics::PostEffect.
Definition at line 105 of file ChromaticAberration.cpp.
Here is the call graph for this function:
|
nodiscardoverridevirtual |
Render effect to input texture.
| input | Input texture from previous effect or window framebuffer. |
Implements galaxy::graphics::PostEffect.
Definition at line 110 of file ChromaticAberration.cpp.
Here is the call graph for this function:| void galaxy::graphics::ChromaticAberration::set_r_offset | ( | const float | r | ) |
Set chromatic r offset.
| r | -1.0f to 1.0f. Red. |
Definition at line 122 of file ChromaticAberration.cpp.
Here is the call graph for this function:| void galaxy::graphics::ChromaticAberration::set_g_offset | ( | const float | g | ) |
Set chromatic r offset.
| g | -1.0f to 1.0f. Green. |
Definition at line 128 of file ChromaticAberration.cpp.
Here is the call graph for this function:| void galaxy::graphics::ChromaticAberration::set_b_offset | ( | const float | b | ) |
Set chromatic r offset.
| b | -1.0f to 1.0f. Blue. |
Definition at line 134 of file ChromaticAberration.cpp.
Here is the call graph for this function:| void galaxy::graphics::ChromaticAberration::set_rgb_offset | ( | const float | r, |
| const float | g, | ||
| const float | b ) |
Set chromatic rgb offset.
| r | -1.0f to 1.0f. Red. |
| g | -1.0f to 1.0f. Green. |
| b | -1.0f to 1.0f. Blue. |
Definition at line 140 of file ChromaticAberration.cpp.
Here is the call graph for this function:
|
nodiscardoverridevirtual |
Is this effect enabled?
Implements galaxy::graphics::PostEffect.
Definition at line 149 of file ChromaticAberration.cpp.
|
private |
Shader for post processing effect.
Definition at line 106 of file ChromaticAberration.hpp.
|
private |
Framebuffer to render aberration.
Definition at line 111 of file ChromaticAberration.hpp.
|
private |
Effect r colour offset.
Definition at line 116 of file ChromaticAberration.hpp.
|
private |
Effect g colour offset.
Definition at line 121 of file ChromaticAberration.hpp.
|
private |
Effect b colour offset.
Definition at line 126 of file ChromaticAberration.hpp.