Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
G3D::BilateralFilter Class Reference


(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< BilateralFiltercreate ()
 

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< Framebufferm_intermediateFramebuffer
 

Detailed Description


(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.

See also
BilateralFilterSettings

Constructor & Destructor Documentation

◆ BilateralFilter()

G3D::BilateralFilter::BilateralFilter ( )
inline

Member Function Documentation

◆ apply()

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:

◆ apply1D()

void G3D::BilateralFilter::apply1D ( RenderDevice rd,
const shared_ptr< Texture > &  source,
const shared_ptr< GBuffer > &  gbuffer,
const Vector2 direction,
const BilateralFilterSettings settings 
) const
protected

◆ create()

static shared_ptr<BilateralFilter> G3D::BilateralFilter::create ( )
inlinestatic

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

Member Data Documentation

◆ m_intermediateFramebuffer

shared_ptr<Framebuffer> G3D::BilateralFilter::m_intermediateFramebuffer
mutableprotected

documentation generated on Wed Nov 24 2021 08:01:53 using doxygen 1.8.15