Support Forum G3D Web Page |
(Separated) 2D Bilateral Filter.
More...
Inherits G3D::ReferenceCountedObject.
Public Member Functions | |
BilateralFilter () | |
void | apply (RenderDevice *rd, const shared_ptr< Texture > &source, const shared_ptr< Framebuffer > &destination, const shared_ptr< GBuffer > &gbuffer, const BilateralFilterSettings &settings) const |
Applies a Bilateral Filter. More... | |
Static Public Member Functions | |
static shared_ptr< BilateralFilter > | create () |
Protected Member Functions | |
void | apply1D (RenderDevice *rd, const shared_ptr< Texture > &source, const shared_ptr< GBuffer > &gbuffer, const Vector2 &direction, const BilateralFilterSettings &settings) const |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Protected Attributes | |
shared_ptr< Framebuffer > | m_intermediateFramebuffer |
(Separated) 2D Bilateral Filter.
Although, bilateral filters are not mathematically separable, doing so gives a good approximation in exchange for reducing quadratic to linear run time and so is a common practice.
|
inline |
void G3D::BilateralFilter::apply | ( | RenderDevice * | rd, |
const shared_ptr< Texture > & | source, | ||
const shared_ptr< Framebuffer > & | destination, | ||
const shared_ptr< GBuffer > & | gbuffer, | ||
const BilateralFilterSettings & | settings | ||
) | const |
Applies a Bilateral Filter.
Handles intermediate storage in a texture of the same format as the source texture.
Assumes that the following fields are available:
|
protected |
|
inlinestatic |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
mutableprotected |