Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
GaussianBlur.hpp
1#pragma once
2
3#include "resources/Texture.hpp"
4#include "graphics/Program.hpp"
5#include "Common.hpp"
6
18
19public:
26 GaussianBlur(uint radius, uint downscale, const std::string & name);
27
34 void process(const Texture& src, Texture & dst);
35
36private:
37
43 void resize(uint width, uint height);
44
48 std::vector<Texture> _levels;
49 uint _downscale = 1;
50};
Applies an approximate gaussian blur using a dual filtering approach.
Definition: GaussianBlur.hpp:17
Program * _blurProgramUp
The upscaling filter.
Definition: GaussianBlur.hpp:46
std::vector< Texture > _levels
Downscaled pyramid textures.
Definition: GaussianBlur.hpp:48
uint _downscale
Initial downscaling factor.
Definition: GaussianBlur.hpp:49
Program * _blurProgramDown
The downscaling filter.
Definition: GaussianBlur.hpp:45
Program * _passthrough
The copy program.
Definition: GaussianBlur.hpp:47
void process(const Texture &src, Texture &dst)
Definition: GaussianBlur.cpp:16
void resize(uint width, uint height)
Definition: GaussianBlur.cpp:72
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12