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
GaussianBlur.hpp
Go to the documentation of this file.
1
7
8
#ifndef GALAXY_GRAPHICS_POST_GAUSSIANBLUR_HPP_
9
#define GALAXY_GRAPHICS_POST_GAUSSIANBLUR_HPP_
10
11
#include "
galaxy/graphics/gl/Shader.hpp
"
12
#include "
galaxy/graphics/PostEffect.hpp
"
13
#include "
galaxy/graphics/RenderTexture.hpp
"
14
15
namespace
galaxy
16
{
17
namespace
graphics
18
{
24
class
GaussianBlur
final :
public
PostEffect
25
{
26
public
:
30
enum class
Strength
:
int
31
{
35
LOW
= 0,
36
40
NORMAL
= 1,
41
45
STRONG
= 2
46
};
47
54
GaussianBlur
(
const
int
width,
const
int
height);
55
59
virtual
~GaussianBlur
() =
default
;
60
67
void
resize
(
const
int
width,
const
int
height)
override
;
68
76
[[nodiscard]]
77
unsigned
int
render
(
const
unsigned
int
input)
override
;
78
84
void
set_strength
(
const
Strength
strength);
85
91
[[nodiscard]]
92
bool
is_enabled
()
override
;
93
94
private
:
98
GaussianBlur
() =
delete
;
99
100
private
:
104
Shader
m_shader
;
105
109
RenderTexture
m_horizontal
;
110
114
RenderTexture
m_vertical
;
115
119
Strength
m_strength
;
120
};
121
}
// namespace graphics
122
}
// namespace galaxy
123
124
#endif
PostEffect.hpp
RenderTexture.hpp
Shader.hpp
galaxy::graphics::GaussianBlur
Gaussian Blur pass.
Definition
GaussianBlur.hpp:25
galaxy::graphics::GaussianBlur::is_enabled
bool is_enabled() override
Is this effect enabled?
Definition
GaussianBlur.cpp:163
galaxy::graphics::GaussianBlur::GaussianBlur
GaussianBlur()=delete
Constructor.
galaxy::graphics::GaussianBlur::~GaussianBlur
virtual ~GaussianBlur()=default
Destructor.
galaxy::graphics::GaussianBlur::resize
void resize(const int width, const int height) override
Resize framebuffers.
Definition
GaussianBlur.cpp:131
galaxy::graphics::GaussianBlur::m_horizontal
RenderTexture m_horizontal
Framebuffer to render horizontal blur to.
Definition
GaussianBlur.hpp:109
galaxy::graphics::GaussianBlur::render
unsigned int render(const unsigned int input) override
Render effect to input texture.
Definition
GaussianBlur.cpp:137
galaxy::graphics::GaussianBlur::m_vertical
RenderTexture m_vertical
Framebuffer to render vertical blur to.
Definition
GaussianBlur.hpp:114
galaxy::graphics::GaussianBlur::Strength
Strength
Pixel sample strength.
Definition
GaussianBlur.hpp:31
galaxy::graphics::GaussianBlur::Strength::NORMAL
@ NORMAL
Pixel sample of 9.
galaxy::graphics::GaussianBlur::Strength::STRONG
@ STRONG
Pixel sample of 13.
galaxy::graphics::GaussianBlur::Strength::LOW
@ LOW
Pixel sample of 5.
galaxy::graphics::GaussianBlur::m_strength
Strength m_strength
Which pixel sample strength to use.
Definition
GaussianBlur.hpp:119
galaxy::graphics::GaussianBlur::set_strength
void set_strength(const Strength strength)
Set gaussian blur strength.
Definition
GaussianBlur.cpp:157
galaxy::graphics::GaussianBlur::m_shader
Shader m_shader
Shader for post processing effect.
Definition
GaussianBlur.hpp:104
galaxy::graphics::PostEffect
Manages post processing effects to apply to combined scene.
Definition
PostEffect.hpp:21
galaxy::graphics::RenderTexture
Draw to an opengl texture instead of the screen.
Definition
RenderTexture.hpp:25
galaxy::graphics::Shader
OpenGL Shader Program.
Definition
Shader.hpp:29
galaxy
Animated.cpp galaxy.
Definition
Animated.cpp:16
galaxy
src
galaxy
graphics
post
GaussianBlur.hpp
Generated on Fri Sep 12 2025 07:29:47 for galaxy by
1.12.0