53 #include <ACG/Config/ACGDefines.hh>
54 #include <ACG/Math/GLMatrixT.hh>
55 #include <ACG/GL/gl.hh>
57 #include <QStringList>
103 bool execute(GLuint _srcTexture,
ACG::FBO* _dstFBO = 0, GLuint _dstColorAttachment = GL_COLOR_ATTACHMENT0, GLuint _tempColorAttachment = 0);
111 void resizeInput(
int _texWidth,
int _texHeight);
133 virtual GLSL::Program* setupPass(
int _pass, GLuint _srcTex) = 0;
139 virtual void updateKernel() = 0;
171 GaussianBlurFilter(
int _texWidth,
int _texHeight,
int _blurRadius,
float _blurSigma = 1.0f, GLenum _internalfmt = GL_RGBA);
181 void setKernel(
int _blurRadius,
float _blurSigma);
193 const std::vector<ACG::Vec2f>&
offsetsX()
const {
return offsetsX_;}
196 const std::vector<ACG::Vec2f>&
offsetsY()
const {
return offsetsY_;}
199 const std::vector<float>&
weights()
const {
return weights_;}
220 std::vector<ACG::Vec2f> offsetsY_;
241 BilateralBlurFilter(
int _texWidth,
int _texHeight,
int _blurRadius,
float _blurSigmaS = 1.0f,
float blurSigmaR = 1.0f, GLenum _internalfmt = GL_RGBA);
255 depthTex_ = _depthTex;
265 void setKernel(
int _blurRadius,
float _blurSigmaS,
float _blurSigmaR);
278 const std::vector<ACG::Vec2f>&
offsetsX()
const {
return offsetsX_;}
281 const std::vector<ACG::Vec2f>&
offsetsY()
const {
return offsetsY_;}
301 std::vector<ACG::Vec2f> offsetsY_;
337 bool execute(GLuint _srcTexture,
float _blurRadius = 1.0f,
float _blurIntensity = 0.0025f,
const ACG::Vec2f& _blurCenter =
ACG::Vec2f(0.5f, 0.5f));
344 void setKernel(
int _numSamples);
379 bool execute(GLuint _srcTex,
float _kernelScale = 1.0f);
395 const std::vector<ACG::Vec2f>&
samples()
const {
return samples_;}
398 void dumpSamples(
const char* _filename);
401 void plotSamples(QImage* _image);
407 float sampleDistance_;
411 std::vector<ACG::Vec2f> samples_;
414 std::vector<ACG::Vec2f> samplesScaled_;
virtual ~RadialBlurFilter()
Class destructor.
std::vector< ACG::Vec2f > offsetsX_
filter taps
Namespace providing different geometric functions concerning angles.
const ACG::Vec2f & texelSize() const
texel size in uv space
int radius() const
radius
int texWidth() const
input texture width
std::vector< float > spatialKernel_
precomputed sample -r^2 / (2 * sigma_s^2)
float radius() const
radius
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
int samples() const
number of samples
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
int numSamples() const
number of samples
const std::vector< float > & weights() const
sample weights
int sigma() const
blur sigma
QStringList macros_
shader macros
float sampleDistance() const
min distance between two samples
ACG::Vec2f sigma_
(sigmaS, sigmaR)
GLenum internalFormat() const
internal format of the input texture
const ACG::Vec2f & sigma() const
blur (sigmaS, sigmaR)
std::vector< float > weights_
kernel weights
int samples() const
number of samples
std::vector< ACG::Vec2f > offsetsX_
filter taps
const std::vector< ACG::Vec2f > & samples() const
disk sample offsets
int samples() const
number of samples
int numTries() const
number of iterations per sample
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction
int texHeight() const
input texture height
QStringList macros_
shader macros
ACG::Vec2f sigma2Rcp_
-1 / (2 * sigma^2)
int radius() const
radius