47 #include <ACG/Config/ACGDefines.hh> 48 #include <ACG/Math/GLMatrixT.hh> 49 #include <ACG/GL/gl.hh> 51 #include <QStringList> 104 bool execute(GLuint _srcTexture,
ACG::FBO* _dstFBO = 0, GLuint _dstColorAttachment = GL_COLOR_ATTACHMENT0, GLuint _tempColorAttachment = 0);
112 void resizeInput(
int _texWidth,
int _texHeight);
134 virtual GLSL::Program* setupPass(
int _pass, GLuint _srcTex) = 0;
140 virtual void updateKernel() = 0;
172 GaussianBlurFilter(
int _texWidth,
int _texHeight,
int _blurRadius,
float _blurSigma = 1.0f, GLenum _internalfmt = GL_RGBA);
182 void setKernel(
int _blurRadius,
float _blurSigma);
194 const std::vector<ACG::Vec2f>&
offsetsX()
const {
return offsetsX_;}
197 const std::vector<ACG::Vec2f>&
offsetsY()
const {
return offsetsY_;}
200 const std::vector<float>&
weights()
const {
return weights_;}
221 std::vector<ACG::Vec2f> offsetsY_;
242 BilateralBlurFilter(
int _texWidth,
int _texHeight,
int _blurRadius,
float _blurSigmaS = 1.0f,
float blurSigmaR = 1.0f, GLenum _internalfmt = GL_RGBA);
256 depthTex_ = _depthTex;
266 void setKernel(
int _blurRadius,
float _blurSigmaS,
float _blurSigmaR);
279 const std::vector<ACG::Vec2f>&
offsetsX()
const {
return offsetsX_;}
282 const std::vector<ACG::Vec2f>&
offsetsY()
const {
return offsetsY_;}
302 std::vector<ACG::Vec2f> offsetsY_;
338 bool execute(GLuint _srcTexture,
float _blurRadius = 1.0f,
float _blurIntensity = 0.0025f,
const ACG::Vec2f& _blurCenter =
ACG::Vec2f(0.5f, 0.5f));
345 void setKernel(
int _numSamples);
370 PoissonBlurFilter(
float _radius,
float _sampleDistance,
int _numTries = 30,
bool _disk =
true,
bool _tilingCheck =
false);
382 bool execute(GLuint _srcTex,
float _kernelScale = 1.0f);
398 bool disk()
const {
return disk_; }
401 const std::vector<ACG::Vec2f>&
samples()
const {
return samples_;}
404 void dumpSamples(
const char* _filename);
407 void plotSamples(QImage* _image);
413 float sampleDistance_;
418 std::vector<ACG::Vec2f> samples_;
421 std::vector<ACG::Vec2f> samplesScaled_;
This namespace contains all the classes and functions for handling GLSL shader and program objects...
Namespace providing different geometric functions concerning angles.
int numTries() const
number of iterations per sample
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
QStringList macros_
shader macros
const ACG::Vec2f & texelSize() const
texel size in uv space
std::vector< ACG::Vec2f > offsetsX_
filter taps
int samples() const
number of samples
GLenum internalFormat() const
internal format of the input texture
const std::vector< float > & weights() const
sample weights
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction
int samples() const
number of samples
virtual ~RadialBlurFilter()
Class destructor.
int numSamples() const
number of samples
float radius() const
radius
const std::vector< ACG::Vec2f > & samples() const
disk sample offsets
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
ACG::Vec2f sigma2Rcp_
-1 / (2 * sigma^2)
std::vector< float > spatialKernel_
precomputed sample -r^2 / (2 * sigma_s^2)
int texWidth() const
input texture width
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction
std::vector< float > weights_
kernel weights
int texHeight() const
input texture height
int samples() const
number of samples
bool disk() const
samples inside disk or square area
const ACG::Vec2f & sigma() const
blur (sigmaS, sigmaR)
QStringList macros_
shader macros
ACG::Vec2f sigma_
(sigmaS, sigmaR)
std::vector< ACG::Vec2f > offsetsX_
filter taps
float sampleDistance() const
min distance between two samples
int sigma() const
blur sigma