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_;
int samples() const
number of samples
const ACG::Vec2f & texelSize() const
texel size in uv space
int radius() const
radius
const std::vector< ACG::Vec2f > & samples() const
disk sample offsets
std::vector< ACG::Vec2f > offsetsX_
filter taps
int samples() const
number of samples
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
std::vector< ACG::Vec2f > offsetsX_
filter taps
GLenum internalFormat() const
internal format of the input texture
QStringList macros_
shader macros
std::vector< float > weights_
kernel weights
int numSamples() const
number of samples
float radius() const
radius
const std::vector< float > & weights() const
sample weights
const ACG::Vec2f & sigma() const
blur (sigmaS, sigmaR)
int sigma() const
blur sigma
virtual ~RadialBlurFilter()
Class destructor.
int numTries() const
number of iterations per sample
const std::vector< ACG::Vec2f > & offsetsX() const
sample offsets along x direction
Namespace providing different geometric functions concerning angles.
ACG::Vec2f sigma_
(sigmaS, sigmaR)
int radius() const
radius
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction
ACG::Vec2f sigma2Rcp_
-1 / (2 * sigma^2)
float sampleDistance() const
min distance between two samples
std::vector< float > spatialKernel_
precomputed sample -r^2 / (2 * sigma_s^2)
QStringList macros_
shader macros
int texWidth() const
input texture width
int samples() const
number of samples
int texHeight() const
input texture height
const std::vector< ACG::Vec2f > & offsetsY() const
sample offsets along y direction