ImFusion SDK 4.3
GlScreenSpaceAmbientOcclusion Class Reference

#include <ImFusion/GL/GlScreenSpaceAmbientOcclusion.h>

Post-processing filter implementing Screen Space Ambient Occlusion (SSAO). More...

+ Inheritance diagram for GlScreenSpaceAmbientOcclusion:

Detailed Description

Post-processing filter implementing Screen Space Ambient Occlusion (SSAO).

SSAO is a post-processing effect providing an approximation of global illumination and improving depth perception for opaque scenes. However, semi-transparent surfaces will produce rendering artifacts in which case you may decide to disable it.

See also
https://en.wikipedia.org/wiki/Screen_space_ambient_occlusion

Public Member Functions

void apply (const GL::Texture &inputColorTex, const GL::Texture &inputDepthTex, const GL::ViewState &viewState)
 Applies depth darkening to the given input textures and renders the result directly to the screen.
 
double strength () const
 Returns the strength of the SSAO effect in [0..1] range.
 
void setStrength (double value)
 Sets the strength of the SSAO effect in [0..1] range.
 
double occlusionRadius () const
 Returns the maximum distance (mm) for two fragments to occlude each other.
 
void setOcclusionRadius (double value)
 Sets the maximum distance (mm) for two fragments to occlude each other.
 
void configure (const Properties *) override
 Configure this object instance by de-serializing the given Properties.
 
void configuration (Properties *) const override
 Serialize the current object configuration into the given Properties object.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ apply()

void apply ( const GL::Texture & inputColorTex,
const GL::Texture & inputDepthTex,
const GL::ViewState & viewState )

Applies depth darkening to the given input textures and renders the result directly to the screen.

If you have an active FBO with a texture attached, it will render to that.

Parameters
inputColorTexInput color image, must not be 0.
inputDepthTexInput depth image, must not be 0.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close